Journal of Guangxi Normal University(Natural Science Edition) ›› 2024, Vol. 42 ›› Issue (1): 111-119.doi: 10.16088/j.issn.1001-6600.2023050801

Previous Articles     Next Articles

Surface Defect Detection Method for Aluminum Profile Based on Improved YOLOv5

XI Lingfei, Yilihamu Yaermaimaiti*, LIU Yajie   

  1. School of Electrical Engineering, Xinjiang University, Urumuqi Xinjiang 830017, China
  • Received:2023-05-08 Revised:2023-08-31 Online:2024-01-25 Published:2024-01-19

Abstract: In view of the large difference of different sizes of aluminum surface defects leading to poor detection effect, an aluminum surface defect detection algorithm based on improved YOLOv5 is proposed. Firstly, CA attention mechanism module is embedded in the network to make the network better suppress the interference of invalid samples in the image and focus more on useful information. Secondly, a small target detection layer is added to the original detection layer to acquire and transmit more abundant and discriminant small target features, so as to solve the problem of low detection accuracy of small target defects and improve the overall detection accuracy. Finally, the SIoU loss function is introduced and the vector angle between boundary box regression is introduced to redefine the loss function, which effectively reduces the total freedom of loss and improves the reasoning precision. The improved algorithm is applied to Tianchi aluminum data set for verification. The experimental results show that the model can effectively identify different types of defects on aluminum profiles, which is 11.4% higher than the original YOLOv5 algorithm mAP, and the detection speed is up to 66.4 frame/s. The proposed method can meet the requirements of on-site defect detection in aluminum profile factories.

Key words: defect detection, YOLOv5, attention mechanism, SIoU, multiscale fusion

CLC Number:  TP391.41
[1] 杨林. 冷态热轧钢板表面缺陷检测系统技术研究[D].重庆:重庆大学,2015.
[2] 陈妍.冷轧带钢表面缺陷智能检测技术的发展[J].鞍钢技术,1998(9):27-32.
[3] 刘娜, 强锡富, 高若云. 图像处理在非接触测量中的应用[J]. 电测与仪表, 1998(11): 44-45.
[4] 罗志勇,刘栋玉,江涛,等.新型冷轧带钢表面缺陷在线检测系统[J].华中理工大学学报,1996, 24(1):75-78.
[5] LIU B, WU S J, ZOU S F. Automatic detection technology of surface defects on plastic products based on machine vision[C]// 2010 International Conference on Mechanic Automation and Control Engineering.Piscataway,NJ:IEEE Press, 2010: 2213-2216. DOI: 10.1109/MACE.2010.5536470.
[6] DENG S E,CAI W W,XU Q Y,et al. Defect detection of bearing surfaces based on machine vision technique[C]// 2010 International Conference on Computer Application and System Modeling (ICCASM 2010): Volume 4. Piscataway,NJ: IEEE Press,2010: 548-554. DOI: 10.1109/ICCASM.2010.5620311.
[7] 贾方庆. 基于机器视觉的带钢表面缺陷检测系统研究[D]. 重庆: 重庆大学, 2007.DOI: 10.7666/d.y1141210.
[8] 谭绍华. 基于机器视觉的带钢表面缺陷检测系统研究[D]. 武汉: 华中科技大学, 2012.DOI: 10.7666/d.D228012.
[9] 刘孟轲,吴洋,王逊.基于卷积神经网络的轨道表面缺陷检测技术实现[J].现代计算机(专业版),2017(29):65-69, 77.DOI: 10.3969/j.issn.1007-1423.2017.29.016.
[10] 刘雄祥. 基于卷积神经网络的铁轨表面缺陷识别研究[D]. 绵阳: 西南科技大学, 2018.
[11] DALAL N, TRIGGS B. Histograms of oriented gradients for human detection[C]// 2005 IEEE Computer Society Conference on Computer Vision and Pattern Recognition(CVPR’05). Los Alamitos, CA: IEEE Computer Society,2005:886-893.DOI: 10.1109/CVPR.2005.177.
[12] LOWE D G. Distinctive image features from scale-invariant keypoints[J]. International Journal of Computer Vision, 2004,60(2):91-110.DOI: 10.1023/B:VISI.0000029664.99615.94.
[13] CHERKASSKY V. The nature of statistical learning theory[J]. IEEE Transactions on Neural Networks, 1997, 8(6):1564.DOI: 10.1109/TNN.1997.641482.
[14] SUVDAA B, AHN J, KO J. Steel surface defects detection and classification using SIFT and voting strategy[J]. International Journal of Software Engineering and Its Applications, 2012, 6(2): 161-166.
[15] CORTES C, VAPNIK V. Support-vector networks[J]. Machine Learning, 1995,20(3):273-297. DOI: 10.1007/
BF00994018.
[16] 缪徐超,张旭,徐洋,等.基于支持向量机的金属表面缺陷检测[J].智能计算机与应用,2021,11(2):207-209, 封三.
[17] MEDINA R, GAYUBO F, GONZÁLEZ L M, et al. Surface defects detection on rolled steel strips by Gabor filters[C]// Proceedings of the Third International Conference on Computer Vision Theory and Applications (VISIGRAPP 2008): Volume 1. Setúbal: SciTePress, 2008: 479-485. DOI: 10.5220/0001088504790485.
[18] 汤勃, 孔建益, 王兴东, 等. 基于图像处理的钢板表面缺陷支持向量机识别[J]. 中国机械工程, 2011, 22(12): 1402-1405.
[19] 曹阳. 基于机器视觉的铝型材表面缺陷检测研究[D].西安:陕西科技大学,2021.DOI: 10.27290/d.cnki.gxbqc.2021.000217.
[20] 程婧怡,段先华,朱伟.改进 YOLOv3 的金属表面缺陷检测研究[J].计算机工程与应用,2021,57(19):252-258. DOI: 10.3778/j.issn.1002-8331.2104-0324.
[21] 吴越,杨延竹,苏雪龙,等.基于Faster R-CNN 的钢板表面缺陷检测方法[J].东华大学学报(自然科学版),2021,47(3):84-89. DOI: 10.19886/j.cnki.dhdz.2020.0159.
[22] 李庆党,李铁林.基于改进YOLOv3算法的钢板缺陷检测[J].电子测量技术,2021,44(2):104-108.DOI: 10.19651/j.cnki.emt.2005366.
[23] REDMON J,DIVVALA S, GIRSHICK R, et al.You only look once: unified, real-time object detection[C]// 2016 IEEE Conference on Computer Vision and Pattern Recognition (CVPR). Los Alamitos, CA: IEEE Computer Society,2016: 779-788. DOI: 10.1109/CVPR.2016.91.
[24] REDMON J, FARHADI A. YOLO9000: better, faster, stronger[C]// 2017 IEEE Conference on Computer Vision and Pattern Recognition (CVPR).Los Alamitos, CA: IEEE Computer Society, 2017: 6517-6525. DOI: 10.1109/CVPR.2017.690.
[25] REDMON J, FARHADI A.YOLOv3: an incremental improvement[EB/OL]. (2018-04-08)[2023-05-08].https://arxiv.org/abs/1804.02767. DOI: 10.48550/arXiv.1804.02767.
[26] BOCHKOVSKIY A, WANG C Y, LIAO H Y M.YOLOv4: optimal speed and accuracy of object detection[EB/OL].(2020-04-23)[2023-05-08].https://arxiv.org/abs/2004.10934. DOI: 10.48550/arXiv.2004.10934 .
[27] 高志国, 袁牧, 童旸, 等. 基于PCBAM-YOLOv5网络的变电站表计缺陷检测[J]. 电子设计工程, 2023, 31(4): 77-81. DOI: 10.14022/j.issn1674-6236.2023.04.016.
[28] HOU Q B, ZHOU D Q, FENG J S. Coordinate attention for efficient mobile network design[C]// 2021 IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR). Los Alamitos, CA: IEEE Computer Society, 2021: 13708-13717. DOI: 10.1109/CVPR46437.2021.01350.
[29] GEVORGYAN Z.SIoU loss:more powerful learning for bounding box regression[EB/OL].(2022-05-25)[2023-05-08].https://arxiv.org/abs/2205.12740. DOI: 10.48550/arXiv.2205.12740.
[1] XIAO Yuting, LÜ Xiaoqi, GU Yu, LIU Chuanqiang. Classification of Diabetic Retinopathy Based on Split Residual Network [J]. Journal of Guangxi Normal University(Natural Science Edition), 2024, 42(1): 91-101.
[2] ZHAO Wei, TIAN Shuai, ZHANG Qiang, WANG Yaoshen, WANG Sibo, SONG Jiang. Fritillaria ussuriensis Maxim Detection Model Based on Improved YOLOv5 [J]. Journal of Guangxi Normal University(Natural Science Edition), 2023, 41(6): 22-32.
[3] SONG Guanwu, CHEN Zhiming, LI Jianjun. Remote Sensing Image Classification with Cascade Attention Based on ResNet-50 [J]. Journal of Guangxi Normal University(Natural Science Edition), 2023, 41(6): 80-91.
[4] WU Zhengqing, CAO Hui, LIU Baokai. Chinese Fake Review Detection Based on Attention Convolutional Neural Network [J]. Journal of Guangxi Normal University(Natural Science Edition), 2023, 41(5): 26-36.
[5] HUANG Yeqi, WANG Mingwei, YAN Rui, LEI Tao. Surface Quality Detection of Diamond Wire Based on Improved YOLOv5 [J]. Journal of Guangxi Normal University(Natural Science Edition), 2023, 41(4): 123-134.
[6] DENG Xizhen, JIANG Ming, CEN Mingcan, LUO Yuling. Ransomware Classification Based on Entropy Image Static Analysis Technology [J]. Journal of Guangxi Normal University(Natural Science Edition), 2023, 41(3): 91-104.
[7] WEI Mingjun, ZHOU Taiyu, JI Zhanlin, ZHANG Xinnan. Detection Method of Mask Wearing in Public Places Based on YOLOv3 [J]. Journal of Guangxi Normal University(Natural Science Edition), 2023, 41(1): 76-86.
[8] WANG Li’e, WANG Yihui, LI Xianxian. A Multi-source Data Fusion and Privacy Protection Method of POI Recommendation [J]. Journal of Guangxi Normal University(Natural Science Edition), 2023, 41(1): 87-101.
[9] WANG Yuhang, ZHANG Canlong, LI Zhixin, WANG Zhiwen. Image Captioning According to User’s Intention and Style [J]. Journal of Guangxi Normal University(Natural Science Edition), 2022, 40(4): 91-103.
[10] LI Zhengguang, CHEN Heng, LIN Hongfei. Identification of Adverse Drug Reaction on Social Media Using Bi-directional Language Model [J]. Journal of Guangxi Normal University(Natural Science Edition), 2022, 40(3): 40-48.
[11] WAN Liming, ZHANG Xiaoqian, LIU Zhigui, SONG Lin, ZHOU Ying, LI Li. CT Image Segmentation of UNet Pulmonary Nodules Based on Efficient Channel Attention [J]. Journal of Guangxi Normal University(Natural Science Edition), 2022, 40(3): 66-75.
[12] ZHANG Ping, XU Qiaozhi. Segmentation of Lung Nodules Based on Multi-receptive Field and Grouping Attention Mechanism [J]. Journal of Guangxi Normal University(Natural Science Edition), 2022, 40(3): 76-87.
[13] WU Jun, OUYANG Aijia, ZHANG Lin. Phosphorylation Site Prediction Model Based on Multi-head Attention Mechanism [J]. Journal of Guangxi Normal University(Natural Science Edition), 2022, 40(3): 161-171.
[14] ZHANG Wenlong, NAN Xinyuan. Road Vehicle Tracking Algorithm Based on Improved YOLOv5 [J]. Journal of Guangxi Normal University(Natural Science Edition), 2022, 40(2): 49-57.
[15] LI Weiyong, LIU Bin, ZHANG Wei, CHEN Yunfang. An Automatic Summarization Model Based on Deep Learning for Chinese [J]. Journal of Guangxi Normal University(Natural Science Edition), 2020, 38(2): 51-63.
Viewed
Full text


Abstract

Cited

  Shared   
  Discussed   
[1] LUO Yun-yan, LI Rong-zheng, LI Bing, DING Chen-xu. Optimization of Extraction Process of Alkaloids from Meconopsis horridula Hook. f. & Thomson by Response Surface Methodology[J]. Journal of Guangxi Normal University(Natural Science Edition), 2014, 32(4): 84 -90 .
[2] DONG Shulong, MA Jiangming, XIN Wenjie. Research Progress and Trend of Landscape Visual Evaluation —Knowledge Atlas Analysis Based on CiteSpace[J]. Journal of Guangxi Normal University(Natural Science Edition), 2023, 41(5): 1 -13 .
[3] GUO Jialiang, JIN Ting. Semantic Enhancement-Based Multimodal Sentiment Analysis[J]. Journal of Guangxi Normal University(Natural Science Edition), 2023, 41(5): 14 -25 .
[4] WU Zhengqing, CAO Hui, LIU Baokai. Chinese Fake Review Detection Based on Attention Convolutional Neural Network[J]. Journal of Guangxi Normal University(Natural Science Edition), 2023, 41(5): 26 -36 .
[5] LIANG Zhengyou, CAI Junmin, SUN Yu, CHEN Lei. Point Cloud Classification Based on Residual Dynamic Graph Convolution and Feature Enhancement[J]. Journal of Guangxi Normal University(Natural Science Edition), 2023, 41(5): 37 -48 .
[6] OUYANG Shuxin, WANG Mingjun, RONG Chuitian, SUN Huabo. Anomaly Detection of Multidimensional QAR Data Based on Improved LSTM[J]. Journal of Guangxi Normal University(Natural Science Edition), 2023, 41(5): 49 -60 .
[7] LI Yiyang, ZENG Caibin, HUANG Zaitang. Random Attractors for Chemostat Model with Wall Attachment Driven by Fractional Brownian Motion[J]. Journal of Guangxi Normal University(Natural Science Edition), 2023, 41(5): 61 -68 .
[8] LI Pengbo, LI Yongxiang. Radial Symmetric Solutions of p-Laplace Equations on Exterior Domains[J]. Journal of Guangxi Normal University(Natural Science Edition), 2023, 41(5): 69 -75 .
[9] WU Zixian, CHENG Jun, FU Jianling, ZHOU Xinwen, XIE Jialong, NING Quan. Analysis of PI-based Event-Triggered Control Design for Semi-Markovian Power Systems[J]. Journal of Guangxi Normal University(Natural Science Edition), 2023, 41(5): 76 -85 .
[10] CHENG Lei, YAN Puxuan, DU Bohao, YE Si, ZOU Huahong. Thermal Stability and Dielectric Relaxation of MOF-2 Synthesized in Aqueous Phase[J]. Journal of Guangxi Normal University(Natural Science Edition), 2023, 41(5): 86 -95 .