摘 要: 本文针对工业生产现场的复杂背景对印刷品缺陷检测造成的影响,以及为了更加精准地检测食品包装盒图像上的小目标,提出了一种基于改进Unet的语义分割算法,将前景图像从复杂的图像中提取出来,采用VGG16作为Unet网络的主干提取部分,提取高层的全局特征信息;引入了注意力机制提高图像分割的精确度和细节保留能力。经改进的Unet模型的评价指标IoU、mIoU、PA、F1-score分别为99.45%、99.60%、99.83%、99.72%,相比原Unet模型,各项指标分别提升了1.73百分点、1.24百分点、0.53百分点、0.87百分点,能够更加精准地分割食品包装盒与传送带背景的边缘,为后续的缺陷检测提供了精准的数据支持。 |
关键词: 食品包装盒;图像分割;Unet;注意力机制 |
中图分类号: TP391.4
文献标识码: A
|
基金项目: 基于机器视觉的食品包装盒印刷质量控制技术研究(K22-0108-006) |
|
Food Packaging Box Image Segmentation Based on Improved Unet |
ZHOU Yang1, HE Fuqiang1, NIE Wenhao2, CHEN Qimei2
|
(1.School of Mechanical Engineering, Guizhou University, Guiyang 550025, China; 2.Guizhou Xi Niu Wang Printing Co., Ltd., Guiyang 550014, China)
1246593850@qq.com; hefq75@163.com; 1210258911@qq.com; 49208424@qq.com
|
Abstract: Aiming at the impact of complex backgrounds in industrial production environments on print defect detection, and to achieve more precise detection of small targets on food packaging box images, this paper proposes a semantic segmentation algorithm based on improved Unet. This algorithm extracts foreground images from complex backgrounds, utilizing VGG16 as the backbone feature extractor of the Unet network to capture high-level global feature information. An attention mechanism is introduced to enhance segmentation accuracy and detail preservation. The evaluation indexes of IoU, mIoU, PA, and F1-score of the improved Unet model are 99.45% , 99.60% , 99.83% , 99.72% , respectively, and compared with the original Unet model, the indexes have been improved by 1.73 percentage points, 1. 24 percentage points, 0. 53 percentage points, and 0. 87 percentage points. The proposed algorithm can accurately segment the edges of the food packaging box and the conveyor belt background, providing precise data support for subsequent defect detection. |
Keywords: food packaging box; image segmentation; Unet; attention mechanism |