Jiale Lei, Weiqiang Zheng, Liping Zhang, Wentao Lv, Yihao Li
{"title":"通过改进的 YOLOv5 和 X 射线成像检测核桃内部质量","authors":"Jiale Lei, Weiqiang Zheng, Liping Zhang, Wentao Lv, Yihao Li","doi":"10.1111/jfpe.14742","DOIUrl":null,"url":null,"abstract":"<div>\n \n \n <section>\n \n <p>This study proposes a walnut target detection algorithm based on improved YOLOv5 and x-ray imaging to meet the demand for internal quality detection and removal in the Xinjiang walnut industry. By replacing the C3 module in the backbone layer with the C2f module and the couple-head in the head layer with the decouple-head, the algorithm reduces computational complexity, enhances robustness and generalizability, and retains more spatial information, thereby improving the performance of multicategory small target detection. In addition, this paper replaces the original CIOU loss function with the EIOU loss function to improve the convergence speed of the algorithm's accuracy and boundary aspect ratio. Compared with the original model, the improved model, improved YOLOv5, maintains the same average precision for normal walnuts while increasing the average precision for shriveled walnuts and empty-shell walnuts by 8.2% and 0.4%, respectively. Compared with other mainstream models, such as VGG16, ResNet50, YOLOv5s, YOLOv7, YOLOv8s, YOLOv9s, and YOLOv10s, this model achieves the highest detection accuracy and good detection performance, with a single-image detection time of 11.9 ms, meeting the requirements for real-time detection. This work lays a foundation for automatic robot detection of the internal quality and removal of walnuts, showing practical application potential.</p>\n </section>\n \n <section>\n \n <h3> Practical applications</h3>\n \n <p>Xinjiang stands as a prominent producer of walnuts; however, due to the decentralized nature of its cultivation and management processes, a notable prevalence of internal empty shells and shrinkage is observed, which substantially diminishes their commercial value. The integration of YOLOv5 with x-ray imaging technology promises to enhance the precision of internal quality assessments of walnuts. The improved YOLOv5 model, as delineated in this study, exhibits the highest detection accuracy when benchmarked against a multitude of other models. It achieves a detection latency of merely 11.9 ms per image, thereby satisfying the stringent demands for real-time detection applications. This model is designed for integration into x-ray systems with an adjunctive sorting mechanism, which facilitates the inspection and exclusion of defective walnuts on conveyor belts.</p>\n </section>\n </div>","PeriodicalId":15932,"journal":{"name":"Journal of Food Process Engineering","volume":"47 10","pages":""},"PeriodicalIF":2.7000,"publicationDate":"2024-10-23","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"0","resultStr":"{\"title\":\"Detection of walnut internal quality via improved YOLOv5 and x-ray imaging\",\"authors\":\"Jiale Lei, Weiqiang Zheng, Liping Zhang, Wentao Lv, Yihao Li\",\"doi\":\"10.1111/jfpe.14742\",\"DOIUrl\":null,\"url\":null,\"abstract\":\"<div>\\n \\n \\n <section>\\n \\n <p>This study proposes a walnut target detection algorithm based on improved YOLOv5 and x-ray imaging to meet the demand for internal quality detection and removal in the Xinjiang walnut industry. By replacing the C3 module in the backbone layer with the C2f module and the couple-head in the head layer with the decouple-head, the algorithm reduces computational complexity, enhances robustness and generalizability, and retains more spatial information, thereby improving the performance of multicategory small target detection. In addition, this paper replaces the original CIOU loss function with the EIOU loss function to improve the convergence speed of the algorithm's accuracy and boundary aspect ratio. Compared with the original model, the improved model, improved YOLOv5, maintains the same average precision for normal walnuts while increasing the average precision for shriveled walnuts and empty-shell walnuts by 8.2% and 0.4%, respectively. Compared with other mainstream models, such as VGG16, ResNet50, YOLOv5s, YOLOv7, YOLOv8s, YOLOv9s, and YOLOv10s, this model achieves the highest detection accuracy and good detection performance, with a single-image detection time of 11.9 ms, meeting the requirements for real-time detection. This work lays a foundation for automatic robot detection of the internal quality and removal of walnuts, showing practical application potential.</p>\\n </section>\\n \\n <section>\\n \\n <h3> Practical applications</h3>\\n \\n <p>Xinjiang stands as a prominent producer of walnuts; however, due to the decentralized nature of its cultivation and management processes, a notable prevalence of internal empty shells and shrinkage is observed, which substantially diminishes their commercial value. The integration of YOLOv5 with x-ray imaging technology promises to enhance the precision of internal quality assessments of walnuts. The improved YOLOv5 model, as delineated in this study, exhibits the highest detection accuracy when benchmarked against a multitude of other models. It achieves a detection latency of merely 11.9 ms per image, thereby satisfying the stringent demands for real-time detection applications. This model is designed for integration into x-ray systems with an adjunctive sorting mechanism, which facilitates the inspection and exclusion of defective walnuts on conveyor belts.</p>\\n </section>\\n </div>\",\"PeriodicalId\":15932,\"journal\":{\"name\":\"Journal of Food Process Engineering\",\"volume\":\"47 10\",\"pages\":\"\"},\"PeriodicalIF\":2.7000,\"publicationDate\":\"2024-10-23\",\"publicationTypes\":\"Journal Article\",\"fieldsOfStudy\":null,\"isOpenAccess\":false,\"openAccessPdf\":\"\",\"citationCount\":\"0\",\"resultStr\":null,\"platform\":\"Semanticscholar\",\"paperid\":null,\"PeriodicalName\":\"Journal of Food Process Engineering\",\"FirstCategoryId\":\"97\",\"ListUrlMain\":\"https://onlinelibrary.wiley.com/doi/10.1111/jfpe.14742\",\"RegionNum\":3,\"RegionCategory\":\"农林科学\",\"ArticlePicture\":[],\"TitleCN\":null,\"AbstractTextCN\":null,\"PMCID\":null,\"EPubDate\":\"\",\"PubModel\":\"\",\"JCR\":\"Q3\",\"JCRName\":\"ENGINEERING, CHEMICAL\",\"Score\":null,\"Total\":0}","platform":"Semanticscholar","paperid":null,"PeriodicalName":"Journal of Food Process Engineering","FirstCategoryId":"97","ListUrlMain":"https://onlinelibrary.wiley.com/doi/10.1111/jfpe.14742","RegionNum":3,"RegionCategory":"农林科学","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"Q3","JCRName":"ENGINEERING, CHEMICAL","Score":null,"Total":0}
Detection of walnut internal quality via improved YOLOv5 and x-ray imaging
This study proposes a walnut target detection algorithm based on improved YOLOv5 and x-ray imaging to meet the demand for internal quality detection and removal in the Xinjiang walnut industry. By replacing the C3 module in the backbone layer with the C2f module and the couple-head in the head layer with the decouple-head, the algorithm reduces computational complexity, enhances robustness and generalizability, and retains more spatial information, thereby improving the performance of multicategory small target detection. In addition, this paper replaces the original CIOU loss function with the EIOU loss function to improve the convergence speed of the algorithm's accuracy and boundary aspect ratio. Compared with the original model, the improved model, improved YOLOv5, maintains the same average precision for normal walnuts while increasing the average precision for shriveled walnuts and empty-shell walnuts by 8.2% and 0.4%, respectively. Compared with other mainstream models, such as VGG16, ResNet50, YOLOv5s, YOLOv7, YOLOv8s, YOLOv9s, and YOLOv10s, this model achieves the highest detection accuracy and good detection performance, with a single-image detection time of 11.9 ms, meeting the requirements for real-time detection. This work lays a foundation for automatic robot detection of the internal quality and removal of walnuts, showing practical application potential.
Practical applications
Xinjiang stands as a prominent producer of walnuts; however, due to the decentralized nature of its cultivation and management processes, a notable prevalence of internal empty shells and shrinkage is observed, which substantially diminishes their commercial value. The integration of YOLOv5 with x-ray imaging technology promises to enhance the precision of internal quality assessments of walnuts. The improved YOLOv5 model, as delineated in this study, exhibits the highest detection accuracy when benchmarked against a multitude of other models. It achieves a detection latency of merely 11.9 ms per image, thereby satisfying the stringent demands for real-time detection applications. This model is designed for integration into x-ray systems with an adjunctive sorting mechanism, which facilitates the inspection and exclusion of defective walnuts on conveyor belts.
期刊介绍:
This international research journal focuses on the engineering aspects of post-production handling, storage, processing, packaging, and distribution of food. Read by researchers, food and chemical engineers, and industry experts, this is the only international journal specifically devoted to the engineering aspects of food processing. Co-Editors M. Elena Castell-Perez and Rosana Moreira, both of Texas A&M University, welcome papers covering the best original research on applications of engineering principles and concepts to food and food processes.