The popularity of Agrocybe cylindracea is increasing due to its unique flavor and nutritional value. The Agrocybe cylindracea cap is a key aspect of the growth process, and high-throughput observation of cap traits in greenhouses by machine vision is a future development trend of smart agriculture. Nevertheless, the segmentation of the Agrocybe cylindracea cap is extremely challenging due to its similarity in color to the rest of the mushroom and the occurrence of mutual occlusion, presenting a major obstacle for the effective application of automation technology. To address this issue, we propose an improved instance segmentation network called Agrocybe cylindracea R-CNN (AC R-CNN) based on the Mask R-CNN model. AC R-CNN incorporates hybrid dilated convolution (HDC) and attention modules into the feature extraction backbone network to enhance the segmentation of adhesive mushroom caps and focus on the segmentation objects. Furthermore, the Mask Branch module is replaced with PointRend to improve the network’s segmentation accuracy at the edges of the mushroom caps. These modifications effectively solve the problems of the original algorithm’s inability to segment adhesive Agrocybe cylindracea caps and low accuracy in edge segmentation. The experimental results demonstrate that AC R-CNN outperforms the original Mask R-CNN in terms of segmentation performance. The average precision (AP) is improved by 12.1%, and the F1 score is improved by 13.7%. Additionally, AC R-CNN outperforms other networks such as Mask Scoring R-CNN and BlendMask. Therefore, the research findings of this study can meet the high-precision segmentation requirements of Agrocybe cylindracea caps and lay a theoretical foundation for the development of subsequent intelligent phenotyping devices and harvesting robots.