Agri-PIDNet-S: Lightweight semantic segmentation for field-structure and obstacle perception in seedling-stage cotton fields
Yanlin Xin, Yongke Li, Wuchen Wei, Xinyu Cao, Bowen Mao, Yanhong Chen
Reliable joint perception of crop rows, furrows, and obstacles is essential for autonomous inter-row operations in seedling-stage cotton fields. However, small and sparsely distributed plants, perspective-convergent rows, irregular furrow boundaries, and low obstacle pixel coverage jointly challenge fine-detail preservation, long-range structural modeling, and boundary discrimination under real-time constraints. This study formulated cotton-field perception as a four-class semantic segmentation task and constructed a dataset of 709 pixel-wise annotated images comprising background, crop rows, furrows, and obstacles. We developed Agri-PIDNet-S, a field-specific lightweight network based on PIDNet-S. A coordinate-aware multi-kernel inverted residual module (CA-MKIR) preserves shallow details and small-obstacle contours, a squeeze-and-excitation-enhanced deep-to-token module (SaE-D2T) models long-range row and furrow structures, and a boundary-guided window-attention refinement Bag (BWR-Bag) improves semantic–boundary fusion. The network was trained with a composite loss incorporating auxiliary boundary supervision. On the cotton-field test set, Agri-PIDNet-S achieved 92.37% mean intersection over union (mIoU) and 96.02% mean Dice coefficient (mDice) in the model-comparison experiment, while repeated training with three seeds yielded an mIoU of 92.35