东北大学学报(自然科学版) ›› 2024, Vol. 45 ›› Issue (11): 1557-1564.DOI: 10.12068/j.issn.1005-3026.2024.11.005
收稿日期:
2023-06-16
出版日期:
2024-11-15
发布日期:
2025-02-24
通讯作者:
李立振
作者简介:
马淑华(1967-),女,河北秦皇岛人,东北大学秦皇岛分校教授.
基金资助:
Shu-hua MA, Li-zhen LI(), Han-min QIN, Xiao-peng SHA
Received:
2023-06-16
Online:
2024-11-15
Published:
2025-02-24
Contact:
Li-zhen LI
About author:
LI Li-zhen, E-mail: lilizhen559@163.com摘要:
铝型材在生产加工过程中会产生特征不明显和尺度大小不一等多类型的表面缺陷,针对现有人工抽检方法准确率低、实时性差、主观性强等问题,提出一种基于PP-PicoDet-XS的改进铝型材表面缺陷检测算法.改进的算法在主干网络中嵌入无参注意力SimAM,增强对深层有效特征的提取能力;使用SIoU(Scylla intersection over union)损失函数对训练过程进行优化,提高预测框的定位能力;采用量化蒸馏策略对模型进行压缩,提高推理速度.结果表明,改进的算法平均精度均值在交并比(intersection over union,IoU)阈值为0.5时达到了98.93%,在IoU阈值0.5~0.95范围内达到了57.60%,较未压缩的原始模型分别提高了1.73%和4.13%.将该算法部署到骁龙865移动端平台上进行推理,推理速度可达116.82帧/s,较未压缩的原始模型提高了47帧/s.
中图分类号:
马淑华, 李立振, 秦汉民, 沙晓鹏. 基于PP-PicoDet-XS的改进铝型材表面缺陷检测算法[J]. 东北大学学报(自然科学版), 2024, 45(11): 1557-1564.
Shu-hua MA, Li-zhen LI, Han-min QIN, Xiao-peng SHA. Improved Surface Defects Detection Algorithm for Aluminum Profiles Based on PP-PicoDet-XS[J]. Journal of Northeastern University(Natural Science), 2024, 45(11): 1557-1564.
主干网络组成 | 算子 | 卷积核尺寸 | 步长 | SE |
---|---|---|---|---|
卷积块 | 卷积 | 3×3 | 2 | — |
DSC模块_1 | DSC | 3×3 | 1 | — |
DSC模块_2 | DSC | 3×3 | 2 | — |
DSC | 3×3 | 1 | — | |
DSC模块_3 | DSC | 3×3 | 2 | — |
DSC | 3×3 | 1 | — | |
DSC模块_4 | DSC | 3×3 | 2 | — |
DSC×5 | 5×5 | 1 | — | |
DSC模块_5 | DSC | 5×5 | 2 | √ |
DSC | 5×5 | 1 | √ |
表1 PP-PicoDet主干网络结构
Table 1 PP-PicoDet backbone architecture
主干网络组成 | 算子 | 卷积核尺寸 | 步长 | SE |
---|---|---|---|---|
卷积块 | 卷积 | 3×3 | 2 | — |
DSC模块_1 | DSC | 3×3 | 1 | — |
DSC模块_2 | DSC | 3×3 | 2 | — |
DSC | 3×3 | 1 | — | |
DSC模块_3 | DSC | 3×3 | 2 | — |
DSC | 3×3 | 1 | — | |
DSC模块_4 | DSC | 3×3 | 2 | — |
DSC×5 | 5×5 | 1 | — | |
DSC模块_5 | DSC | 5×5 | 2 | √ |
DSC | 5×5 | 1 | √ |
网络模型 | SimAM 位置 | mAP@0.5∶0.95 | mAP@0.5 |
---|---|---|---|
% | % | ||
PP-PicoDet- XS | 1 0 0 0 0 | 54.51 | 98.47 |
0 1 0 0 0 | 54.12 | 98.02 | |
0 0 1 0 0 | 53.48 | 97.51 | |
0 0 0 1 0 | 53.55 | 97.22 | |
0 0 0 0 1 | 55.56 | 98.81 | |
1 1 1 1 1 | 53.66 | 97.94 |
表2 SimAM模块在不同位置的结果 (positions)
Table 2 Results of SimAM module in different
网络模型 | SimAM 位置 | mAP@0.5∶0.95 | mAP@0.5 |
---|---|---|---|
% | % | ||
PP-PicoDet- XS | 1 0 0 0 0 | 54.51 | 98.47 |
0 1 0 0 0 | 54.12 | 98.02 | |
0 0 1 0 0 | 53.48 | 97.51 | |
0 0 0 1 0 | 53.55 | 97.22 | |
0 0 0 0 1 | 55.56 | 98.81 | |
1 1 1 1 1 | 53.66 | 97.94 |
网络模型 | IoU 损失函数 | mAP@0.5∶0.95 | mAP@0.5 |
---|---|---|---|
% | % | ||
PP-PicoDet-XS | GIoU | 53.47 | 97.20 |
DIoU | 54.16 | 97.73 | |
CIoU | 54.06 | 97.89 | |
SIoU | 56.22 | 98.72 |
表3 不同IoU损失函数的影响
Table 3 Influence of different IoU Loss
网络模型 | IoU 损失函数 | mAP@0.5∶0.95 | mAP@0.5 |
---|---|---|---|
% | % | ||
PP-PicoDet-XS | GIoU | 53.47 | 97.20 |
DIoU | 54.16 | 97.73 | |
CIoU | 54.06 | 97.89 | |
SIoU | 56.22 | 98.72 |
网络模型 | mAP@0.5:0.95/% | mAP@0.5/% | 参数量×10-6 | FLOPs×10-9 | 参数体积/MB |
---|---|---|---|---|---|
YOLOv5n | 51.16 | 95.78 | 1.7693 | 0.5246 | 6.81 |
YOLOX-Nano | 55.58 | 97.53 | 0.8973 | 0.3124 | 3.53 |
PPYOLO-Tiny | 46.75 | 95.07 | 0.9979 | 0.2510 | 3.90 |
PP-PicoDet-XS | 53.47 | 97.20 | 0.6748 | 0.3204 | 2.67 |
SSD-MobileNet_v1 | 48.42 | 93.41 | 5.5621 | 1.1467 | 21.34 |
SSDLite-MobileNet_v1 | 49.53 | 93.78 | 5.6255 | 1.1550 | 21.63 |
SSDLite-MobileNet_v3 | 51.14 | 95.43 | 1.1737 | 0.1160 | 4.59 |
PP-PicoDet-XS(+SimAM+SIoU Loss) | 59.04 | 99.26 | 0.6551 | 0.3204 | 2.65 |
表4 不同算法对比
Table 4 Comparison with different algorithms
网络模型 | mAP@0.5:0.95/% | mAP@0.5/% | 参数量×10-6 | FLOPs×10-9 | 参数体积/MB |
---|---|---|---|---|---|
YOLOv5n | 51.16 | 95.78 | 1.7693 | 0.5246 | 6.81 |
YOLOX-Nano | 55.58 | 97.53 | 0.8973 | 0.3124 | 3.53 |
PPYOLO-Tiny | 46.75 | 95.07 | 0.9979 | 0.2510 | 3.90 |
PP-PicoDet-XS | 53.47 | 97.20 | 0.6748 | 0.3204 | 2.67 |
SSD-MobileNet_v1 | 48.42 | 93.41 | 5.5621 | 1.1467 | 21.34 |
SSDLite-MobileNet_v1 | 49.53 | 93.78 | 5.6255 | 1.1550 | 21.63 |
SSDLite-MobileNet_v3 | 51.14 | 95.43 | 1.1737 | 0.1160 | 4.59 |
PP-PicoDet-XS(+SimAM+SIoU Loss) | 59.04 | 99.26 | 0.6551 | 0.3204 | 2.65 |
网络模型 | 是否压缩 | mAP@0.5:0.95 | mAP@0.5 | 模型体积 | 推理时间 | 推理速度 |
---|---|---|---|---|---|---|
% | % | MB | ms | 帧·s-1 | ||
PP-PicoDet-XS | 否 | 53.47 | 97.20 | 3.03 | 14.32 | 69.83 |
是 | 52.63 | 95.92 | 1.21 | 8.82 | 113.38 | |
PP-PicoDet-XS(+SimAM+SIoU Loss) | 否 | 59.04 | 99.26 | 2.85 | 13.15 | 76.04 |
是 | 57.60 | 98.93 | 1.19 | 8.56 | 116.82 |
表5 模型压缩前后性能对比
Table 5 Comparison of performance before and after model compression
网络模型 | 是否压缩 | mAP@0.5:0.95 | mAP@0.5 | 模型体积 | 推理时间 | 推理速度 |
---|---|---|---|---|---|---|
% | % | MB | ms | 帧·s-1 | ||
PP-PicoDet-XS | 否 | 53.47 | 97.20 | 3.03 | 14.32 | 69.83 |
是 | 52.63 | 95.92 | 1.21 | 8.82 | 113.38 | |
PP-PicoDet-XS(+SimAM+SIoU Loss) | 否 | 59.04 | 99.26 | 2.85 | 13.15 | 76.04 |
是 | 57.60 | 98.93 | 1.19 | 8.56 | 116.82 |
1 | Wei X K, Yang Z M, Liu Y X,et al.Railway track fastener defect detection based on image processing and deep learning techniques:a comparative study[J].Engineering Applications of Artificial Intelligence,2019,80:66-81. |
2 | Jian C X, Gao J, Ao Y H.Automatic surface defect detection for mobile phone screen glass based on machine vision[J].Applied Soft Computing,2016,52(3):348-358. |
3 | 赵翔宇,周亚同,何峰,等.工业干扰环境下基于模板匹配的印刷品缺陷检测[J].包装工程,2017,38(11):187-192. |
Zhao Xiang‑yu, Zhou Ya‑tong, He Feng,et al.Printing defects detection based on template matching under disturbing industrial environment[J].Packaging Engineering,2017,38(11):187-192. | |
4 | 李永敬,朱萍玉,孙孝鹏,等.基于形状模板匹配的冲压件外形缺陷检测算法研究[J].广州大学学报(自然科学版),2017,16(5):62-66. |
Li Yong‑jing, Zhu Ping‑yu, Sun Xiao‑peng,et al.Shape defect detection algorithm of stamping parts based on shape template matching[J].Journal of Guangzhou University (Natural Science Edition),2017,16(5):62-66. | |
5 | 孙光民,刘鹏,李子博.基于图像处理的带钢表面缺陷检测改进算法的研究[J].软件工程,2018,21(4):5-8. |
Sun Guang‑min, Liu Peng, Li Zi‑bo.Research on the detection algorithm of strip steel surface defects based on image processing[J].Software Engineering,2018,21(4):5-8. | |
6 | Girshick R, Donahue J, Darrell T,et al.Rich feature hierarchies for accurate object detection and semantic segmentation[C]//IEEE Conference on Computer Vision and Pattern Recognition.Columbus:IEEE,2014:580-587. |
7 | Girshick R.Fast R-CNN[C]//IEEE International Conference on Computer Vision.Santiago:IEEE,2015:1440-1448. |
8 | Ren S Q, He K M, Girshick R,et al.Faster R-CNN:towards real‑time object detection with region proposal networks[J].IEEE Transactions on Pattern Analysis and Machine Intelligence,2017,39(6):1137-1149. |
9 | He K M, Gkioxari G, Dollár P,et al.Mask R-CNN[C]//2017 IEEE International Conference on Computer Vision (ICCV).Venice,2017:2980-2988. |
10 | Liu W, Anguelov D, Erhan D,et al.SSD:single shot multibox detector[C]//European Conference on Computer Vision.Berlin:Springer,2016:21-37. |
11 | Redmon J, Divvala S, Girshick R,et al.You only look once:unified,real‑time object detection[C]//IEEE Conference on Computer Vision and Pattern Recognition.Las Vegas:IEEE,2016:779-788. |
12 | Howard A G, Zhu M L, Chen B,et al.MobileNets:efficient convolutional neural networks for mobile vision applications[EB/OL].(2017-04-17)[2023-04-03]. . |
13 | Zhang X Y, Zhou X Y, Lin M X,et al.ShuffleNet:an extremely efficient convolutional neural network for mobile devices[C]//2018 IEEE/CVF Conference on Computer Vision and Pattern Recognition.Salt Lake City,2018:6848-6856. |
14 | Han K, Wang Y H, Tian Q,et al.GhostNet:more features from cheap operations[C]//IEEE Conference on Computer Vision and Pattern Recognition.Seattle:IEEE,2020:1577-1586. |
15 | 王淑青,鲁濠,鲁东林,等.基于轻量化人工神经网络的PCB板缺陷检测[J].仪表技术与传感器,2022(5):98-104. |
Wang Shu‑qing, Lu Hao, Lu Dong‑lin,et al.PCB board defect detection based on lightweight artificial neural network[J].Instrument Technique and Sensor,2022(5):98-104. | |
16 | Ge Z, Liu S, Wang F,et al.YOLOX:exceeding YOLO series in 2021[EB/OL].(2021-08-06) [2023-04-08].. |
17 | Wang C Y, Bochkovskiy A, Liao H Y M.YOLOv7:trainable bag‑of‑freebies sets new state‑of‑the‑art for real‑time object detectors[C]//IEEE Conference on Computer Vision and Pattern Recognition.Vancouver:IEEE,2023:7464-7475. |
18 | Yu G, Chang Q, Lyu W,et al.PP-PicoDet:a better real‑time object detector on mobile devices[EB/OL].(2021-11-01)[2023-04-15].. |
19 | Cui C, Gao T Q, Wei S Y,et al.PP-LCNet:a lightweight CPU convolutional neural network[EB/OL].(2021-09-17) [2023-04-15].. |
20 | Rezatofighi H, Tsoi N, Gwak J,et al .Generalized intersection over union:a metric and a loss for bounding box regression[C]//IEEE Conference on Computer Vision and Pattern Recognition.New York:IEEE,2019:658-666. |
21 | Yang L, Zhang R Y, Li L,et al.SimAM:a simple,parameter‑free attention module for convolutional neural networks[C]//International Conference on Machine Learning.[n.l]:PMLR,2021:11863-11874. |
22 | Gevorgyan Z.SIoU loss:more powerful learning for bounding box regression[EB/OL].(2022-05-15)[2023-04-23].. |
23 | Jacob B, Kligys S, Chen B,et al.Quantization and training of neural networks for efficient integer‑arithmetic‑only inference[C]//IEEE Conference on Computer Vision and Pattern Recognition.Salt Lake City:IEEE,2018:2704-2713. |
24 | Hinton G, Vinyals O, Dean J.Distilling the knowledge in a neural network[J].Computer Science,2015,14(7):38-39. |
[1] | 郭立新, 毕素涛, 赵明扬. 基于改进YOLOv4轻量化网络的机械手状态检测算法[J]. 东北大学学报(自然科学版), 2024, 45(6): 769-775. |
[2] | 赵家豪, 曲扬, 罗洪杰, 杨世杰. 烧结工艺对多孔钛微观结构及力学性能的影响[J]. 东北大学学报(自然科学版), 2024, 45(6): 816-822. |
[3] | 谢洪途, 陈佳兴, 张琳, 朱楠楠. 基于脉冲神经网络的轻量化SAR图像舰船识别算法[J]. 东北大学学报(自然科学版), 2024, 45(4): 474-482. |
[4] | 冯虎, 宋克臣, 崔文琦, 颜云辉. 基于元学习的带钢表面缺陷小样本语义分割[J]. 东北大学学报(自然科学版), 2024, 45(3): 354-360. |
[5] | 冯昂, 宫俊, 王念, 王景龙. 基于图卷积和卷积的行人轨迹预测算法[J]. 东北大学学报(自然科学版), 2024, 45(11): 1529-1536. |
[6] | 郝博, 徐新岩, 赵玉欣, 闫俊伟. 基于改进YOLOv8的铆接孔表面缺陷检测[J]. 东北大学学报(自然科学版), 2024, 45(11): 1595-1603. |
[7] | 毛宁, 牛荟蓉, 柳静献. 聚芳恶二唑纤维耐酸特性的实验研究[J]. 东北大学学报(自然科学版), 2023, 44(5): 719-725. |
[8] | 陈一馨, 张婷, 刘永刚, 陈晶. 基于改进樽海鞘群算法的提梁机主梁轻量化设计方法[J]. 东北大学学报(自然科学版), 2023, 44(2): 223-232. |
[9] | 李娟莉, 魏代良, 李博, 文小. 基于深度学习轻量化的改进SSD煤矸快速分选模型[J]. 东北大学学报(自然科学版), 2023, 44(10): 1474-1480. |
[10] | 张雪峰, 许华文, 杨棉子美. 一种基于条件生成对抗网络的高感知图像压缩方法[J]. 东北大学学报(自然科学版), 2022, 43(6): 783-791. |
[11] | 张思佳, 胡贤磊, 刘相华. 轧制差厚板方盒件拉深成形的实验与数值模拟[J]. 东北大学学报(自然科学版), 2022, 43(6): 801-808. |
[12] | 杨爱萍, 宋尚阳, 程思萌. 轻量化自适应特征选择目标检测网络[J]. 东北大学学报(自然科学版), 2021, 42(9): 1238-1245. |
[13] | 何彧, 宋克臣, 张德富, 颜云辉. 融合多层级特征的弱监督钢板表面缺陷检测算法[J]. 东北大学学报(自然科学版), 2021, 42(5): 687-692. |
[14] | 刘宇, 魏希来, 王帅, 戴丽. 基于深度学习的光纤收卷机器视觉自动检测技术[J]. 东北大学学报(自然科学版), 2021, 42(1): 68-74. |
[15] | 岳强, 薛梦, 张钰洁, 栗树朋. 基于系统动力学模型的中国汽车工业废杂铝回收分析[J]. 东北大学学报:自然科学版, 2020, 41(1): 68-73. |
阅读次数 | ||||||
全文 |
|
|||||
摘要 |
|
|||||