Chinese Journal of Lasers, Volume. 49, Issue 21, 2104005(2022)

Improved Lightweight X-Ray Aluminum Alloy Weld Defects Detection Algorithm Based on YOLOv5

Song Cheng1, Honggang Yang1, Xueqian Xu1, Min Li2, and Yunxia Chen1、*
Author Affiliations
  • 1School of Mechanical Engineering, Shanghai Dianji University, Shanghai 201306, China
  • 2Shanghai University of Electric Power, Shanghai 201306, China
  • show less
    Figures & Tables(17)
    SiLU activation function
    Schematic of attention mechanism
    GhostConv module
    GhostBottleneck module
    YOLOv5-Tiny frame diagram
    Image enhancement. (a) Rotating; (b) increasing the contrast
    Data analysis. (a) Distribution of center point of labeling frame; (b) size distribution of labeling frame
    Change curves of precision rate and recall rate. (a) Precision; (b) recall
    F1 values of different models
    Detection effect diagrams of different models. (a) YOLOv5s; (b) YOLOv5-Tiny-DIoU; (c) YOLOv5-Tiny-CIoU
    • Table 1. YOLOv5-Tiny structure diagram

      View table

      Table 1. YOLOv5-Tiny structure diagram

      Serial numberFromParametersModuleArguments
      0-13520Focus[3,32,3]
      1-1704DWConv[32,64,3,2]
      2-135200C3[64,64,1]
      3-11408DWConv[64,128,3,2]
      4-1222464C3[128,128,3]
      5-12048SELayer[128,16]
      6-12816DWConv[128,256,3,2]
      7-1887296C3[256,256,3]
      8-18192SELayer[256,16]
      9-15632DWConv[256,512,3,2]
      10-12231296C3[512,512,1]
      11-1656896SPP[512,512,[5,9,13]]
      12-11024DWConv[512,256,1,1]
      13-10Upsample[None,2]
      14[-1,8]0Concat[1]
      15-1408192GhostBottleneck[512,512]
      16-1768DWConv[512,128,1,1]
      17-10Upsample[None,2]
      18[-1,5]0Concat[1]
      19-1105792GhostBottleneck[256,256]
      20-12560DWConv[256,128,3,2]
      21[-1,16]0Concat[1]
      22-1105792GhostBottleneck[256,256]
      23[19,22]12336Detect 
    • Table 2. Hardware facilities

      View table

      Table 2. Hardware facilities

      HardwareConfigure
      CPUI5-11400
      GPURTX 3060
      Memory /GB16
    • Table 3. Training parameters before thawing

      View table

      Table 3. Training parameters before thawing

      ParameterContent
      Size /(pixel×pixel)416×416
      Batch_size16
      Learning_rate10-3
      OptimizerAdam
      Epoch0-80
    • Table 4. Training parameters after thawing

      View table

      Table 4. Training parameters after thawing

      ParameterContent
      Size /(pixel×pixel)416×416
      Batch_size8
      Learning_rate10-4
      OptimizerAdam
      Epoch80-200
    • Table 5. Precision and recall rate of different models on three defects

      View table

      Table 5. Precision and recall rate of different models on three defects

      ModelPrecisionRecall
      PoreSlag inclusionIncomplete penetrationPoreSlag inclusionIncomplete penetration
      YOLOv5-Tiny-DIoU85.388.284.689.291.270.8
      YOLOv5-Tiny-CIoU85.488.784.488.490.369.4
      YOLOv5s86.388.584.284.288.964.7
      YOLOv485.486.987.946.565.921.1
      YOLOv387.990.888.458.269.363.3
      YOLOv4-Tiny82.389.174.852.467.126.6
    • Table 6. Performance comparison of different models

      View table

      Table 6. Performance comparison of different models

      ModelF1ParametersWeight /MBDetection speed /(frame·s-1)
      PoreSlag inclusionIncomplete penetration
      YOLOv5-Tiny-DIoU0.870.900.7746939369.267
      YOLOv5-Tiny-CIoU0.870.890.7646939369.267
      YOLOv5s0.850.890.73706893613.757
      YOLOv40.600.750.3464040001244.442
      YOLOv30.700.790.7461949149235.151
      YOLOv4-Tiny0.640.770.39596101422.5155
    • Table 7. Average precision (AP) and mean average precision (mAP) of different models

      View table

      Table 7. Average precision (AP) and mean average precision (mAP) of different models

      ModelAPmAP@0.5
      PoreSlag inclusionIncomplete penetration
      YOLOv5-Tiny-DIoU89.99181.487.4
      YOLOv5-Tiny-CIoU89.891.280.687.2
      YOLOv5s88.291.177.185.5
      YOLOv467.379.354.467.0
      YOLOv375.286.175.378.8
      YOLOv4-Tiny63.977.645.662.3
    Tools

    Get Citation

    Copy Citation Text

    Song Cheng, Honggang Yang, Xueqian Xu, Min Li, Yunxia Chen. Improved Lightweight X-Ray Aluminum Alloy Weld Defects Detection Algorithm Based on YOLOv5[J]. Chinese Journal of Lasers, 2022, 49(21): 2104005

    Download Citation

    EndNote(RIS)BibTexPlain Text
    Save article for my favorites
    Paper Information

    Category: Measurement and metrology

    Received: Jan. 28, 2022

    Accepted: Mar. 9, 2022

    Published Online: Nov. 2, 2022

    The Author Email: Chen Yunxia (chenyx@sdju.edu.cn)

    DOI:10.3788/CJL202249.2104005

    Topics