Liang Ziheng, Zhu Tingting, Teng Guang, Zhang Yajun, Gu Zhe
College of Mechanical and Electronic Engineering, Nanjing Forestry University, Nanjing 210037, China.
College of Agricultural Science and Engineering, Hohai University, No. 1 Xikang Road, Nanjing 210098, China.
Foods. 2025 Jul 17;14(14):2513. doi: 10.3390/foods14142513.
With the advancement of automation in modern agriculture, the demand for intelligence in the post-picking sorting of fruits and vegetables is increasing. As a significant global agricultural product, the defect detection and sorting of tomato is essential to ensure quality and improve economic value. However, the traditional detection method (manual screening) is inefficient and involves high labor intensity. Therefore, a defect detection model named YOLO-RGDD is proposed based on YOLOv12s to identify five types of tomato surface defects (scars, gaps, white spots, spoilage, and dents). Firstly, the original C3k2 module and A2C2f module of YOLOv12 were replaced with RFEM in the backbone network to enhance feature extraction for small targets without increasing computational complexity. Secondly, the Dysample-Slim-Neck of the YOLO-RGDD was developed to reduce the computational complexity and enhance the detection of minor defects. Finally, dynamic convolution was used to replace the conventional convolution in the detection head in order to reduce the model parameter count. The experimental results show that the average precision, recall, and F1-score of the proposed YOLO-RGDD model for tomato defect detection reach 88.5%, 85.7%, and 87.0%, respectively, surpassing advanced object recognition detection algorithms. Additionally, the computational complexity of the YOLO-RGDD is 16.1 GFLOPs, which is 24.8% lower than that of the original YOLOv12s model (21.4 GFLOPs), facilitating the model's deployment in automated agricultural production.
随着现代农业自动化的发展,水果和蔬菜采后分拣的智能化需求日益增加。作为全球重要的农产品,番茄的缺陷检测和分拣对于保证质量和提高经济价值至关重要。然而,传统的检测方法(人工筛选)效率低下且劳动强度大。因此,基于YOLOv12s提出了一种名为YOLO-RGDD的缺陷检测模型,用于识别五种类型的番茄表面缺陷(疤痕、缺口、白点、腐烂和凹痕)。首先,在主干网络中用RFEM替换了YOLOv12的原始C3k2模块和A2C2f模块,以增强对小目标的特征提取,同时不增加计算复杂度。其次,开发了YOLO-RGDD的Dysample-Slim-Neck,以降低计算复杂度并增强对微小缺陷的检测。最后,在检测头中使用动态卷积替换传统卷积,以减少模型参数数量。实验结果表明,所提出的YOLO-RGDD模型用于番茄缺陷检测的平均精度、召回率和F1分数分别达到88.5%、85.7%和87.0%,超过了先进的目标识别检测算法。此外,YOLO-RGDD的计算复杂度为16.1 GFLOPs,比原始YOLOv12s模型(21.4 GFLOPs)低24.8%,便于该模型在自动化农业生产中的部署。