Online Detection of Surface Defects Based on Improved YOLOV3
Abstract
:1. Introduction
2. Related Work
2.1. YOLOV3
2.2. Lightweight Deep Convolution Network
2.3. Multi-Scale Features
3. Our Approach
3.1. Feature Extractor
3.2. Extended Feature Pyramid Network
3.3. Loss Function
4. Experiment
4.1. Experience Environment and Evaluation Matric
- (1)
- Precision, Recall, and F1 Score
- (2)
- AP and mAP
- (3)
- Params and FPS
4.2. Datasets and Preprocessing
4.3. Implementation Details
4.4. Experimental Results and Analysis
4.4.1. Experiment Results
4.4.2. Detection Results Comparison
4.4.3. Classification Results Comparison
4.4.4. Real-Time Analysis
5. Conclusions
- (a)
- Using MobileNetV2 network instead of VGG16 as the basic network of YOLOV3 algorithm, which makes the model size half and reference time decreased from 20.252 ms to 12.352 ms. Achieving significant improvement in speed.
- (b)
- Proposed EFPN extends the feature map for detection from 3 to 4 layers to obtain more information from different stages. FFM strategy is embedded in the EFPN to efficiently capture features for the extended layer with minimum noise, which significantly improves the detection accuracy, especially the noisiest Cr categories. Indicating that the structure can retain more detailed information while effectively reducing noise.
- (c)
- Use an IoU-aware training loss to solve the mismatch problem between classification confidence and positioning accuracy.
Author Contributions
Funding
Institutional Review Board Statement
Informed Consent Statement
Data Availability Statement
Conflicts of Interest
References
- Xing, J.; Jia, M. A convolutional neural network-based method for workpiece surface defect detection. Measurement 2021, 176, 109185. [Google Scholar] [CrossRef]
- Zhang, J.; Xu, J.; Zhu, L.; Zhang, K.; Liu, T.; Wang, D.; Wang, X. An improved MobileNet-SSD algorithm for automatic defect detection on vehicle body paint. Multimed. Tools Appl. 2020, 79, 23367–23385. [Google Scholar] [CrossRef]
- LeCun, Y.; Bengio, Y.; Hinton, G. Deep learning. Nature 2015, 521, 436–444. [Google Scholar] [CrossRef] [PubMed]
- Cha, Y.J.; Choi, W.; Suh, G.; Mahmoudkhani, S.; Büyüköztürk, O. Autonomous structural visual inspection using region-based deep learning for detecting multiple damage types. Comput.-Aided Civ. Infrastruct. Eng. 2018, 33, 731–747. [Google Scholar] [CrossRef]
- Zhou, Z.; Lu, Q.; Wang, Z.; Huang, H. Detection of micro-defects on irregular reflective surfaces based on improved faster R-CNN. Sensors 2019, 19, 5000. [Google Scholar] [CrossRef] [PubMed] [Green Version]
- Cheng, J.C.; Wang, M. Automated detection of sewer pipe defects in closed-circuit television images using deep learning techniques. Autom. Constr. 2018, 95, 155–171. [Google Scholar] [CrossRef]
- Li, R.; Yuan, Y.; Zhang, W.; Yuan, Y. Unified vision-based methodology for simultaneous concrete defect detection and geolocalization. Comput.-Aided Civ. Infrastruct. Eng. 2018, 33, 527–544. [Google Scholar] [CrossRef]
- Zhang, C.; Chang, C.C.; Jamshidi, M. Bridge damage detection using a single-stage detector and field inspection images. arXiv 2018, arXiv:1812.10590. [Google Scholar]
- Yin 2018, X.; Chen, Y.; Bouferguene, A.; Zaman, H.; Al-Hussein, M.; Kurach, L. A deep learning-based framework for an automated defect detection system for sewer pipes. Autom. Constr. 2020, 109, 102967. [Google Scholar] [CrossRef]
- Redmon, J.; Divvala, S.; Girshick, R.; Farhadi, A. You only look once: Unified, real-time object detection. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, Las Vegas, NV, USA, 26 June–1 July 2016; pp. 779–788. [Google Scholar]
- Redmon, J.; Farhadi, A. Yolov3: An incremental improvement. arXiv 2018, arXiv:1804.02767. [Google Scholar]
- Shen, J.; Liu, N.; Sun, H. Defect detection of printed circuit board based on lightweight deep convolution network. IET Image Process. 2020, 14, 3932–3940. [Google Scholar] [CrossRef]
- Iandola, F.N.; Han, S.; Moskewicz, M.W.; Ashraf, K.; Dally, W.J.; Keutzer, K. SqueezeNet: AlexNet-level accuracy with 50× fewer parameters and <0.5 MB model size. arXiv 2016, arXiv:1602.07360. [Google Scholar]
- Howard, A.G.; Zhu, M.; Chen, B.; Kalenichenko, D.; Wang, W.; Weyand, T.; Andreetto, M.; Adam, H. Mobilenets: Efficient convolutional neural networks for mobile vision applications. arXiv 2017, arXiv:1704.04861. [Google Scholar]
- Zhang, X.; Zhou, X.; Lin, M.; Sun, J. Shufflenet: An extremely efficient convolutional neural network for mobile devices. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, Salt Lake City, UT, USA, 18–22 June 2018; pp. 6848–6856. [Google Scholar]
- Sandler, M.; Howard, A.; Zhu, M.; Zhmoginov, A.; Chen, L.C. Mobilenetv2: Inverted residuals and linear bottlenecks. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, Salt Lake City, UT, USA, 18–22 June 2018; pp. 4510–4520. [Google Scholar]
- Lin, T.Y.; Dollár, P.; Girshick, R.; He, K.; Hariharan, B.; Belongie, S. Feature pyramid networks for object detection. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, Honolulu, HI, USA, 21–26 July 2017; pp. 2117–2125. [Google Scholar]
- Zhang, Z.; Wang, Z.; Lin, Z.; Qi, H. Image super-resolution by neural texture transfer. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, Long Beach, CA, USA, 15–20 June 2019; pp. 7982–7991. [Google Scholar]
- Shi, W.; Caballero, J.; Huszar, F.; Totz, J.; Aitken, A.P.; Bishop, R.; Rueckert, D.; Wang, Z. Real-time single image and video super-resolution using an efficient sub-pixel convolutional neural network. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, Las Vegas, NV, USA, 26 June–1 July 2016; pp. 1874–1883. [Google Scholar]
- Lin, T.Y.; Goyal, P.; Girshick, R.; He, K.; Dollár, P. Focal loss for dense object detection. In Proceedings of the IEEE International Conference on Computer Vision, Venice, Italy, 22–29 October 2017; pp. 2980–2988. [Google Scholar]
- Wu, S.; Li, X.; Wang, X. IoU-aware single-stage object detector for accurate localization. Image Vis. Comput. 2020, 97, 103911. [Google Scholar] [CrossRef] [Green Version]
- He, Y.; Song, K.; Meng, Q.; Yan, Y. An end-to-end steel surface defect detection approach via fusing multiple hierarchical features. IEEE Trans. Instrum. Meas. 2019, 69, 1493–1504. [Google Scholar] [CrossRef]
- Cheng, X.; Yu, J. RetinaNet With Difference Channel Attention and Adaptively Spatial Feature Fusion for Steel Surface Defect Detection. IEEE Trans. Instrum. Meas. 2020, 70, 2503911. [Google Scholar] [CrossRef]
- Liu, X.; Gao, J. Surface Defect Detection Method of Hot Rolling Strip Based on Improved SSD Model. In Proceedings of the International Conference on Database Systems for Advanced Applications, Taipei, Taiwan, 11–14 April 2021; Springer: Cham, Switzerland, 2021; pp. 209–222. [Google Scholar]
- Tang, M.; Li, Y.; Yao, W.; Hou, L.; Sun, Q.; Chen, J. A strip steel surface defect detection method based on attention mechanism and multi-scale maxpooling. Meas. Sci. Technol. 2021, 32, 115401. [Google Scholar] [CrossRef]
- Woo, S.; Park, J.; Lee, J.Y.; Kweon, I.S. Cbam: Convolutional block attention module. In Proceedings of the European Conference on Computer Vision (ECCV), Munich, Germany, 8–14 September 2018; pp. 3–19. [Google Scholar]
Backbone | Depth 1 | Model Size (M) | Box AP 2 | FPS 3 |
---|---|---|---|---|
DarkNet-53 | 50 | 249.2 | 31.0 | 54.977 |
MobileNetV2 | 52 | 100.7 | 29.9 | 104.291 |
Feature Map Form | Feature Map Dimensions | Scale of Anchor Box [w, h] | Total Number of Anchor Box on This Feature Map |
---|---|---|---|
P0 1 | 13 × 13 | [128, 351]; [262, 228]; [325, 392] | 13 × 13 × 3 |
P1 | 26 × 26 | [55, 318]; [156, 169]; [301, 130] | 26 × 26 × 3 |
P2 | 52 × 52 | [45, 101]; [97, 121]; [291, 56] | 52 × 52 × 3 |
P3′ | 104 × 104 | [36, 80]; [55, 163]; [107, 90] | 104 × 104 × 3 |
Parameters | Value | Note |
---|---|---|
Size of input images | 416 × 416 | data |
Loss function | ||
Optimizer | Momentum | 0.9 |
Batch size | 16 | |
Training epochs | 300 | |
Learning rate (lr) | 0.000125 | |
lr_decay_epochs | [216, 240] | The epoch where the lr declines |
lr_decay_gamma | 0.1 | lr decay rate |
Method | Backbone | mAP | Cr | In | Pa | Ps | Rs | Sc |
---|---|---|---|---|---|---|---|---|
FRCN | ResNet50 | 77.9 | 52.5 | 76.5 | 89.0 | 84.7 | 74.4 | 90.3 |
DDN [22] | ResNet50 | 82.3 | 62.4 | 84.7 | 90.7 | 89.7 | 76.3 | 90.1 |
DE_RetinaNet [23] | ResNet50 | 78.25 | 55.78 | 81.91 | 94.69 | 89.24 | 70.17 | 77.70 |
RAF-SSD [24] | ResNet50 | 75.10 | 71.10 | 75.50 | 80.10 | 72.60 | 75.30 | 75.40 |
ECA+MSMP [25] | ResNet50 | 80.86 | 55.61 | 77.84 | 93.90 | 74.43 | 89.72 | 93.66 |
YOLOV3 | DarkNet53 | 69.10 | 44.70 | 60.80 | 84.40 | 74.50 | 61.10 | 87.20 |
MN-YOLOV3 1 | MobileNetV2 | 82.90 | 56.42 | 84.93 | 93.78 | 91.74 | 78.32 | 92.19 |
IMN-YOLOV3 2 | MobileNetV2 | 86.96 | 72.04 | 86.87 | 94.78 | 94.28 | 80.58 | 93.19 |
Method | Task | Precision | Recall | F1-Score |
---|---|---|---|---|
VGG16+CBAM 1 [26] | Classification | 84.02 | 81.03 | 82.50 |
ResNet50+CBAM | Classification | 95.23 | 95.15 | 95.19 |
MobileNetV2+CBAM | Classification | 94.22 | 95.33 | 94.77 |
IMN-YOLOV3 | Classification+location | 98.37 | 95.48 | 96.90 |
Method | Backbone | Params (M) | Inference Time (ms/Image) | FPS |
---|---|---|---|---|
Faster RCNN | ResNet50 | 136.0 | 78.450 | 12.747 |
Mask R-CNN | ResNet50 | 143.9 | 86.096 | 11.615 |
SSD | VGG16 | 140.5 | 21.736 | 46.007 |
YOLOV3 | DarkNet53 | 249.2 | 20.252 | 49.377 |
MN-YOLOV3 | MobileNetV2 | 99.2 | 11.834 | 84.502 |
IMN-YOLOV3 | MobileNetV2 | 107.4 | 12.352 | 80.959 |
Publisher’s Note: MDPI stays neutral with regard to jurisdictional claims in published maps and institutional affiliations. |
© 2022 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https://creativecommons.org/licenses/by/4.0/).
Share and Cite
Chen, X.; Lv, J.; Fang, Y.; Du, S. Online Detection of Surface Defects Based on Improved YOLOV3. Sensors 2022, 22, 817. https://doi.org/10.3390/s22030817
Chen X, Lv J, Fang Y, Du S. Online Detection of Surface Defects Based on Improved YOLOV3. Sensors. 2022; 22(3):817. https://doi.org/10.3390/s22030817
Chicago/Turabian StyleChen, Xuechun, Jun Lv, Yulun Fang, and Shichang Du. 2022. "Online Detection of Surface Defects Based on Improved YOLOV3" Sensors 22, no. 3: 817. https://doi.org/10.3390/s22030817
APA StyleChen, X., Lv, J., Fang, Y., & Du, S. (2022). Online Detection of Surface Defects Based on Improved YOLOV3. Sensors, 22(3), 817. https://doi.org/10.3390/s22030817