Real-Time Defect Detection Model in Industrial Environment Based on Lightweight Deep Learning Network
Abstract
:1. Introduction
2. Network Architecture
2.1. Multiscale Feature Aggregation Network
2.2. Residual Enhancement Network
2.3. Attention Enhancement Network
3. Experiments and Results
3.1. Datasets
3.2. Experimental Parameters
3.3. Model Evaluation Metrics and Results Comparison
3.4. Results of Ablation Experiments
- -
- BS: backbone network (without attention);
- -
- ChCo: backbone network (incorporating CHAL and COAL structures);
- -
- MF: multiscale feature aggregation network;
- -
- RE: residual enhancement network;
- -
- AE: attention enhancement network.
4. Conclusions
5. Future Work
Author Contributions
Funding
Data Availability Statement
Conflicts of Interest
References
- Aboah, A.; Wang, B.; Bagci, U.; Adu-Gyamfi, Y. Real-time multi-class helmet violation detection using fewshot data sampling technique and yolov8. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, Vancouver, BC, Canada, 17–24 June 2023; pp. 5349–5357. [Google Scholar]
- Kumar, A.; Zhang, Z.J.; Lyu, H. Object detection in real time based on improved single shot multi-box detector algorithm. EURASIP J. Wirel. Commun. Netw. 2020, 2020, 204. [Google Scholar] [CrossRef]
- Zhang, S.; Yu, Z.; Liu, L.; Wang, X.; Zhou, A.; Chen, K. Group R-CNN for weakly semi-supervised object detection with points. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, New Orleans, LA, USA, 18–24 June 2022; pp. 9417–9426. [Google Scholar]
- Wan, S.; Goudos, S. Faster R-CNN for multi-class fruit detection using a robotic vision system. Comput. Netw. 2020, 168, 107036. [Google Scholar] [CrossRef]
- Cheng, G.; Wang, J.; Li, K.; Xie, X.; Lang, C.; Yao, Y.; Han, J. Anchor-free oriented proposal generator for object detection. IEEE Trans. Geosci. Remote Sens. 2022, 60, 5625411. [Google Scholar] [CrossRef]
- Sun, Y.J.; Shi, D.W.; Guo, J. Steel surface defect detection based on global context block. J. Phys. Conf. Ser. 2023, 2476, 012016. [Google Scholar] [CrossRef]
- Li, D.; Xie, Q.; Yu, Z.; Wu, Q.; Zhou, J.; Wang, J. Sewer pipe defect detection via deep learning with local and global feature fusion. Autom. Constr. 2021, 129, 103823. [Google Scholar] [CrossRef]
- Wang, J.; Song, K.; Zhang, D.; Niu, M.; Yan, Y. Collaborative learning attention network based on RGB image and depth image for surface defect inspection of no-service rail. IEEE/ASME Trans. Mechatron. 2022, 27, 4874–4884. [Google Scholar] [CrossRef]
- Huang, H.; Tang, X.; Wen, F.; Jin, X. Small object detection method with shallow feature fusion network for chip surface defect detection. Sci. Rep. 2022, 12, 3914. [Google Scholar] [CrossRef] [PubMed]
- Zhang, C.; Cui, J.; Wu, J.; Zhang, X. Attention mechanism and texture contextual information for steel plate defects detection. J. Intell. Manuf. 2023, 1–22. [Google Scholar] [CrossRef]
- Liu, T.; He, Z. TAS 2-Net: Triple-Attention Semantic Segmentation Network for Small Surface Defect Detection. IEEE Trans. Instrum. Meas. 2022, 71, 5004512. [Google Scholar]
- Li, X.; Wu, J.; Lin, Z.; Liu, H.; Zha, H. Recurrent squeeze-and-excitation context aggregation net for single image deraining. Comput. Vis. Pattern Recognit. 2018, 1807, 254–269. [Google Scholar]
- Woo, S.; Park, J.; Lee, J.Y.; Kweon, I.S. Cbam: Convolutional block attention module. Lect. Notes Comput. Sci. 2018, 1807, 06521. [Google Scholar]
- Hou, Q.; Zhou, D.; Feng, J. Coordinate attention for efficient mobile network design. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, Nashville, TN, USA, 20–25 June 2021; pp. 13708–13717. [Google Scholar]
- Liu, Z.; Li, L.; Fang, X.; Qi, W.; Shen, J.; Zhou, H.; Zhang, Y. Hard-rock tunnel lithology prediction with TBM construction big data using a global-attention-mechanism-based LSTM network. Autom. Constr. 2021, 125, 103647. [Google Scholar] [CrossRef]
- Szandała, T. Review and comparison of commonly used activation functions for deep neural networks. Mach. Learn. 2020, 2010, 09458. [Google Scholar]
- Elfwing, S.; Uchibe, E.; Doya, K. Sigmoid-weighted linear units for neural network function approximation in reinforcement learning. Neural Netw. 2018, 107, 3–11. [Google Scholar] [CrossRef] [PubMed]
- Wu, X.; Ge, Y.; Zhang, Q.; Zhang, D. PCB defect detection using deep learning methods. In Proceedings of the 2021 IEEE 24th International Conference on Computer Supported Cooperative Work in Design (CSCWD), Dalian, China, 5–7 May 2021; IEEE: New York, NY, USA; pp. 873–876. [Google Scholar]
- 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]
- Lu, Z.; Zhang, Y.; Xu, H.; Chen, H. Fabric defect detection via a spatial cloze strategy. Text. Res. J. 2023, 93, 1612–1627. [Google Scholar] [CrossRef]
- Wan, G.; Fang, H.; Wang, D.; Yan, J.; Xie, B. Ceramic tile surface defect detection based on deep learning. Ceram. Int. 2022, 48, 11085–11093. [Google Scholar] [CrossRef]
- Padilla, R.; Netto, S.L.; Da Silva, E.A.B. A survey on performance metrics for object-detection algorithms. In Proceedings of the 2020 International Conference on Systems, Signals and Image Processing (IWSSIP), Niterói, Brazil, 1–3 July 2020; IEEE: New York, NY, USA; pp. 237–242. [Google Scholar]
- Koonce, B. MobileNetV3. In Convolutional Neural Networks with Swift for Tensorflow: Image Recognition and Dataset Categorization; Apress: Berkeley, CA, USA, 2021; pp. 125–144. [Google Scholar]
- Liu, W.; Anguelov, D.; Erhan, D.; Szegedy, C.; Reed, S.; Fu, C.Y.; Berg, A.C. Ssd: Single shot multibox detector. In Computer Vision–ECCV 2016: 14th European Conference, Amsterdam, The Netherlands, October 11–14, 2016, Proceedings, Part I 14; Springer International Publishing: Cham, Switzerland, 2016; pp. 21–37. [Google Scholar]
- Zhu, X.; Lyu, S.; Wang, X.; Zhao, Q. TPH-YOLOv5: Improved YOLOv5 based on transformer prediction head for object detection on drone-captured scenarios. In Proceedings of the IEEE/CVF International Conference on Computer Vision, Montreal, BC, Canada, 11–17 October 2021; pp. 2778–2788. [Google Scholar]
- Graham, B. Fractional max-pooling. arXiv 2014, arXiv:1412.6071. [Google Scholar]
Model Name | P | R | F1 | [email protected] | [email protected] | Parameters | GFLOPS |
---|---|---|---|---|---|---|---|
MobileNetV3-L | 0.876 | 0.842 | 0.857 | 0.809 | 0.337 | 5.5M | 0.2 |
SSD-512 | 0.955 | 0.960 | 0.956 | 0.982 | 0.743 | 27.2M | 180 |
YOLOv5n | 0.932 | 0.901 | 0.916 | 0.958 | 0.593 | 1.9M | 4.5 |
YOLOv5s | 0.939 | 0.914 | 0.940 | 0.963 | 0.638 | 7.03M | 16.0 |
YOLOv8n | 0.946 | 0.948 | 0.947 | 0.980 | 0.751 | 3.2M | 8.9 |
YOLOv8s | 0.953 | 0.959 | 0.956 | 0.982 | 0.731 | 11.17M | 28.8 |
KPD | 0.955 | 0.961 | 0.958 | 0.984 | 0.731 | 2.3M | 8.8 |
Model Name | P | R | F1 | [email protected] | [email protected] | Parameters | GFLOPS |
---|---|---|---|---|---|---|---|
MobileNetV3-L | 0.407 | 0.525 | 0.457 | 0.500 | 0.159 | 5.5M | 0.2 |
SSD-512 | 0.528 | 0.640 | 0.579 | 0.603 | 0.321 | 27.2M | 180 |
YOLOv5n | 0.411 | 0.534 | 0.464 | 0.518 | 0.221 | 1.9M | 4.5 |
YOLOv5s | 0.488 | 0.592 | 0.534 | 0.558 | 0.264 | 7.03M | 16.0 |
YOLOv8n | 0.509 | 0.643 | 0.568 | 0.586 | 0.284 | 3.2M | 8.9 |
YOLOv8s | 0.526 | 0.622 | 0.570 | 0.596 | 0.301 | 11.17M | 28.8 |
KPD | 0.522 | 0.644 | 0.574 | 0.606 | 0.269 | 2.3M | 8.8 |
Model Name | P | R | F1 | [email protected] | [email protected] | Parameters | GFLOPS |
---|---|---|---|---|---|---|---|
MobileNetV3-L | 0.466 | 0.400 | 0.400 | 0.401 | 0.141 | 5.5M | 0.2 |
SSD-512 | 0.494 | 0.441 | 0.441 | 0.419 | 0.266 | 27.2M | 180 |
YOLOv5n | 0.491 | 0.408 | 0.446 | 0.404 | 0.180 | 1.9M | 4.5 |
YOLOv5s | 0.493 | 0.437 | 0.463 | 0.416 | 0.187 | 7.03M | 16.0 |
YOLOv8n | 0.441 | 0.414 | 0.427 | 0.389 | 0.189 | 3.2M | 8.9 |
YOLOv8s | 0.495 | 0.435 | 0.463 | 0.418 | 0.205 | 11.17M | 28.8 |
KPD | 0.496 | 0.442 | 0.470 | 0.421 | 0.180 | 2.3M | 8.8 |
Model Name | P | R | F1 | [email protected] | [email protected] | Parameters | GFLOPS |
---|---|---|---|---|---|---|---|
MobileNetV3-L | 0.425 | 0.421 | 0.421 | 0.392 | 0.155 | 5.5M | 0.2 |
SSD-512 | 0.590 | 0.558 | 0.572 | 0.526 | 0.288 | 27.2M | 180 |
YOLOv5n | 0.544 | 0.535 | 0.540 | 0.500 | 0.237 | 1.9M | 4.5 |
YOLOv5s | 0.588 | 0.551 | 0.527 | 0.521 | 0.259 | 7.03M | 16.0 |
YOLOv8n | 0.569 | 0.476 | 0.518 | 0.432 | 0.222 | 3.2M | 8.9 |
YOLOv8s | 0.567 | 0.434 | 0.491 | 0.446 | 0.238 | 11.17M | 28.8 |
KPD | 0.579 | 0.538 | 0.558 | 0.501 | 0.189 | 2.3M | 8.8 |
Model and Parameter Size | PCB Data | |||||||
---|---|---|---|---|---|---|---|---|
Model Name | Parameters | GFLOPS | CPU i5 12400 Speed (ms) | CPU i5 12400 mAP-0.5 | RaspberryPi 4B Speed (ms) | RaspberryPi 4B mAP-0.5 | FriendlyArm Neo2 Speed (ms) | FriendlyArm Neo2 mAP-0.5 |
MobileNetV3-L | 5.5M | 0.2 | 24 | 0.808 | 120 | 0.802 | 55 | 0.806 |
YOLOv5n | 1.9M | 4.5 | 80 | 0.956 | 880 | 0.957 | 425 | 0.955 |
YOLOv8n | 3.2M | 8.9 | 154 | 0.982 | 1255 | 0.981 | 597 | 0.979 |
KPD | 2.3M | 8.8 | 148 | 0.983 | 1025 | 0.983 | 487 | 0.980 |
Model and Parameter Size | PCB Data | |||||||
---|---|---|---|---|---|---|---|---|
Model Name | Parameters | GFLOPS | CPU i5 12400 Speed (ms) | CPU i5 12400 mAP-0.5 | RaspberryPi 4B Speed (ms) | RaspberryPi 4B mAP-0.5 | FriendlyArm Neo2 Speed (ms) | FriendlyArm Neo2 mAP-0.5 |
MobileNetV3-L | 5.5M | 0.2 | 31 | 0.500 | 144 | 0.496 | 66 | 0.501 |
YOLOv5n | 1.9M | 4.5 | 95 | 0.518 | 1144 | 0.520 | 551 | 0.516 |
YOLOv8n | 3.2M | 8.9 | 200 | 0.586 | 1565 | 0.582 | 764 | 0.586 |
KPD | 2.3M | 8.8 | 170 | 0.604 | 1412 | 0.603 | 560 | 0.605 |
Model and Parameter Size | PCB Data | |||||||
---|---|---|---|---|---|---|---|---|
Model Name | Parameters | GFLOPS | CPU i5 12400 Speed (ms) | CPU i5 12400 mAP-0.5 | RaspberryPi 4B Speed (ms) | RaspberryPi 4B mAP-0.5 | FriendlyArm Neo2 Speed (ms) | FriendlyArm Neo2 mAP-0.5 |
MobileNetV3-L | 5.5M | 0.2 | 39 | 0.398 | 188 | 0.388 | 82 | 0.399 |
YOLOv5n | 1.9M | 4.5 | 114 | 0.402 | 1430 | 0.405 | 661 | 0.406 |
YOLOv8n | 3.2M | 8.9 | 286 | 0.388 | 1800 | 0.387 | 994 | 0.389 |
KPD | 2.3M | 8.8 | 195 | 0.420 | 1694 | 0.421 | 644 | 0.417 |
Model and Parameter Size | PCB Data | |||||||
---|---|---|---|---|---|---|---|---|
Model Name | Parameters | GFLOPS | CPU i5 12400 Speed (ms) | CPU i5 12400 mAP-0.5 | RaspberryPi 4B Speed (ms) | RaspberryPi 4B mAP-0.5 | FriendlyArm Neo2 Speed (ms) | FriendlyArm Neo2 mAP-0.5 |
MobileNetV3-L | 5.5M | 0.2 | 36 | 0.3392 | 120 | 0.390 | 87 | 0.388 |
YOLOv5n | 1.9M | 4.5 | 124 | 0.502 | 880 | 0.501 | 688 | 0.499 |
YOLOv8n | 3.2M | 8.9 | 251 | 0.432 | 1255 | 0.435 | 949 | 0.435 |
KPD | 2.3M | 8.8 | 247 | 0.502 | 1025 | 0.505 | 803 | 0.500 |
Method | P | R | F1 | [email protected] |
---|---|---|---|---|
BS + ChCo +MF + RE + AE | 0.955 | 0.961 | 0.958 | 0.984 |
BS +MF +RE +AE | 0.953 | 0.954 | 0.948 | 0.978 |
BS + MF + RE | 0.946 | 0.926 | 0.941 | 0.975 |
BS + MF | 0.942 | 0.925 | 0.939 | 0.964 |
Method | P | R | F1 | [email protected] |
---|---|---|---|---|
BS + ChCo + MF + RE + AE | 0.522 | 0.644 | 0.574 | 0.606 |
BS + MF + RE + AE | 0.521 | 0.611 | 0.561 | 0.561 |
BS + MF + RE | 0.477 | 0.552 | 0.552 | 0.510 |
BS + MF | 0.456 | 0.540 | 0.495 | 0.519 |
Method | P | R | F1 | [email protected] |
---|---|---|---|---|
BS + ChCo + MF + RE + AE | 0.496 | 0.442 | 0.470 | 0.421 |
BS + MF + RE + AE | 0.491 | 0.438 | 0.463 | 0.418 |
BS + MF + RE | 0.462 | 0.422 | 0.441 | 0.411 |
BS + MF | 0.445 | 0.411 | 0.426 | 0.402 |
Method | P | R | F1 | [email protected] |
---|---|---|---|---|
BS + ChCo + MF + RE + AE | 0.579 | 0.538 | 0.558 | 0.501 |
BS + MF + RE + AE | 0.576 | 0.532 | 0.553 | 0.497 |
BS + MF + RE | 0.569 | 0.528 | 0.549 | 0.494 |
BS + MF | 0.559 | 0.511 | 0.535 | 0.486 |
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content. |
© 2023 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
Lu, J.; Lee, S.-H. Real-Time Defect Detection Model in Industrial Environment Based on Lightweight Deep Learning Network. Electronics 2023, 12, 4388. https://doi.org/10.3390/electronics12214388
Lu J, Lee S-H. Real-Time Defect Detection Model in Industrial Environment Based on Lightweight Deep Learning Network. Electronics. 2023; 12(21):4388. https://doi.org/10.3390/electronics12214388
Chicago/Turabian StyleLu, Jiaqi, and Soo-Hong Lee. 2023. "Real-Time Defect Detection Model in Industrial Environment Based on Lightweight Deep Learning Network" Electronics 12, no. 21: 4388. https://doi.org/10.3390/electronics12214388
APA StyleLu, J., & Lee, S. -H. (2023). Real-Time Defect Detection Model in Industrial Environment Based on Lightweight Deep Learning Network. Electronics, 12(21), 4388. https://doi.org/10.3390/electronics12214388