Ji Wei, Zhai Kelong, Xu Bo, Wu Jiawen
The School of Electrical and Information Engineering, Jiangsu University, Zhenjiang 212013, China.
The School of Electrical and Information Engineering, Jiangsu University, Zhenjiang 212013, China.
J Food Prot. 2025 Jan 2;88(1):100397. doi: 10.1016/j.jfp.2024.100397. Epub 2024 Nov 5.
To enhance the fast and accurate detection of pollution-free green apples for food safety, this paper uses the DETR network as a framework to propose a new method for pollution-free green apple detection based on a multidimensional feature extraction network and Transformer module. Firstly, an improved DETR network main feature extraction module adopts the ResNet18 network and replaces some residual layers with deformable convolutions (DCNv2), enabling the model to better adapt to pollution-free fruit changes at different scales and angles, while eliminating the impact of microbial contamination on fruit testing; Subsequently, the extended spatial pyramid pooling model (DSPP) and multiscale residual aggregation module (FRAM) are integrated, which help reduce feature noise and minimize the loss of underlying features during the feature extraction process. The fusion of the two modules enhances the model's ability to detect objects of different scales, thereby improving the accuracy of near-color fruit detection. At the same time, in order to solve the problems of slow convergence speed and large calculation amount of the basic network model, the convergence speed of the overall network model is improved by replacing the attention mechanism of Transformer. Experimental results show that compared with the original DETR model, the proposed algorithm has improved in AP, AP50, and AP75 indicators, especially in the AP50 indicator, which has the most obvious improvement reaching a detection accuracy of 97.12%. In the meantime, the trained network model is deployed on the picking robot. Compared with the original DETR network model, its average detection accuracy is as high as 96.58%, and the detection speed is increased by about 51%. Mixed sample detection tests were carried out before and after the model deployment, and the detection rate of the proposed method for nonpolluted fruits reached more than 0.95. enabling the picking robot to efficiently complete the task of picking green apples. The test results show that the algorithm proposed in this article exhibits great potential in the task of detecting pollution-free near-color fruits by the picking robot. It ensures pollution-free fruit picking and the application of AI in food safety.
为提高食品安全中无公害青苹果的快速准确检测,本文以DETR网络为框架,提出一种基于多维特征提取网络和Transformer模块的无公害青苹果检测新方法。首先,改进的DETR网络主特征提取模块采用ResNet18网络,并用可变形卷积(DCNv2)替换部分残差层,使模型能更好地适应不同尺度和角度的无公害水果变化,同时消除微生物污染对水果检测的影响;随后,集成扩展空间金字塔池化模型(DSPP)和多尺度残差聚合模块(FRAM),有助于减少特征噪声并最小化特征提取过程中底层特征的损失。两个模块的融合增强了模型检测不同尺度物体的能力,从而提高近色水果检测的准确性。同时,为解决基础网络模型收敛速度慢和计算量大的问题,通过替换Transformer的注意力机制提高了整体网络模型的收敛速度。实验结果表明,与原始DETR模型相比,所提算法在AP、AP50和AP75指标上均有提升,尤其是在AP50指标上提升最为明显,检测准确率达到97.12%。同时,将训练好的网络模型部署在采摘机器人上。与原始DETR网络模型相比,其平均检测准确率高达96.58%,检测速度提高了约51%。在模型部署前后进行了混合样本检测试验,所提方法对无污染水果的检测率达到0.95以上,使采摘机器人能够高效完成青苹果采摘任务。测试结果表明,本文提出的算法在采摘机器人检测无公害近色水果任务中具有很大潜力。它确保了无公害水果采摘以及人工智能在食品安全中的应用。