Lightweight Small-Object Defect Detection for Industrial Small Transformers Based on an Improved YOLOv12 Network
Source abstract
Abstract
Appearance defect detection of small industrial transformers is challenging because defects such as bent pins, missing pins, wire breakage, and missing wires are usually small in size and weak in visual features. To improve detection accuracy while maintaining real-time deployment capability, this study proposes an improved lightweight object detection model, named YOLOv12-Optimized, for small transformer quality inspection. First, reparameterized ghost module (RepGhost) re-parameterized modules are introduced into the backbone network to enhance fine-grained feature extraction and reduce computational redundancy. Second, an improved convolutional block attention module (CBAM) is embedded in the neck network to strengthen the response to weak defect features and suppress background interference. Third, an improved wise intersection over union (WIoU) loss function with numerical stability constraints is adopted to improve bounding-box regression robustness for dense small targets. A dedicated small transformer defect dataset was constructed using industrial camera images and data augmentation. Ablation experiments demonstrate that RepGhost, improved CBAM, and improved WIoU each contribute to performance improvement, and their combination achieves the best overall results. Compared with the baseline YOLOv12 model, YOLOv12-Optimized improves mean average precision at an intersection over union threshold of 0.5 (mAP@0.5) from 77.48% to 89.17%, with precision and recall reaching 88.61% and 84.07%, respectively. The model maintains a lightweight structure with 1.98 M parameters and 5.15 giga floating-point operations (GFLOPs), while satisfying real-time inspection requirements. The results indicate that the proposed method effectively balances detection accuracy, model complexity, and industrial applicability, providing a feasible solution for automated appearance quality inspection of small transformers.
Source: crossref · Quality: baseline
Research context
OpenAlex topics: Advanced Neural Network Applications · Industrial Vision Systems and Defect Detection · Infrastructure Maintenance and Monitoring
SciVX discovery tags are terminology-based. OpenAlex topics are source-provided classifications.
Affiliations
School of Electrical and Information Engineering, Yunnan Minzu University, Kunming 650504, China
Yunnan Key Laboratory of Unmanned Autonomous Systems, Kunming 650504, China
Funding
Yunnan Key Research and Development Projects
References (42)
Show source-provided references
1. Lightweight Swin Transformer for high-precision industrial defect detection in smart manufacturing10.1016/j.aej.2025.08.055 ↗
2. A Two-Stage Focal Transformer for Human–Robot Collaboration-Based Surface Defect Inspection10.1115/1.4062860 ↗
3. Hakani, R., and Rawat, A. (2024). Edge computing-driven real-time drone detection using YOLOv9 and NVIDIA Jetson Nano. Drones, 8.10.3390/drones8110680 ↗
4. Liu, C., Ma, L., Sui, X., Guo, N., Yang, F., Yang, X., Huang, Y., and Wang, X. (2023). YOLO-CSM-based component defect and foreign object detection in overhead transmission lines. Electronics, 13.10.21203/rs.3.rs-3639443/v1 ↗
5. Wang, Q., Liu, F., Cao, Y., Ullah, F., and Zhou, M. (2024). LFIR-YOLO: Lightweight model for infrared vehicle and pedestrian detection. Sensors, 24.10.3390/s24206609 ↗
6. Redmon, J., Divvala, S., Girshick, R., and Farhadi, A. (2016, January 27–30). You only look once: Unified, real-time object detection. Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, Las Vegas, NV, USA.10.1109/CVPR.2016.91 ↗
7. He, K., Gkioxari, G., Dollár, P., and Girshick, R. (2017, January 22–29). Mask r-cnn. Proceedings of the IEEE International Conference on Computer Vision, Venice, Italy.10.1109/ICCV.2017.322 ↗
8. Dalal, N., and Triggs, B. (2005, January 20–25). Histograms of oriented gradients for human detection. Proceedings of the 2005 IEEE Computer Society Conference on Computer Vision and Pattern Recognition (CVPR’05), San Diego, CA, USA.
9. Distinctive image features from scale-invariant keypoints10.1023/B:VISI.0000029664.99615.94 ↗
10. Recognizing young apples using improved YOLOv8n
11. A Lemon Fruit Recognition Method Based on Improved YOLOv8
12. Detection and classification of Shiitake mushroom fruiting bodies based on Mamba YOLO10.1038/s41598-025-00133-z ↗
13. Hou, T., Miao, X., Wang, Z., Zhang, Y., He, Z., Sun, Y., Wang, W., and Ren, P. (2026). YOLO-Shrimp: A Lightweight Detection Model for Shrimp Feed Residues Fusing Multi-Attention Features. Sensors, 26.10.3390/s26030791 ↗
14. Li, Y., Zhang, B., Liu, Y., Wang, H., and Zhang, S. (2024). Personnel Monitoring in Shipboard Surveillance Using Improved Multi-Object Detection and Tracking Algorithm. Sensors, 24.10.3390/s24175756 ↗
15. Mekruksavanich, S., and Jitpattanakul, A. (2024). Deep residual network with a cbam mechanism for the recognition of symmetric and asymmetric human activity using wearable sensors. Symmetry, 16.10.3390/sym16050554 ↗
16. Huang, J., Mo, J., Zhang, J., and Ma, X. (2022). A fiber vibration signal recognition method based on CNN-CBAM-LSTM. Appl. Sci., 12.10.3390/app12178478 ↗
17. Yin, M., Chen, Z., and Zhang, C. (2023). A CNN-transformer network combining CBAM for change detection in high-resolution remote sensing images. Remote Sens., 15.10.3390/rs15092406 ↗
18. Deng, L., Wu, S., Zhou, J., Zou, S., and Liu, Q. (2025). LSKA-YOLOv8n-WIoU: An Enhanced YOLOv8n Method for Early Fire Detection in Airplane Hangars. Fire, 8.10.3390/fire8020067 ↗
19. Li, Z., Wu, W., Wei, B., Li, H., Zhan, J., Deng, S., and Wang, J. (2025). Rice disease detection: Tli-yolo innovative approach for enhanced detection and mobile compatibility. Sensors, 25.10.3390/s25082494 ↗
20. Wang, H., Shang, J., Wang, X., Zhang, Q., Wang, X., Li, J., and Wang, Y. (2025). Rsw-yolo: A vehicle detection model for urban UAV remote sensing images. Sensors, 25.10.3390/s25144335 ↗
21. Zhou, X., Chen, W., and Wei, X. (2024). Improved field obstacle detection algorithm based on YOLOv8. Agriculture, 14.10.3390/agriculture14122263 ↗
22. Chen, W., Wang, D., and Xie, X. (2025). An Efficient Algorithm for Small Livestock Object Detection in Unmanned Aerial Vehicle Imagery. Animals, 15.10.3390/ani15121794 ↗
23. Hao, W., Zhang, X., Liang, H., Shi, Y., Chen, L., Tang, B., Yang, S., Zhang, Y., and Zhang, Z. (2026). Instance Segmentation Method for ‘Yuluxiang’Pear at the Fruit Thinning Stage Based on Improved YOLOv8n-seg Model. Agriculture, 16.10.3390/agriculture16030346 ↗
24. Ouyang, H. (2024). Deyo: Detr with yolo for end-to-end object detection. arXiv.
25. Tan, L., Huangfu, T., Wu, L., and Chen, W. (2021). Comparison of RetinaNet, SSD, and YOLO v3 for real-time pill identification. BMC Med. Inform. Decis. Mak., 21.10.1186/s12911-021-01691-8 ↗
26. Maity, M., Banerjee, S., and Chaudhuri, S.S. (2021, January 8–10). Faster r-cnn and yolo based vehicle detection: A survey. Proceedings of the 2021 5th International Conference on Computing Methodologies and Communication (ICCMC), Erode, India.10.1109/ICCMC51019.2021.9418274 ↗
27. Yan, X., Sun, S., Zhu, H., Hu, Q., Ying, W., and Li, Y. (2025). DMF-YOLO: Dynamic Multi-Scale Feature Fusion Network-Driven Small Target Detection in UAV Aerial Images. Remote Sens., 17.10.20944/preprints202506.0837.v1 ↗
28. Computer vision in precision livestock farming: Benchmarking YOLOv9, YOLOv10, YOLOv11, and YOLOv12 for individual cattle identification10.1016/j.atech.2025.101208 ↗
29. Thermal Infrared Object Detection with YOLO Models10.31489/2025N2/121-132 ↗
30. YOLO-MTG: A lightweight YOLO model for multi-target garbage detection10.1007/s11760-024-03220-2 ↗
31. Huan, Z., Lu, J., Wang, Y., Luo, Y., Li, Z., and Li, X. (2025). Enhanced CBAM-YOLOv5s for Concrete Crack Detection in Complex Environments Using Attention Mechanism and Spatial Brightness Adjustment Algorithm. International Conference on Civil, Architecture and Disaster Prevention and Control, Springer Nature.10.1007/978-3-031-95932-5_16 ↗
32. Zhang, Z., Lu, X., Cao, G., Yang, Y., Jiao, L., and Liu, F. (2021, January 11–17). ViT-YOLO: Transformer-based YOLO for object detection. Proceedings of the IEEE/CVF International Conference on Computer Vision, Montreal, BC, Canada.
33. Nguyen, D.T., Bui, T.D., Ngo, T.M., and Ngo, U.Q. (2025). Improving YOLO-Based Plant Disease Detection Using αSILU: A Novel Activation Function for Smart Agriculture. AgriEngineering, 7.10.3390/agriengineering7090271 ↗
34. Liu, S., and Lin, J. (2025). MRS-YOLO Railroad Transmission Line Foreign Object Detection Based on Improved YOLO11 and Channel Pruning. arXiv.
35. Sapkota, R., Calero, M.F., Qureshi, R., Badgujar, C., Nepal, U., Poulose, A., Zeno, P., Vaddevolu, U.B.P., Khan, S., and Shoman, M. (2024). Yolov12 to its genesis: A decadal and comprehensive review of the you only look once (yolo) series. arXiv.
36. Sundar, A.P., Li, F., Zou, X., and Gao, T. (2024, January 29–31). Toward multimodal vertical federated learning: A traffic analysis case study. Proceedings of the 2024 33rd International Conference on Computer Communications and Networks (ICCCN), Kailua-Kona, HI, USA.
37. Xu, S., Wang, X., Lv, W., Chang, Q., Cui, C., Deng, K., Wang, G., Dang, Q., Wei, S., and Du, Y. (2022). PP-YOLOE: An evolved version of YOLO. arXiv.
38. Dense pedestrian detection based on YOLO-V4 network reconstruction and CIoU loss optimization10.1088/1742-6596/2171/1/012019 ↗
39. Wang, Y., and Zheng, J. (2018, January 23–27). Real-time face detection based on YOLO. Proceedings of the 2018 1st IEEE International Conference on Knowledge Innovation and Invention (ICKII), Jeju, Republic of Korea.
40. WLSD-YOLO: A model for detecting surface defects in wood lumber10.1109/ACCESS.2024.3395623 ↗
41. Research on small target detection in driving scenarios based on improved yolo network10.1109/ACCESS.2020.2966328 ↗
42. Ma, S., and Xu, Y. (2023). Mpdiou: A loss for efficient and accurate bounding box regression. arXiv.