基于DFR-SN-YOLO的棉花顶芽识别方法

    Cotton top bud recognition method based on DFR-SN-YOLO

    • 摘要: 针对密植环境下棉花顶芽漏检率高、检测精度低等问题,该研究提出了一种DFR-SN-YOLO的棉花顶芽检测模型。首先,使用DWConv和改进后的C3_Faster重设轻量高效的主干,进行有效卷积提取顶芽特征;其次针对顶芯漏检问题,基于棉田顶叶和顶芯位置相对的结构关联性,通过在主干引入具有识别位置信息的CA(coord attention)注意力获取更多顶芯信息特征,结合颈部网络改进的C3_RFCBAMConv模块,融入感受野注意力的卷积,提高模型在全局特征识别到顶芯的能力;最后,提出一种针对顶芽识别的SN(Shape-NWD-IoU)损失函数,考虑顶芽自身形状同时注重小目标的提取,提高对顶芽的识别能力。试验结果表明,DFR-SN-YOLO相较于原模型,平均检测精度mAP@50为97.5%,提高了3个百分点;顶芯准确率为92.4%,提高了3.9个百分点;召回率达到95.0%,有效解决了顶芯漏检的问题,同时模型参数量为3.9M下降44%;部署在边缘计算设备上,推理速度为37帧/s,研究结果为后续棉花智能机械打顶提供了技术支持。

       

      Abstract: Mechanical topping has been one of the most critical procedures in cotton cultivation. The precise identification of apical top buds is often required to avoid missing immature buds for high yield. However, existing topping can fail to distinguish between mature and immature cotton top buds in the densely planted fields, leading to inefficient detection under varying maturity levels and complex environmental conditions. In this study, a YOLOv5s-based model (DFR-SN-YOLO) was proposed for the lightweight and accurate detection of the cotton top bud. A lightweight backbone was integrated with the position-aware attention, receptive-field-aware feature fusion, and a Shape-NWD-IoU loss function. The backbone network was redesigned using depthwise separable convolution (DWConv). An optimized C3_Faster module was employed to reduce the computational complexity for the high efficiency of the feature extraction. The standard convolution was replaced with the efficient DWConv convolution to reduce the number of model parameters. The C3_Faster module was incorporated with the Partial Convolution (PConv) to minimize the memory access and computational redundancy. Furthermore, CoordAttention (CA) was embedded into the backbone to capture the spatial positional relationships between mature and immature top buds. The CA was retained on the location-specific features using 1D average pooling in a horizontal and vertical manner, in order to detect the small top buds. A C3_RFCBAMConv module was introduced into the neck network. Receptive Field Attention (RFA) was combined with a modified convolutional block attention module (CBAM). The spatial feature perception was enhanced to dynamically adjust the convolutional kernel parameters according to the spatial patterns of the receptive field. A squeeze-and-excitation (SE) module was integrated for the channel attention, and a spatial attention module (SAM) for the spatial feature weighting. The robust recognition of immature top buds was observed under the cluttered environments. A hybrid loss function, Shape-NWD-IoU (SN-IoU), was proposed to detect the small and irregularly shaped cotton top buds. The SN-IoU was combined with the Shape-IoU. The geometric constraints (e.g., aspect ratio and scale) of bounding boxes were incorporated with the normalized wasserstein distance (NWD), indicating the similarity between Gaussian-modeled bounding boxes. The localization accuracy was improved on the immature top buds after fusion, particularly under low intersection-over-union (IoU) scenarios. A series of experiments was conducted on a dataset of 5,115 images (expanded by saturation adjustment, noise injection, and angle flipping). The images under diverse lighting and occlusion conditions were collected from the cotton fields in Xinjiang. The improved model was trained on an NVIDIA RTX 4090 GPU with a batch size of 32 and a learning rate of 0.01. Evaluation metrics included the precision (P), recall (R), mAP, parameters, GFLOPs, and inference speed (FPS). DFR-SN-YOLO was compared with several widely-used object detection models, including the YOLO series (v3-v11) for one-stage networks; Faster RCNN, Mask RCNN, and Cascade R-CNN for two-stage networks; DETR; and existing bud recognition models, such as YOLO-cpp and Bud-YOLO. The results show that the DFR-SN-YOLO outperformed the rest in terms of the average detection accuracy (mAP).Compared with the baseline, the meanaverage precision (mAP@50) increased by 3 percentage points to 97.5%, the accuracy of top buds rose by 3.9 percentagepoints to 92.4%, and the recall rate reached 95.0%. This effectively addresses the issue of missed detection of small top buds. Inaddition, the model parameters are only 3.9M. Furthermore, the inference speed reached 37 frames/s when deployed on the edge computing device, Jetson Nano 4GB. The cotton apical buds were accurately identified in the different growth states, and then the number of computation parameters was determined for the high accuracy of the apical bud identification. This work can provide the technical support to the subsequent intelligent mechanical topping of cotton.

       

    /

    返回文章
    返回