•  
  •  
 

Corresponding Author(s)

古莹奎(1976—),男,江西理工大学教授,博士。E-mail:guyingkui@163.com

Abstract

[Objective] To address the problems of a large number of parameters and complex calculation of the current real -time detection models for food packaging defects and their difficult deployment on terminal equipment,this study proposes a lightweight model SGHS -DETR based on improved real -time detection transformer (RT-DETR ).[Methods] To reduce model parameters,the ultra -lightweight network StarNet is employed as the feature extraction backbone.Additionally,GELAN,an efficient aggregation module based on gradient path planning,is introduced for feature fusion and preservation of semantic and detail features.Furthermore,the lightweight Haar wavelet downsampling (HWD ) module based on wavelet decomposition is adopted to minimize information loss in features.Moreover,ShapeIoU replaces the loss function to further enhance detection accuracy.[Results] On the biscuit packaging dataset,the average detection accuracy of the SGHS -DETR model reaches 92.6%.Compared to the baseline model,this approach reduces the number of parameters and computational complexity by 65.5% and 72.1%,respectively and also increases detection speed by 74.4%.[Conclusion] The SGHS -DETR model can rapidly and effectively detect appearance defects in biscuit packaging.

Publication Date

4-3-2025

First Page

234

Last Page

241

DOI

10.13652/j.spjx.1003.5788.2024.80731

References

[1] 戈明辉,张俊,陆慧娟.基于机器视觉的食品外包装缺陷检测算法研究进展 [J].食品与机械,2023,39(9):95-102,116.GE M H,ZHANG J,LU H J.Research progress of food packaging defect detection based on machine vision [J].Food & Machinery,2023,39(9):95-102,116.
[2] XIAO Z F,WANG J L,HAN L,et al.Application of machine vision system in food detection [J].Frontiers in Nutrition,2022,9:888245.
[3] 李丹,白国君,金媛媛,等.基于机器视觉的包装袋缺陷检测算 法 研 究 与 应 用 [J].激 光 与 光 电 子 学 进 展,2019,56(9):188-194.LI D,BAI G J,JIN Y Y,et al.Machine-vision based defect detection algorithm for packaging bags [J].Laser & Optoelectronics Progress,2019,56(9):188-194.
[4] HE Y F,FAN B J,SUN L,et al.Rapid appearance quality of rice based on machine vision and convolutional neural network research on automatic detection system [J].Frontiers in Plant Science,2023,14:1190591.
[5] 肖斌,杨涛,梅艳莹.基于分块特征匹配的纸箱缺陷检测方法[J].传感器与微系统,2020,39(9):138-141.XIAO B,YANG T,MEI Y Y.Defect detection method of carton based on block feature matching [J].Transducer and Microsystem Technologies,2020,39(9):138-141.
[6] 张宝胜,周聪玲,王永强.基于机器视觉的透明包装袋真空封口纹理缺陷检测方法 [J].食品与机械,2023,39(7):111-118.ZHANG B S,ZHOU C L,WANG Y Q.Method for detecting texture defect of vacuum seal of transparent packaging bag based on machine vision [J].Food & Machinery,2023,39(7):111-118.|[7] XIONG K K,LI W S,DONG S,et al.Defect detection of biscuit packaging based on level set map [C]// 2022 15th International Congress on Image and Signal Processing,BioMedical Engineering and Informatics (CISP-BMEI ).Beijing:IEEE,2022:1-7.
[8] LIU Y,ZHANG C S,DONG X J.A survey of real-time surface defect inspection methods based on deep learning [J].Artificial Intelligence Review,2023,56(10):12 131-12 170.
[9] 夏军勇,王康宇,周宏娣.基于改进 Faster R-CNN 的食品包装缺陷检测 [J].食品与机械,2023,39(11):131-136.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.
[10] 陈雪纯,方宇伦,杜世昌,等.基于深度学习的包装缺陷快速检测方法 [J].机械设计与研究,2021,37(6):165-169.CHEN X C,FANG Y L,DU S C,et al.Rapid packaging defect detection method based on deep learning [J].Machine Design & Research,2021,37(6):165-169.
[11] 吴昊然,陈晓星,高傲.基于深度卷积神经网络的食品包装缺 陷 检 测 算 法 研 究 [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.
[12] ZHAO Y A,LV W Y,XU S L,et al.Detrs beat yolos on real-time object detection [C]// 2024 IEEE/CVF Conference on Computer Vision and Pattern Recognition.Seattle:IEEE,2024:16 965-16 974.
[13] MA X,DAI X Y,BAI Y,et al.Rewrite the Stars [C]// 2024 IEEE/CVF Conference on Computer Vision and Pattern Recognition.Seattle:IEEE,2024:5 694-5 703.
[14] WANG C Y,YEH I H,LIAO H M.YOLOv 9:learning what you want to learn using programmable gradient information [J/OL].arXiv.(2024 -02-21) [2024 -07-31].https://arxiv.org/abs/2402.13616.
[15] XU G P,LIAO W T,ZHANG X,et al.Haar wavelet downsampling:a simple but effective downsampling module for semantic segmentation [J].Pattern Recognition,2023,143:109819.
[16] ZHANG H,ZHANG S J.Shape-IoU:more accurate metric considering bounding box shape and scale [J/OL ].ArXiv.(2024 -01-12) [2024 -07-31].https://arxiv.org/abs/ 2312.17663.
[17] CHEN X Q,YANG C Z,MO J,et al.CSPNeXt:a new efficient token hybrid backbone [J].Engineering Applications of Artificial Intelligence,2024,132:107886.
[18] WANG C Y,LIAO H M,YEH I H.Designing network design strategies through gradient path analysis [J].Journal of Information Science and Engineering,2023,39(2):975-995.
[19] LIU X Y,PENG H W,ZHENG N X,et al.EfficientViT:memory efficient vision transformer with cascaded group attention [C]// 2023 IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR ).Vancouver:IEEE,2023:14 420-14 430.
[20] CHEN J R,KAO S H,HE H,et al.Run,don't walk:chasing higher FLOPS for faster neural networks [C]// 2023 IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR ).Vancouver:IEEE,2023:12 021-12 031.
[21] QIN D F,LEICHNER C,DELAKIS M,et al.MobileNetV 4:universal models for the mobile ecosystem [C]// European Conference on Computer Vision.Shanghai:Springer,2025:78-96.
[22] TANG Y H,HAN K,GUO J Y.GhostNetV 2:enhance cheap operation with long-range attention [J].Advances in Neural Information Processing Systems,2022,35:9 969-9 982.

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.