Foreign fibers directly impact the quality of raw cotton, affecting the prices of textile products and the economic efficiency of cotton textile enterprises. The accurate differentiation and labeling of foreign fibers require domain-specific knowledge, and labeling scattered cotton foreign fibers in images consumes substantial time and labor costs. In this study, we propose a semi-supervised foreign fiber detection approach that uses unlabeled image information and a small amount of labeled data for model training. Our proposed method, Efficient YOLOv5-cotton, introduces CBAM to address the issue of the missed detection and false detection of small-sized cotton foreign fibers against complex backgrounds. Second, the algorithm designs a multiscale feature information extraction network, SPPFCSPC, which improves its ability to generalize to fibers of different shapes. Lastly, to reduce the increased network parameters and computational complexity introduced by the SPPFCSPC module, we replace the C3 layer with the C3Ghost module. We evaluate Efficient YOLOv5 for detecting various types of foreign fibers. The results demonstrate that the improved Efficient YOLOv5-cotton achieves a 1.6% increase in mAP@0.5 (mean average precision) compared with the original Efficient YOLOv5 and reduces model parameters by 10% compared to the original Efficient YOLOv5 with SPPFCSPC. Our experiments show that our proposed method enhances the accuracy of foreign fiber detection using Efficient YOLOv5-cotton and considers the trade-off between the model size and computational cost.
Machine harvesting of cotton in Xinjiang has significantly improved harvesting efficiency; however, it has also resulted in a considerable increase in residual mulch content within the cotton, which has severely affected the quality and market value of cotton textiles. Existing mulch detection algorithms based on machine vision generally suffer from complex parameterization and insufficient real-time performance. To overcome these limitations, this study proposes a novel mulch detection algorithm, Mulch-YOLO, developed on the YOLOv11 framework. Specifically, an improved CBAM (Convolutional Block Attention Module) is incorporated into the BiFPN (Bidirectional Feature Pyramid Network) to achieve more effective fusion of multi-scale mulch features. To enhance the semantic representation of mulch features, a modified Content-Aware ReAssembly of Features module, CARAFE-Mulch (Content-Aware ReAssembly of Features), is designed to reorganize feature maps, resulting in stronger feature expressiveness compared with the original representations. Furthermore, the MobileOne module is optimized by integrating the DECA Dilated Efficient Channel Attention (Dilated Efficient Channel Attention) module, thereby reducing both the parameter count and computational load while improving detection efficiency in real time. To verify the effectiveness of the proposed approach, experiments were conducted on a real-world dataset containing 20,134 images of low-visual-saliency plastic mulch. The results indicate that Mulch-YOLO achieves a lightweight architecture and high detection accuracy. Compared with YOLOv11n, the proposed method improves mAP@0.5 by 4.7% and mAP@0.5:0.95 by 3.3%, with a 24% reduction in model parameters.