高级检索+

基于改进RT-DETR的复杂环境下的桑葚成熟度检测

Detecting mulberry ripeness in complex field using an improved RT-DETR

  • 摘要: 针对自然田间环境中桑葚果实体积小、密集成串、生长遮挡和光照变化导致的成熟度识别困难,该研究提出一种基于改进RT-DETR的桑葚成熟度实时检测模型RT-DETR-MR。首先,设计空间边缘增强前馈网络(spatial edge enhanced feedforward network, SEEFN),通过三路协同增强局部与边缘的建模能力,提升模型对不同成熟阶段桑葚的可分性与稳健性。其次,引入软最近邻插值(soft nearest neighbor interpolation, SNI)提升上采样的特征稳定性;引入分组混洗增强卷积模块(grouped shuffle convolution enhanced, GSConvE)增强下采样跨层交互;最后结合低参数化的细节保持上下文融合模块(detail-preserving contextual fusion, DPCF)实现跨尺度特征融合,提升模型对中小尺度目标的特征提取质量与抗噪性能。试验结果表明,RT-DETR-MR在平均检测精度AP50和AP50-95分别达到89.4%和65.9%,较原模型提升2.7和1.9个百分点,推理速度达到127.4帧/s;在复杂光照场景和密集遮挡场景下,其AP50-95分别达到68.3%和64.2%。所提模型可为复杂田间环境下桑葚成熟度实时检测及智能化采收与分级提供技术参考。

     

    Abstract: Accurate detection of mulberry ripeness is often required for mechanical harvesting and grading. However, field images are confined to dense fruit clusters, mutual occlusion, large variations in illumination, and subtle appearance differences between adjacent ripeness stages. Feature representation can be weakened causing missed detections or category confusion, especially for small and medium-sized fruits. In this study, an improved real-time detection transformer (RT-DETR) model was developed to detect four-stage mulberry ripeness in complex field environments. A dataset of 1,585 valid images was collected at different distances under various lighting and occlusions. The mulberries were annotated as unripe, turning, ripe, or overripe. The image datasets were divided into 1,268 training images and 317 test images. After data augmentation, the training set contained 4,068 images and 20,017 bounding-box annotations. Four complementary improvements were introduced into the baseline network. (1) A spatial edge-enhanced feedforward network (SEEFN) was designed to combine spatial, local, and edge information, thereby strengthening the representation of fruit boundaries and fine textures. (2) Soft nearest neighbor interpolation (SNI) was applied during upsampling to reduce feature distortion for the high consistency of information transferred across scales. (3) Grouped shuffle convolution enhanced (GSConvE) was introduced during downsampling to promote feature interaction with the lightweight structure. (4) A detail-preserving contextual fusion (DPCF) module was used to combine fine local features with high-level contextual information. These modules formed a multiscale feature enhancement and fusion framework intended to improve the detection of small, overlapping, and partially occluded mulberries. The improved model was evaluated to compare with representative object detectors using ablation experiments. Field tests were conducted under lighting interference and dense occlusion. Precision-recall curves, detection visualizations, and attention heatmaps were collected after the test. On the complete test set, RT-DETR-MR achieved an average precision at an intersection-over-union threshold of 0.50 (AP50) of 89.4% and an average precision over intersection-over-union thresholds from 0.50 to 0.95 (AP50-95) of 65.9%, which outperformed the baseline RT-DETR by 2.7 and 1.9 percentage points, respectively. The average precisions reached 33.8% and 61.4% for small and medium-sized objects, indicating improvements of 3.4 and 2.5 percentage points over the baseline. Ablation results confirmed that the best overall performance was achieved using the four improvements in boundary enhancement, multiscale information transfer, and feature fusion. Compared with YOLOv11m, AP50-95 and the average precision of RT-DETR-MR improved by 2.0 and 0.9 percentage points, respectively, for small objects. The improved model contained 21.2 million parameters and 58.8 billion floating-point operations. An inference speed of 127.4 frames per second was achieved with high accuracy without a substantial increase in computational cost. Under lighting interference, RT-DETR-MR achieved AP50 and AP50-95 values of 90.6% and 68.3%, respectively. Under dense occlusion, the corresponding values were 85.9% and 64.2%, respectively. In both scenarios, the improved model outperformed the baseline RT-DETR and YOLOv11m. The detection and attention heatmaps showed that RT-DETR-MR focused more consistently on mulberry regions, thus suppressing interference from leaves, branches, highlights, and cluttered backgrounds. Missed detections were reduced for the densely distributed small fruits. It also alleviated confusion between ripe and overripe mulberries with similar colors. The feature enhancement and fusion strategy improved the accuracy and stability of four-stage mulberry ripeness detection with real-time performance. RT-DETR-MR therefore provided a feasible technical approach for mulberry growth monitoring, mechanical harvesting, and grading in complex field environments, particularly for subsequent deployment on agricultural edge devices.

     

/

返回文章
返回