基于改进YOLOv8的鸡翅包装产线异物在线检测方法

张维平, 王冬云, 姬莉, 李国强, 杨钰

包装工程(技术栏目) ›› 2026, Vol. 47 ›› Issue (5) : 181-189.

PDF(3287 KB)
PDF(3287 KB)
包装工程(技术栏目) ›› 2026, Vol. 47 ›› Issue (5) : 181-189. DOI: 10.19554/j.cnki.1001-3563.2026.05.020
自动化与智能化技术

基于改进YOLOv8的鸡翅包装产线异物在线检测方法

  • 张维平1, 王冬云1, 姬莉1, 李国强2,3, 杨钰1,*
作者信息 +

On-line Foreign Object Detection Method for Chicken Wing Packaging Lines Based on Improved YOLOv8

  • ZHANG Weiping1, WANG Dongyun1, JI Li1, LI Guoqiang2,3, YANG Yu1,*
Author information +
文章历史 +

摘要

目的 针对生鲜肉类包装前检环节中,附着于产品表面的毛发、塑料纤维等微小异物极易受肉质表面镜面反射及生理纹理特征混叠干扰,导致漏检率高的问题,提出一种基于改进YOLOv8n的轻量化在线检测方法M-YOLOv8。方法 首先,利用离线实例级Copy-Paste算法配合泊松融合,重点针对“异物附着”工况构建小目标增强数据集,模拟异物与肉质表面的光影融合特征,修正样本长尾分布偏置。其次,在主干网络C2f模块中嵌入CBAM注意力机制以抑制油脂反光并增强异物区域特征信噪比,并引入P2微尺度检测层与SAHI切片推理策略,补偿深层特征下采样带来的空域信息丢失。最后,采用CIoU损失函数优化细长线性附着物的边界框回归精度。结果 在自建鸡翅包装产线数据集上,该方法的AP@0.5达到91.8%,较原始模型提升4.3%,尤其是对直径小于2 mm的微小附着异物检出率显著提升。系统推理速度达98 FPS,满足高速产线实时节拍要求。结论 该方法有效兼顾了复杂背景下附着目标的检测精度与端侧推理速度,可为解决肉禽包装检测中的“长尾分布”与镜面干扰难题提供可靠技术参考。

Abstract

The work aims to propose a lightweight on-line detection method based on an improved YOLOv8n, named M-YOLOv8 to address the high miss-detection rate of tiny non-metallic foreign objects (such as hair and plastic fibers) attached to product surfaces in fresh meat automated packaging lines, which are highly susceptible to interference from specular reflections and complex physiological textures. Firstly, an offline instance-level Copy-Paste algorithm combined with Poisson blending was employed to construct a small-target augmented dataset. This process specifically targeted "foreign object attachment" scenarios by simulating the light-shadow fusion characteristics between objects and meat surfaces to correct long-tail distribution bias. Secondly, a CBAM (Convolutional Block Attention Module) was embedded into the C2f module of the backbone to suppress fat reflections and enhance the feature-to-noise ratio in target regions. A P2 micro-scale detection layer and the SAHI (Slicing Aided Hyper Inference) strategy were integrated to compensate for spatial information loss caused by deep feature downsampling. Finally, the CIoU loss function was utilized to optimize the bounding box regression accuracy for slender linear attachments. Experimental results on a self-built chicken wing packaging dataset showed that the AP@0.5 of the proposed method reached 91.8%, a 4.3% increase over the baseline model. Specifically, the detection rate for micro-objects with a diameter of less than 2 mm was significantly improved. The system inference speed reached 98 FPS, meeting the real-time requirements of high-speed production lines. The proposed method effectively balances the detection accuracy of attached targets under complex backgrounds with edge-side inference speed. It provides a reliable technical reference for addressing the challenges of "long-tail distribution" and specular interference in meat and poultry packaging detection.

关键词

包装检测 / 微小异物 / YOLOv8n / SAHI / 注意力机制 / Copy-Paste

Key words

packaging detection / micro-foreign objects / YOLOv8n / SAHI / attention mechanism / Copy-Paste

引用本文

导出引用
张维平, 王冬云, 姬莉, 李国强, 杨钰. 基于改进YOLOv8的鸡翅包装产线异物在线检测方法[J]. 包装工程. 2026, 47(5): 181-189 https://doi.org/10.19554/j.cnki.1001-3563.2026.05.020
ZHANG Weiping, WANG Dongyun, JI Li, LI Guoqiang, YANG Yu. On-line Foreign Object Detection Method for Chicken Wing Packaging Lines Based on Improved YOLOv8[J]. Packaging Engineering. 2026, 47(5): 181-189 https://doi.org/10.19554/j.cnki.1001-3563.2026.05.020
中图分类号: TB487   

参考文献

[1] 刘琳. 小鸡炖蘑菇预制菜的加工工艺及品质控制研究[D]. 沈阳: 沈阳农业大学, 2025.
[2] LIU L.Research on Processing Technology and Quality Control of Chicken Stewed Mushroom Prefabricated Dishes[D]. Shenyang: Shenyang Agricultural University, 2025.
[3] 王振新, 蒋亚军, 吴文龙, 等. 基于改进YOLOv8s模型的茶叶异物检测方法分析[J]. 中国机械, 2025(30): 122-128.
[4] WANG Z X, JIANG Y J, WU W L, et al.Analysis of Tea Foreign Body Detection Method Based on Improved YOLOv8s Model[J]. Machine China, 2025(30): 122-128.
[5] 王晓冰. 基于改进YOLO算法的动物源性食品检测方法[J]. 现代食品, 2024, 30(9): 91-93.
[6] WANG X B.Animal Derived Food Detection Method Based on Improved YOLO Algorithm[J]. Modern Food, 2024, 30(9): 91-93.
[7] 杨涛存. 分布外样本检测方法及其应用研究[D]. 北京: 北京交通大学, 2024.
[8] YANG T C.Out of Distribution Detection Algorithm and Application[D]. Beijing: Beijing Jiaotong University, 2024.
[9] 崔新霞, 卢硕晨, 孙敦凯. 基于视觉感知的机器人工件识别方法研究[J]. 包装工程, 2023, 44(7): 186-195.
[10] CUI X X, LU S C, SUN D K.Robot Workpiece Recognition Method Based on Visual Perception[J]. Packaging Engineering, 2023, 44(7): 186-195.
[11] 陈泳益, 蓝积炎, 杨喜, 等. 数据不均衡条件下数据增强辅助的自动调制识别[J]. 华侨大学学报(自然科学版), 2026, 47(1): 104-111.
[12] CHEN Y Y, LAN J Y, YANG X, et al.Data Augmentation-Assisted Automatic Modulation Recognition under Condition of Data Imbalance[J]. Journal of Huaqiao University (Natural Science), 2026, 47(1): 104-111.
[13] SHEN Z Y, MAO M Y, FAN P F.A Primary Comparison of Diffusion Models and Generative Adversarial Networks for Image Synthesis[C]// Proceedings of the 2024 7th International Conference on Machine Learning and Machine Intelligence (MLMI). Osaka: ACM, 2024: 225-234.
[14] CHAKRABORTY T, REDDY K S U, NAIK S M, et al. Ten Years of Generative Adversarial Nets (GANs): A Survey of the State-of-the-Art[J]. Machine Learning: Science and Technology, 2024, 5(1): 011001.
[15] ZHANG C, CHEN J Y, WEN Y B, et al.High-Efficiency Γ-Aminobutyric Acid Nano-Formulation for Turnip Mosaic Virus: Excellent Adhesion Performance and Amplified Plant Defensive Responses[J]. Horticultural Plant Journal, 2025, 11(6): 2285-2288.
[16] 李英, 陈健, 苏志海, 等. 基于Mixup训练及多模型决策融合的腰椎间盘突出诊断[J]. 信息工程大学学报, 2024, 25(3): 265-271.
[17] LI Y, CHEN J, SU Z H, et al.Diagnosis of Lumbar Disc Herniation Based on Mixup Training and Decision Fusion of Multiple Models[J]. Journal of Information Engineering University, 2024, 25(3): 265-271.
[18] 严梦迪, 程旭, 付章杰. 基于多尺度特征的图像复制粘贴篡改检测网络[J]. 计算机与数字工程, 2025, 53(10): 2881-2887.
[19] YAN M D, CHENG X, FU Z J.Multi-Scale Feature Network for Image Copy-Move Forgery Detection[J]. Computer and Digital Engineering, 2025, 53(10): 2881-2887.
[20] 江松, 魏玉, 饶彬舰, 等. 融合Copy-Paste的大尺度露天矿岩质边坡裂隙检测方法研究[J]. 采矿与岩层控制工程学报, 2025, 7(5): 144-159.
[21] JIANG S, WEI Y, RAO B J, et al.A Large-Scale Open-Pit Rock Slope Fissure Detection Method by Integrating Copy-Paste Algorithm[J]. Journal of Mining and Strata Control Engineering, 2025, 7(5): 144-159.
[22] VARGHESE R, M S. YOLOv8: A Novel Object Detection Algorithm with Enhanced Performance and Robustness[C]// 2024 International Conference on Advances in Data Engineering and Intelligent Computing Systems (ADICS). Chennai: IEEE, 2024.
[23] 白雄飞, 龚水成, 李雪松, 等. 基于泊松融合数据增强的焊缝金相组织缺陷分类研究[J]. 上海交通大学学报, 2023, 57(10): 1316-1328.
[24] BAI X F, GONG S C, LI X S, et al.Defect Classification of Weld Metallographic Structure Based on Data Augmentation of Poisson Fusion[J]. Journal of Shanghai Jiao Tong University, 2023, 57(10): 1316-1328.
[25] LIN S M, JIANG Y, CHEN X S, et al.Automatic Detection of Plant Rows for a Transplanter in Paddy Field Using Faster R-CNN[J]. IEEE Access, 2020, 8: 147231-147240.
[26] 李晓光, 付陈平, 李晓莉, 等. 面向多尺度目标检测的改进Faster R-CNN算法[J]. 计算机辅助设计与图形学学报, 2019, 31(7): 1095-1101.
[27] LI X G, FU C P, LI X L, et al.Improved Faster R-CNN for Multi-Scale Object Detection[J]. Journal of Computer-Aided Design & Computer Graphics, 2019, 31(7): 1095-1101.
[28] LIU W, ANGUELOV D, ERHAN D, et al.SSD: Single Shot MultiBox Detector[C]// Computer Vision—ECCV 2016. Cham: Springer, 2016.
[29] 王军, 万书东, 程勇. 基于改进YOLOv5s的白酒瓶盖瑕疵检测[J]. 包装工程, 2024, 45(7): 180-188.
[30] WANG J, WAN S D, CHENG Y.Liquor Bottle Cap Defect Detection Based on Improved YOLOv5s[J]. Packaging Engineering, 2024, 45(7): 180-188.
[31] 杨明旭, 张俊宁, 张志强, 等. 基于改进YOLOv8的药片泡罩包装缺陷检测算法[J]. 包装工程, 2025, 46(1): 145-154.
[32] YANG M X, ZHANG J N, ZHANG Z Q, et al.Defect Detection Algorithm of Pharmaceutical Blister Package Based on Improved YOLOv8[J]. Packaging Engineering, 2025, 46(1): 145-154.
[33] 徐淼, 涂福泉, 吴淇, 等. 基于YOLOv8的PCB表面缺陷检测轻量化研究[J]. 包装工程, 2024, 45(17): 172-179.
[34] XU M, TU F Q, WU Q, et al.Lightweight Research on PCB Surface Defect Detection Based on YOLOv8[J]. Packaging Engineering, 2024, 45(17): 172-179.

基金

河北省自然科学基金(F2020203003); 国家自然科学基金资助项目(61973264)

PDF(3287 KB)

Accesses

Citation

Detail

段落导航
相关文章

/