•  
  •  
 

Corresponding Author(s)

张静(1983—),女,郑州西亚斯学院讲师,硕士。E-mail:zhaoqq1124@163.com

Abstract

[Objective] To address the issues of weak generalization, insufficient accuracy, and poor anti-interference ability in existing intelligent detection methods for food packaging defects. [Methods] On the basis of the intelligent sorting system for food packaging defects, a method for intelligent detection of food packaging defects is proposed, which combines machine vision and an improved U-Net model. By introducing a multi-scale residual convolution module into the convolution module, the method reduces the computational complexity of the model and improves the training effect. By integrating channel attention, spatial attention, and multi-scale attention, a lightweight hybrid attention module is constructed to achieve the synergistic effect of different dimensions of attention, strengthen the model’s feature extraction and anti-interference abilities for food packaging defects, and suppress complex background noise. Replacing the max pooling layer in U-Net with soft pooling reduces feature information loss and preserves more defect feature details and edge information. Model training and comparative experiments are conducted by building an experimental platform. [Results] The proposed method has excellent generalization ability in multiple types of food packaging defect detection tasks, with an average detection accuracy of 97.50%, which is 10.3% higher than that of the traditional U-Net model. The detection time for a single image is only 20 ms. The model parameter size is 12.8 M. The missed detection rate is 1.1%, and the false detection rate is 0.5%. [Conclusion] This method effectively addresses the core pain points of existing detection methods, achieving an optimized balance among multi-scale defect detection accuracy, model lightweighting, and real-time performance. It can quickly and accurately identify and locate food packaging defects.

Publication Date

7-13-2026

First Page

220

Last Page

227

DOI

10.13652/j.spjx.1003.5788.2026.60015

References

[1] ZHANG C X,ZHAO Y S,YANG W D,et al.Computer vision-based deep learning modeling for salmon part segmentation and defect identification [J].Foods,2025,14(20):3 529.
[2] 丛军,李星.基于电子鼻、电子舌技术的荣昌猪肉及其制品贮藏过程新鲜度检测研究 [J].食品安全质量检测学报,2024,15(7):192-201.CONG J,LI X.Detection of freshness of Rongchang pork and its products during storage based on electronic nose and electronic tongue technology [J].Journal of Food Safety & Quality,2024,15(7):192-201.|[3] 孙俊洋,符运来,吕晶,等.基于改进 YOLOv 7模型的海参苗计数方法研究 [J].计算机技术与发展,2024,34(11):166-171.SUN J Y,FU Y L,LYU J,et al.Study on counting method of sea cucumber seedlings based on improved YOLOv 7 model [J].Computer Technology and Development,2024,34(11):166-171.
[4] ERNA K H,ROVINA K,MANTIHAL S.Current detection techniques for monitoring the freshness of meat-based products:a review [J].Journal of Packaging Technology and Research,2021,5(3):127-141.
[5] LIU G Y,ZHANG S,WANG L X,et al.Research on mechanical automatic food packaging defect detection model based on improved YOLOv 5 algorithm [J].PLoS One,2025,20(4):e0321971.
[6] 夏军勇,王康宇,周宏娣.基于改进 Faster R-CNN 的食品包装缺陷检测 [J].食品与机械,2023,39(11):131-136,151.XIA J Y,WANG K Y,ZHOU H D.Food packaging defect detection by improved network model of Faster R-CNN [J].Food & Machinery,2023,39(11):131-136,151.
[7] 顾文娟,魏金,阴艳超,等.基于改进 DeepLabv 3+的番茄图像多类别分割方法 [J].农业机械学报,2023,54(12):261-271.GU W J,WEI J,YIN Y C,et al.Multi-category segmentation method of tomato image based on improved deepLabv 3+[J].Transactions of the Chinese Society for Agricultural Machinery,2023,54(12):261-271.
[8] KAUKAB S,KOMAL,GHODKI B M,et al.Improving real-time apple fruit detection:multi-modal data and depth fusion with non-targeted background removal [J].Ecological Informatics,2024,82:102691.
[9] YANG L,ZHANG J K,QUAN X Y,et al.Semantics-adaptive multitask defect detection in vacuum packaging [J].IEEE Transactions on Instrumentation and Measurement,2025,74:5028914.
[10] 王静蕾,赵英杰,李峰,等.基于改进 YOLOv 10的盒装食品生产线包装缺陷检测方法 [J].食品与机械,2025,41(4):236-241.WANG J L,ZHAO Y J,LI F,et al.Packaging defect detection method for boxed food production line based on improved YOLOv 10[J].Food & Machinery,2025,41(4):236-241.
[11] 古莹奎,叶彪彪,郭明健,等.基于改进 RT-DETR 的饼干包装外观缺陷快速检测 [J].食品与机械,2025,41(2):234-241.GU Y K,YE B B,GUO M J,et al.Rapid detection method of biscuit packaging appearance defects based on improved RT-DETR [J].Food & Machinery,2025,41(2):234-241.
[12] 吴昊然,陈晓星,高傲.基于深度卷积神经网络的食品包装缺陷检测算法研究 [J].智能计算机与应用,2023,13(3):10-15.WU H R,CHEN X X,GAO A.Research on food packaging defect detection algorithm based on deep convolutional neural network [J].Intelligent Computer and Applications,2023,13(3):10-15.
[13] 康明月,王成,孙鸿雁,等.基于改进的 WOA-LSSVM 樱桃番茄内部品质检测方法研究 [J].光谱学与光谱分析,2023,43(11):3 541-3 550.KANG M Y,WANG C,SUN H Y,et al.Research on internal quality detection method of cherry tomatoes based on improved WOA-LSSVM [J].Spectroscopy and Spectral Analysis,2023,43(11):3 541-3 550.
[14] 胡鹏伟,刘江平,薛河儒,等.BP神经网络结合变量选择方法在牛奶蛋白质含量检测中的应用 [J].光电子·激光,2022,33(1):23-29.HU P W,LIU J P,XUE H R,et al.Application of BP neural network and variable selection method in protein content detection of milk [J].Journal of Optoelectronics Laser,2022,33(1):23-29.
[15] 崔天宇,卢中领,薛琳,等.基于近红外反射光谱的番茄糖分快速检测模型研究 [J].光谱学与光谱分析,2023,43(4):1 218-1 224.CUI T Y,LU Z L,XUE L,et al.Research on the rapid detection model of tomato sugar based on near-infrared reflectance spectroscopy [J].Spectroscopy and Spectral Analysis,2023,43(4):1 218-1 224.
[16] 刘达,朱兆优,叶海鹏,等.基于改进 YOLOv 5的酒瓶缺陷检测方法研究 [J].机电工程技术,2024,53(3):211-215.LIU D,ZHU Z Y,YE H P,et al.Research on defect detection method for wine bottles based on improved YOLOv 5[J].Mechanical & Electrical Engineering Technology,2024,53(3):211-215.
[17] 沈海军,张汤磊,许振兴,等.基于 Fisher判别分析对苹果新鲜度的识别研究 [J].食品工业科技,2023,44(4):361-368.SHEN H J,ZHANG T L,XU Z X,et al.Recognition of apple freshness based on fisher discriminant analysis [J].Science and Technology of Food Industry,2023,44(4):361-368.
[18] 陈卫东,刘超,王莹,等.基于机器视觉的食品瓶罐包装缺陷检测研究进展 [J].粮油食品科技,2024,32(4):185-191.CHEN W D,LIU C,WANG Y,et al.Research progress on inspecting food bottle and can packaging shortcomings based on machine vision [J].Science and Technology of Cereals,Oils and Foods,2024,32(4):185-191.
[19] 杨明旭,张俊宁,张志强,等.基于改进 YOLOv 8的药片泡罩包装缺陷检测算法 [J].包装工程,2025,46(1):145-154.YANG M X,ZHANG J N,ZHANG Z Q,et al.Defect detection algorithm of pharmaceutical blister package based on improved YOLOv 8[J].Packaging Engineering,2025,46(1):145-154.
[20] 文韬,代兴勇,李浪,等.基于机器视觉与光谱融合的柑橘品质无损检测分级系统设计与试验 [J].江苏大学学报 (自然科学版 ),2024,45(1):38-45.WEN T,DAI X Y,LI L,et al.Design and experiment of non-destructive testing and grading system for citrus quality based on machine vision and spectral fusion [J].Journal of Jiangsu University (Natural Science Edition ),2024,45(1):38-45.

Share

COinS
 
 

To view the content in your browser, please download Adobe Reader or, alternately,
you may Download the file to your hard drive.

NOTE: The latest versions of Adobe Reader do not support viewing PDF files within Firefox on Mac OS and if you are using a modern (Intel) Mac, there is no official plugin for viewing PDF files within the browser window.