An Improved YOLOv5 Model: Application to Mixed Impurities Detection for Walnut Kernels

被引:15
作者
Yu, Lang [1 ]
Qian, Mengbo [1 ]
Chen, Qiang [1 ]
Sun, Fuxing [1 ]
Pan, Jiaxuan [1 ]
机构
[1] Zhejiang A&F Univ, Coll Opt Mech & Elect Engn, Hangzhou 311300, Peoples R China
关键词
YOLOv5; walnut kernels; impurities detection; small object detection; FOOD;
D O I
10.3390/foods12030624
中图分类号
TS2 [食品工业];
学科分类号
0832 ;
摘要
Impurity detection is an important link in the chain of food processing. Taking walnut kernels as an example, it is difficult to accurately detect impurities mixed in walnut kernels before the packaging process. In order to accurately identify the small impurities mixed in walnut kernels, this paper established an improved impurities detection model based on the original YOLOv5 network model. Initially, a small target detection layer was added in the neck part, to improve the detection ability for small impurities, such as broken shells. Secondly, the Tansformer-Encoder (Trans-E) module is proposed to replace some convolution blocks in the original network, which can better capture the global information of the image. Then, the Convolutional Block Attention Module (CBAM) was added to improve the sensitivity of the model to channel features, which make it easy to find the prediction region in dense objects. Finally, the GhostNet module is introduced to make the model lighter and improve the model detection rate. During the test stage, sample photos were randomly chosen to test the model's efficacy using the training and test set, derived from the walnut database that was previously created. The mean average precision can measure the multi-category recognition accuracy of the model. The test results demonstrate that the mean average precision (mAP) of the improved YOLOv5 model reaches 88.9%, which is 6.7% higher than the average accuracy of the original YOLOv5 network, and is also higher than other detection networks. Moreover, the improved YOLOv5 model is significantly better than the original YOLOv5 network in identifying small impurities, and the detection rate is only reduced by 3.9%, which meets the demand of real-time detection of food impurities and provides a technical reference for the detection of small impurities in food.
引用
收藏
页数:15
相关论文
共 31 条
  • [1] Aladjadjiyan A., 2006, SAF AGR, V4, P1082
  • [2] Cengil E., 2021, TURK J SCI TECHNOL, V16, P119
  • [3] Automatic sorting of fresh tea leaves using vision-based recognition method
    Chen, Zhiwei
    He, Leiying
    Ye, Yang
    Chen, Jianneng
    Sun, Liang
    Wu, Chuanyu
    Chen, Lin
    Wang, Rongyang
    [J]. JOURNAL OF FOOD PROCESS ENGINEERING, 2020, 43 (09)
  • [4] Analysis of foreign bodies present in European food using data from Rapid Alert System for Food and Feed (RASFF)
    Djekic, Ilija
    Jankovic, Danijela
    Rajkovic, Andreja
    [J]. FOOD CONTROL, 2017, 79 : 143 - 149
  • [5] Du Z., 2020, TOMATO LEAF DIS DETE
  • [6] Strawberry Maturity Recognition Algorithm Combining Dark Channel Enhancement and YOLOv5
    Fan, Youchen
    Zhang, Shuya
    Feng, Kai
    Qian, Kechang
    Wang, Yitong
    Qin, Shangzhi
    [J]. SENSORS, 2022, 22 (02)
  • [7] Garcia-Garcia A., 2017, arXiv, V2017, p1704.06857
  • [8] Glenn J., 2020, YOLOv5. Git Code
  • [9] GhostNet: More Features from Cheap Operations
    Han, Kai
    Wang, Yunhe
    Tian, Qi
    Guo, Jianyuan
    Xu, Chunjing
    Xu, Chang
    [J]. 2020 IEEE/CVF CONFERENCE ON COMPUTER VISION AND PATTERN RECOGNITION (CVPR), 2020, : 1577 - 1586
  • [10] Detection of Cherry Quality Using YOLOV5 Model Based on Flood Filling Algorithm
    Han, Wei
    Jiang, Fei
    Zhu, Zhiyuan
    [J]. FOODS, 2022, 11 (08)