Lightweight YOLOv11n model for efficient and accurate residual-film detection in cotton fields of arid regions

Persistent accumulation of residual plastic film (RPF), especially visible sheet-like RPF, in cotton fields of arid regions poses a critical challenge to sustainable cotton production. Image-based recognition offers an efficient approach for rapid monitoring and precise recovery of RPF. However, complex backgrounds, varying illumination, and blurred fragment edges limit the accuracy and efficiency of traditional detection methods. This study focuses on visible sheet-like RPF in arid-region cotton fields, constructs a field image dataset collected under different illumination and soil-background conditions, and develops a lightweight improved model based on YOLOv11n. Specifically, a PPLCNet-based lightweight backbone is used to replace the original feature-extraction structure, and CBAM is inserted after the SPPF module to enhance channel-spatial attention. In addition, an improved SimAM attention mechanism strengthens noise suppression and target-focused learning. An improved MPDIoU loss function is introduced for bounding-box regression to improve localization accuracy and training stability for irregular fragments. Experimental results show that the improved model achieves precision, recall, and mAP50 of 97.56%, 98.62%, and 99.38%, representing increases of 4.41%, 8.14%, and 3.19% over the original YOLOv11n. The model outperforms mainstream lightweight models, including YOLOv5n, YOLOv8n, and YOLOv10n, while maintaining only 2.14 M parameters and 5.07 GFLOPs. Deployment on a Jetson Nano achieves an average detection response time of approximately 2.07 s, indicating its potential for low-power field deployment and periodic detection on agricultural machinery. The main novelty of this work lies in a coordinated perception-attention-localization optimization strategy for lightweight RPF detection, providing a practical basis for intelligent monitoring and mechanized recovery of visible sheet-like RPF in arid-region cotton fields.