高级检索+

面向复杂田间图像的轻量化玉米穗计数AS-DETR模型

Lightweight AS-DETR Model for Maize Tassel Counting in Complex Field Images

  • 摘要: 针对无人机航拍图像中玉米密植场景下,玉米穗目标密集分布、尺度差异显著及背景复杂等问题,该研究提出一种基于轻量化 RT-DETR 框架的改进模型——AS-DETR(adaptive sparse attention-enhanced detection transformer),应用于玉米穗的高精度计数和检测任务。首先,结合 GSConv 与 ZoomCat 构建轻量化特征提取与跨尺度融合单元,保证检测精度的同时降低模型参数量与计算复杂度;其次,引入自适应稀疏注意力与通道特征增强相结合的 ASSA-SEFN 模块,通过空间与通道双维度特征建模,强化小目标和密集目标的检测能力;最后,采用 VoVGSCSP 多尺度融合结构,提升不同尺度特征的一致性表达,缓解目标重叠和遮挡带来的性能损失。对比试验结果表明,改进模型在自建玉米穗数据集上AP50为 96.3%,平均绝对误差(MAE)2.89。高AP50体现优异检测识别能力,低MAE表明玉米穗相关预测结果误差低,综合性能优于对比算法。检测精度和计数性能方面均显著优于 Faster R-CNN、YOLOv5/v8-L、SSD、DETR 及原始 RT-DETR 等主流模型。该模型可部署于NVIDIA Jetson Xavier NX嵌入式平台,在无人机飞行高度变化和玉米发育过程中F1分数均超过92%,为无人机平台下的玉米穗在线检测与产量估算提供技术支持。

     

    Abstract: To improve maize tassel detection and counting in unmanned aerial vehicle (UAV) imagery affected by dense target distributions, pronounced scale variation, overlap, occlusion, and complex field backgrounds, this study developed a lightweight adaptive sparse attention-enhanced detection transformer (AS-DETR). The work aimed to increase detection and counting accuracy while reducing computational demand and preserving real-time inference on embedded hardware. It also evaluated whether the resulting detector remained reliable across illumination changes, image degradation, maize growth stages, and flight altitudes, thereby addressing the requirements of accuracy, robustness, efficiency, and deployability in aerial field monitoring. A dataset of 2,461 red, green, and blue (RGB) UAV images containing 110,745 annotated tassel bounding boxes was assembled from four public sources and images collected in Tongliao, Inner Mongolia. Region-independent training, validation, and test subsets contained 1,722, 247, and 492 images, respectively, and illumination, occlusion, density, and noise augmentation expanded the training set to 10,332 images. The real-time detection transformer (RT-DETR) neck was modified with lightweight hybrid convolution, cross-scale alignment and concatenation, adaptive sparse self-attention (ASSA), a spatially enhanced feed-forward network (SEFN), and cross-stage multiscale feature aggregation. Comparison models were uniformly retrained. In the unified test, AS-DETR achieved average precision values of 96.3% at an intersection-over-union threshold of 0.50, 74.8% at a threshold of 0.75, and 68.6% across thresholds from 0.50 to 0.95. These values exceeded those of the original RT-DETR by 3.7, 2.6, and 3.3 percentage points, respectively. Small-object average precision increased from 38.5% to 41.8%, while medium- and large-object average precision reached 58.3% and 72.5%. Ablation experiments showed that combining ASSA and SEFN raised average precision at the 0.50 threshold from 92.6% to 94.9%; adding lightweight convolution and cross-scale concatenation increased it to 95.6%; and cross-stage multiscale aggregation produced the final 96.3%. For counting, AS-DETR yielded a mean absolute error of 2.89 tassels, a root mean square error of 4.35 tassels, a mean absolute percentage error of 6.8%, and a coefficient of determination of 0.966. The mean absolute error was lower than the 3.55 tassels obtained by RT-DETR and the 3.92 tassels obtained by the best-performing competing one-stage detector. The lightweight redesign reduced computation from 190.2 billion to 120.1 billion floating-point operations and reduced trainable parameters from 38.7 million to 35.5 million, while increasing inference speed from 56.2 to 62.1 frames per second. Under morning and nighttime low-illumination conditions, average precision at the 0.50 threshold remained 94.3% and 91.1%, respectively. Under focus blur and motion blur, average precision at the 0.75 threshold reached 69.5% and 68.3%, exceeding the corresponding RT-DETR results by 3.2 and 2.9 percentage points. Deployment on an NVIDIA Jetson Xavier NX embedded platform showed F1 scores from 92.4% to 97.4% across the grain-filling and maturity stages and flight altitudes of 6, 10, and 15 metres. Thus, the model maintained stable detection when tassel size decreased and scene density increased with flight altitude. The results demonstrated that the coordinated use of sparse spatial attention, local spatial enhancement, lightweight feature mapping, and bidirectional multiscale aggregation improved small and densely distributed tassel representation without imposing excessive computation. AS-DETR simultaneously reduced counting error, increased detection accuracy, accelerated inference, and retained robustness under illumination, blur, developmental-stage, and altitude changes. The embedded tests confirmed that the model satisfied the accuracy and efficiency requirements of edge deployment and supported reliable maize tassel monitoring and yield-estimation data acquisition from UAV platforms in complex field environments.

     

/

返回文章
返回