高级检索+

面向复杂田间图像的轻量化玉米穗计数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,综合性能优于对比算法。检测精度和计数性能方面均显著优于 Faster R-CNN、YOLOv5/v8-L、SSD、DETR 及原始 RT-DETR 等主流模型。该模型可部署于NVIDIA Jetson Xavier NX嵌入式平台,在无人机飞行高度变化和玉米发育过程中F1分数均超过92%,可为无人机平台下的玉米穗在线检测与产量估算提供技术支持。

     

    Abstract: Maize tassel detection and counting are often required in unmanned aerial vehicle (UAV) imagery. However, the challenges remain in dense target distributions, pronounced scale variation, overlap, occlusion, and complex field backgrounds. In this study, a lightweight adaptive sparse attention-enhanced detection transformer (AS-DETR) was developed to increase detection and counting accuracy, thus reducing computational demand and real-time inference on embedded hardware. A systematic evaluation was also conducted to determine whether the resulting detector remained reliable under illumination, image degradation, maize growth stages, and flight altitudes. Thereby it was required for the accuracy, robustness, efficiency, and deployment in aerial field monitoring. A dataset of 2,461 red, green, and blue (RGB) UAV images with 110,745 annotated tassel bounding boxes was assembled from four public sources and images collected in Tongliao, Inner Mongolia, China. Region-independent training, validation, and test subsets contained 1,722, 247, and 492 images, respectively. Illumination, occlusion, density, and noise augmentation expanded the training set into 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 retrained uniformly. 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% over 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 ASSA and SEFN were combined to raise the average precision at the 0.50 threshold from 92.6% to 94.9%; Lightweight convolution and cross-scale concatenation increased to 95.6%; Cross-stage multiscale aggregation produced the final 96.3%. In 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 3.55 tassels by RT-DETR and 3.92 tassels by the best-performing competing one-stage detector. The lightweight redesign reduced computation from 190.2 to 120.1 billion floating-point operations, where the trainable parameters decreased from 38.7 to 35.5 million, while inference speed increased from 56.2 to 62.1 frames per second. Average precision at the 0.50 threshold remained 94.3% and 91.1%, respectively, under morning and nighttime low-illumination. Average precision at the 0.75 threshold reached 69.5% and 68.3% under focus and motion blur, respectively, exceeding the RT-DETR values 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% over the grain-filling and maturity stages, with flight altitudes of 6, 10, and 15 m. Thus, the model maintained stable detection when tassel size decreased, and scene density increased with flight altitude. 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, whereas detection accuracy and inference increased to retain robustness under illumination, blur, developmental-stage, and altitude changes. The embedded tests confirmed that the high accuracy and efficiency fully met the requirements of edge deployment, reliable maize tassel monitoring, and yield-estimation data acquisition from UAV platforms in complex field environments.

     

/

返回文章
返回