YOLOv4-MN3 for PCB Surface Defect Detection
Abstract
:Featured Application
Abstract
1. Introduction
2. Methodology
2.1. Framework of the Methodology
2.2. Proposed YOLOv4-MN3
2.2.1. YOLOv4-MN3 Architecture
2.2.2. Activation Functions
2.2.3. Loss Function
3. Dataset Building
3.1. Image Acquisition Device
3.2. Defect Images Collection
3.3. Data Augmentation and Labeling
4. Experiment
4.1. Evaluation Metrics
4.2. Training Details for YOLOv4-MN3
4.3. Impacts of Different Backbone Networks
4.4. Impacts of Different Activation Functions
4.5. Comparison of Different Detectors
5. Conclusions
Author Contributions
Funding
Institutional Review Board Statement
Informed Consent Statement
Data Availability Statement
Acknowledgments
Conflicts of Interest
References
- Dai, W.; Mujeeb, A.; Erdt, M.; Sourin, A. Soldering defect detection in automatic optical inspection. Adv. Eng. Inform. 2020, 43, 101004. [Google Scholar]
- Ebayyeh, A.; Mousavi, A. A review and analysis of automatic optical inspection and quality monitoring methods in electronics industry. IEEE Access. 2020, 8, 183192–183271. [Google Scholar] [CrossRef]
- Wang, W.C.; Chen, L.B.; Chang, W.J.; Chen, S.L.; Li, S.M. A machine vision based automatic optical inspection system for measuring drilling quality of printed circuit boards. IEEE Access. 2017, 5, 10817–10833. [Google Scholar] [CrossRef]
- Gaidhane, V.H.; Hote, Y.V.; Singh, V. An efficient similarity measure approach for PCB surface defect detection. Pattern Anal. Appl. 2018, 21, 277–289. [Google Scholar] [CrossRef]
- Yuk, E.H.; Park, S.H.; Park, C.-S.; Baek, J.-G. Feature-Learning-Based Printed Circuit Board Inspection via Speeded-Up Robust Features and Random Forest. Appl. Sci. 2018, 8, 932. [Google Scholar] [CrossRef] [Green Version]
- Fonseka, C.; Jayasinghe, J. Implementation of an automatic optical inspection system for solder quality classification of THT solder joints. IEEE Trans. Compon. Packag. Manufact. Tech. 2018, 9, 353–366. [Google Scholar] [CrossRef]
- Liu, Z.; Qu, B. Machine vision based online detection of PCB defect. Microprocess. Microsyst. 2021, 82, 103807. [Google Scholar] [CrossRef]
- Zou, Z.; Shi, Z.; Guo, Y.; Ye, J. Object detection in 20 years: A survey. arXiv preprint 2019, arXiv:1905.05055. Available online: https://arxiv.org/abs/1905.05055 (accessed on 16 May 2019).
- Rida, I.; Al-Maadeed, N.; Al-Maadeed, S.; Bakshi, S. A comprehensive overview of feature representation for biometric recognition. Multimed. Tools Appl. 2020, 79, 4867–4890. [Google Scholar] [CrossRef]
- Girshick, R.; Donahue, J.; Darrell, T.; Malik, J. Rich feature hierarchies for accurate object detection and semantic segmentation. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, Columbus, OH, USA, 23–28 June 2014; pp. 580–587. [Google Scholar]
- Girshick, R. Fast R-CNN. arXiv preprints 2015, arXiv:1504.08083. Available online: https://arxiv.org/abs/1504.08083 (accessed on 30 April 2015).
- Ren, S.; He, K.; Girshick, R.; Sun, J. Faster R-CNN: Towards Real-Time Object Detection with Region Proposal Networks. IEEE Trans. Pattern Anal. Mach. Intell. 2017, 39, 1137–1149. [Google Scholar] [CrossRef] [PubMed] [Green Version]
- Sharma, V.; Mir, R.N. A comprehensive and systematic look up into deep learning based object detection techniques: A review. Comput. Sci. Rev. 2020, 38, 100301. [Google Scholar] [CrossRef]
- Kou, X.; Liu, S.; Cheng, K.; Qian, Y. Development of a YOLO-V3-based model for detecting defects on steel strip surface. Measurement 2021, 182, 109454. [Google Scholar] [CrossRef]
- Li, D.; Xie, Q.; Gong, X.; Yu, Z.; Xu, J.; Sun, Y.; Wang, J. Automatic defect detection of metro tunnel surfaces using a vision-based inspection system. Adv. Eng. Inform. 2021, 47, 101206. [Google Scholar]
- Shu, Y.F.; Li, B.; Li, X.; Xiong, C.; Cao, S.; Wen, X.Y. Deep learning-based fast recognition of commutator surface defects. Measurement 2021, 178, 109324. [Google Scholar]
- Ding, R.; Dai, L.; Li, G.; Liu, H. TDD-net: A tiny defect detection network for printed circuit boards. CAAI Trans. Intell. Technol. 2019, 4, 110–116. [Google Scholar] [CrossRef]
- Hu, B.; Wang, J. Detection of PCB Surface Defects with Improved Faster-RCNN and Feature Pyramid Network. IEEE Access 2020, 8, 108335–108345. [Google Scholar] [CrossRef]
- Zhang, Y.; Xie, F.; Huang, L.; Shi, J.; Yang, J.; Li, Z. A Lightweight One-Stage Defect Detection Network for Small Object Based on Dual Attention Mechanism and PAFPN. Front. Physics. 2021, 9, 491. [Google Scholar] [CrossRef]
- Bochkovskiy, A.; Wang, C.Y.; Liao, H. Yolov4: Optimal speed and accuracy of object detection. arXiv preprint 2020, arXiv:2004.10934. Available online: https://arxiv.org/abs/2004.10934 (accessed on 23 April 2020).
- Redmon, J.; Farhadi, A. Yolov3: An incremental improvement. arXiv preprint 2018, arXiv:1804.02767. Available online: https://arxiv.org/abs/1804.02767 (accessed on 8 April 2018).
- He, K.; Zhang, X.; Ren, S.; Sun, J. Spatial pyramid pooling in deep convolutional networks for visual recognition. IEEE Trans Pattern Anal. Mach. Intell. 2014, 37, 1904–1916. [Google Scholar] [CrossRef] [Green Version]
- Liu, S.; Qi, L.; Qin, H.; Shi, J.; Jia, J. Path Aggregation Network for Instance Segmentation. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, Salt Lake City, UT, USA, 18–23 June 2018; pp. 8759–8768. Available online: https://ieeexplore.ieee.org/document/8579011 (accessed on 17 December 2018).
- Wang, C.Y.; Liao, H.; Wu, Y.H.; Chen, P.Y.; Yeh, I.H. CSPNet: A New Backbone that can Enhance Learning Capability of CNN. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition Workshops, Seattle, WA, USA, 14–19 June 2020; pp. 1571–1580. [Google Scholar]
- Howard, A.; Sandler, M.; Chen, B. Searching for mobileNetV3. In Proceedings of the IEEE/CVF International Conference on Computer Vision, Seoul, Korea, 27 October–2 November 2019; pp. 1314–1324. [Google Scholar]
- Misra, D. Mish: A self regularized non-monotonic neural activation function. arXiv preprint 2019, arXiv:1908.08681. Available online: https://arxiv.org/abs/1908.08681 (accessed on 23 August 2019).
- Guo, F.; Qian, Y.; Shi, Y. Real-time railroad track components inspection based on the improved yolov4 framework. Autom. Constr. 2021, 125, 103596. [Google Scholar] [CrossRef]
- Ramachandran, P.; Zoph, B.; Le, Q.V. Searching for activation functions. arXiv preprint 2017, arXiv:1710.05941. Available online: https://arxiv.org/abs/1710.05941 (accessed on 16 October 2017).
- Glorot, X.; Bordes, A.; Bengio, Y. Deep sparse rectifier neural networks. J. Mach. Learn. Res. 2011, 15, 315–323. Available online: https://www.researchgate.net/publication/215616967 (accessed on 14 January 2010).
- He, K.; Zhang, X.; Ren, S.; Sun, J. Delving Deep into Rectifiers: Surpassing Human-Level Performance on ImageNet Classification. Proc. IEEE Int. Conf. Comput. Vision 2015, 1, 1026–1034. [Google Scholar]
- Eger, S.; Youssef, P.; Gurevych, I. Is it Time to Swish? Comparing Deep Learning Activation Functions across NLP tasks. In Proceedings of the 2018 Conference on Empirical Methods in Natural Language Processing, Brussels, Belgium, 31 October–4 November 2018; pp. 4415–4424. [Google Scholar]
- Zhao, J.; Zhang, X.; Yan, J.; Qiu, X.; Yao, X.; Tian, Y.; Zhu, Y.; Cao, W. A Wheat Spike Detection Method in UAV Images Based on Improved YOLOv5. Remote Sens. 2021, 13, 3095. [Google Scholar] [CrossRef]
- Kulkarni, U.; Meena, S.M.; Gurlahosur, S.V.; Bhogar, G. Quantization friendly mobilenet (qf-mobilenet) architecture for vision based applications on embedded platforms. Neural Netw. 2021, 136, 28–39. [Google Scholar] [CrossRef]
Activation Function | Expression | Activation Function | Expression |
---|---|---|---|
Sigmoid | Tanh | ||
ReLU | Leaky ReLU | ||
Swish | Mish |
Defect Category | Original Images | Augmented Images |
---|---|---|
bumpy or broken line | 345 | 3090 |
clutter | 332 | 3458 |
scratch | 443 | 3463 |
line repair damage | 298 | 2816 |
Hole loss | 263 | 3132 |
over oil-filling | 327 | 3070 |
Backbone Network | mAP (%) | F1 (%) | Params (M) | Madds (G) | FPS |
---|---|---|---|---|---|
VGG16 | 96.00 | 93.17 | 51.80 | 206.03 | 55.58 |
Resnet50 | 95.10 | 90.67 | 61.54 | 53.98 | 56.74 |
Darknet53 | 95.61 | 93.00 | 77.93 | 74.24 | 54.93 |
CSPDarknet53 | 96.49 | 95.17 | 63.96 | 59.75 | 51.64 |
MobileNetV2 | 94.95 | 91.33 | 38.66 | 26.71 | 56.99 |
MobileNetV3 | 97.26 | 95.83 | 39.59 | 26.15 | 57.12 |
Activation Function | AP (%) | mAP (%) | F1 (%) | |||||
---|---|---|---|---|---|---|---|---|
Bumpy or Broken Line | Clutter | Scratch | Line Repair Damage | Hole Loss | Over Oil-Filling | |||
Sigmoid | 98.12 | 96.80 | 87.18 | 97.44 | 95.64 | 98.95 | 95.69 | 94.50 |
Tanh | 98.56 | 95.94 | 88.33 | 98.43 | 99.15 | 99.32 | 96.62 | 95.67 |
ReLU | 98.89 | 99.41 | 88.53 | 96.35 | 98.95 | 99.99 | 97.02 | 95.75 |
Leaky ReLU | 99.10 | 98.98 | 90.92 | 95.73 | 99.51 | 99.32 | 97.26 | 95.83 |
Swish | 99.66 | 98.41 | 86.80 | 98.87 | 99.91 | 100.00 | 97.28 | 96.33 |
Mish | 100.00 | 98.69 | 94.20 | 99.36 | 99.61 | 100.00 | 98.64 | 97.83 |
Publisher’s Note: MDPI stays neutral with regard to jurisdictional claims in published maps and institutional affiliations. |
© 2021 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
Liao, X.; Lv, S.; Li, D.; Luo, Y.; Zhu, Z.; Jiang, C. YOLOv4-MN3 for PCB Surface Defect Detection. Appl. Sci. 2021, 11, 11701. https://doi.org/10.3390/app112411701
Liao X, Lv S, Li D, Luo Y, Zhu Z, Jiang C. YOLOv4-MN3 for PCB Surface Defect Detection. Applied Sciences. 2021; 11(24):11701. https://doi.org/10.3390/app112411701
Chicago/Turabian StyleLiao, Xinting, Shengping Lv, Denghui Li, Yong Luo, Zichun Zhu, and Cheng Jiang. 2021. "YOLOv4-MN3 for PCB Surface Defect Detection" Applied Sciences 11, no. 24: 11701. https://doi.org/10.3390/app112411701
APA StyleLiao, X., Lv, S., Li, D., Luo, Y., Zhu, Z., & Jiang, C. (2021). YOLOv4-MN3 for PCB Surface Defect Detection. Applied Sciences, 11(24), 11701. https://doi.org/10.3390/app112411701