Coal and gangue intelligent sorting accounts for a vital proportion of modern coal mines, which takes on critical significance in boosting clean coal utilization. Aiming at the problem of low recognition accuracy that arises from the large diversity in particle size of raw coal and the adhesion and half-occlusion between them, A Mask RCNN-based instance segmentation network for coal and gangue image is proposed. First, multi-branch parallel feature extraction bottlenecks are developed to build a lightweight backbone with a mixed attention mechanism and self-correcting convolution incorporated to enhance the feature representation of targets. Subsequently, a necknet is developed, aggregating the context feature information of the backbone from channel and space to enhance the position and boundary information of targets. Lastly, the effectiveness of this method is fully validated by ablation and test experiments using self-built coal and gangue RGB image datasets include varieties of characteristics as input. As indicated by the experimental results, the above-described method is capable of enhancing the segmentation ability of stacked and adhered coal and gangue and reducing the missed detection rate of small targets. ISNet_CG achieves mAP, mIoU, F1-scores, and FPS of 98.0, 96.5, 0.987, and 24.2 FPS, respectively, such that the correct category and location can be provided for coal and gangue in a dense state.