欢迎您访问《智慧农业(中英文)》官方网站! English

Smart Agriculture

• •    

基于改进RT-DETR的棉花成熟度检测算法

史绮梦, 汪军(), 徐晓峰, 张玮逸   

  1. 安徽工程大学 计算机与信息学院,安徽 芜湖 241000,中国
  • 收稿日期:2025-12-12 出版日期:2026-03-13
  • 基金项目:
    国家自然科学基金(62406004); 安徽高校协同创新项目(GXXT-2019-020)
  • 作者简介:

    史绮梦,硕士研究生,研究方向为深度学习与目标检测,E-mail:

  • 通信作者:
    汪 军,教授,研究方向为智能感知、图像处理与模式识别,E-mail:

Cotton Maturity Detection Algorithm Based on Improved RT-DETR

SHI Qimeng, WANG Jun(), XU Xiaofeng, ZHANG Weiyi   

  1. School of Computer and Information Science, Anhui Polytechnic University, Wuhu 241000, China
  • Received:2025-12-12 Online:2026-03-13
  • Foundation items:National Natural Science Foundation of China(62406004); Collaborative Innovation Project of Anhui Higher Education Institutions(GXXT-2019-020)
  • About author:

    SHI Qimeng, E-mail:

  • Corresponding author:
    WANG Jun, E-mail:

摘要:

【目的/意义】 为满足棉花不同生育阶段对水肥需求差异化调控的需求,实现生长过程的精细化管理,提出一种高精确率、轻量化的棉花成熟度视觉检测算法,为田间管理提供技术支持。 【方法】 基于实时检测Transformer模型,构建棉花成熟度检测模型(Cotton Maturity-Detection Transformer, CM-DETR)。首先,在主干网络中引入重参数化分组卷积空间增强轻量注意力网络模块,融合渐进式卷积与可重参数化卷积,平衡模型轻量化与特征表达能力;其次,构建深度鲁棒特征下采样模块,通过多尺度特征融合增强小目标及细微成熟特征感知;最后,采用聚焦式完整交并比损失函数,提高样本不平衡条件下的定位精度。 【结果和讨论】 CM-DETR模型在平均精度阈值为0.5时达到了80.8%、平均精度在阈值为0.5到0.95时达到51.1%,相比于基准模型分别提升3.7和1.8个百分点,同时模型参数量和计算量分别下降了31.7%和22.8%。 【结论】 研究表明,CM-DETR兼顾高精度与轻量化特性,可为棉花生产过程中的水肥精准调控与最佳采收时机判定提供可靠的技术支持。

关键词: 棉花成熟度, RT-DETR, 目标检测, RGCSPELAN, DRFD, Focaler-CIoU损失函数

Abstract:

[Objective] In the context of computer vision applications in agriculture, achieving precision management of cotton growth requires addressing the significant differences in water and fertilizer demands across various developmental stages. Cotton maturity assessment is a vital task in precision agriculture, playing a crucial role in supporting timely irrigation, fertilization, and harvesting decisions. However, traditional monitoring approaches are time-consuming and labor-intensive, and current deep learning-based models often struggle to effectively recognize cotton bolls at varying maturity stages, especially in complex field environments with dense foliage, occlusion, and illumination changes. To address these challenges, a high-accuracy and lightweight computer vision model was proposed for cotton maturity detection. The model can provide reliable technical support for precise water and fertilizer regulation and quality enhancement in cotton production. [Methods] An enhanced detection framework named Cotton Maturity-Detection Transformer (CM-DETR) was proposed, based on an improved RT-DETR architecture. CM-DETR incorporated three core architectural innovations that significantly improve both detection accuracy and computational efficiency. First, to construct a lightweight and efficient backbone, a novel feature extraction module named RGCSPELAN (Re-parameterized Group Convolution Spatial Enhancement Lightweight Attention Network) was introduced. This module integrated Progressive Convolution, which captured hierarchical and local contextual features, with Re-parameterized Convolution (RepConv), which reduced computational complexity during inference by transforming multi-branch structures into a single-path representation. The combination effectively enhanced the model's feature representation capabilities and gradient propagation while minimizing the number of parameters and FLOPs. Furthermore, RGCSPELAN was designed with a scalable architecture, allowing its computational capacity to be adjusted via a scaling factor. This ensured compatibility with both small and large models, facilitating flexible deployment across resource-constrained edge devices and high-performance systems alike. Second, to address the issue of small target feature loss, a new module termed Deep Robust Feature Downsampling (DRFD) was proposed. DRFD emploied a multi-scale feature fusion strategy by integrating multiple downsampling branches (e.g., convolutional, cut-based, and max-pooling pathways). This design enabled the model to retain fine-grained spatial details while expanding its receptive field. Third, the original loss function in RT-DETR was replaced with Focaler-CIoU, and an adaptive regression optimization strategy integrating sample reweighting and geometric constraints was implemented to improve bounding box localization under complex conditions. [Results and Discussions] Experimental results demonstrated that CM-DETR achieved mAP50 and mAP50-95 scores of 80.8% and 51.1%, respectively, outperforming the baseline model by 3.7 and 1.8 percentage points. Meanwhile, CM-DETR reduced the parameter count and computational cost by 31.7% and 22.8%, respectively, indicating a favorable trade-off between detection accuracy and model efficiency. The incorporation of the DRFD module enhanced the model's sensitivity to small and subtly distinct features related to cotton maturity, improved robustness under diverse field conditions, and enabled more precise detection of cotton bolls at different growth stages. Moreover, the optimized regression strategy contributed to more stable bounding box prediction performance in scenarios involving occlusion, scale variation, and dense foliage. Overall, the proposed architectural improvements effectively strengthened feature representation capability while maintaining lightweight characteristics, thereby demonstrating practical applicability in real-time agricultural environments. [Conclusions] In conclusion, the proposed CM-DETR model provides a efficient, and scalable solution for automated cotton maturity detection. By enhancing multi-stage feature recognition, improving small-target sensitivity, and reducing the demand on computational resources, CM-DETR serves as a reliable tool for intelligent decision-making in precision agriculture. Its practical deployment can support more accurate timing for irrigation, fertilization, and harvesting, thereby contributing to improved crop management and yield optimization.

Key words: cotton maturity, RT-DETR, object detection, RGCSPELAN, DRFD, Focaler-CIoU loss function

中图分类号: