{"status":"ok","message-type":"work","message-version":"1.0.0","message":{"indexed":{"date-parts":[[2026,10,23]],"date-time":"2026-10-23T21:15:19Z","timestamp":1792790119224,"version":"4.5.0"},"reference-count":46,"publisher":"MDPI AG","issue":"5","license":[{"start":{"date-parts":[[2023,2,27]],"date-time":"2023-02-27T00:00:00Z","timestamp":1677456000000},"content-version":"vor","delay-in-days":0,"URL":"https:\/\/creativecommons.org\/licenses\/by\/4.0\/"}],"funder":[{"name":"Key Industrial Chain Project of Shaanxi Province","award":["2021ZDLGY 10-07"],"award-info":[{"award-number":["2021ZDLGY 10-07"]}]},{"name":"Key Industrial Chain Project of Shaanxi Province","award":["2017TSCYCX-24"],"award-info":[{"award-number":["2017TSCYCX-24"]}]},{"name":"Scientific-Technological Innovation Projects in Strategic Emerging Industries of Shandong Province","award":["2021ZDLGY 10-07"],"award-info":[{"award-number":["2021ZDLGY 10-07"]}]},{"name":"Scientific-Technological Innovation Projects in Strategic Emerging Industries of Shandong Province","award":["2017TSCYCX-24"],"award-info":[{"award-number":["2017TSCYCX-24"]}]}],"content-domain":{"domain":[],"crossmark-restriction":false},"short-container-title":["Sensors"],"abstract":"<jats:p>Owing to the remarkable development of deep learning algorithms, defect detection techniques based on deep neural networks have been extensively applied in industrial production. Most existing surface defect detection models assign equal costs to the classification errors among different defect categories but do not strictly distinguish them. However, various errors can generate a great discrepancy in decision risk or classification costs and then produce a cost-sensitive issue that is crucial to the manufacturing process. To address this engineering challenge, we propose a novel supervised classification cost-sensitive learning method (SCCS) and apply it to improve YOLOv5 as CS-YOLOv5, where the classification loss function of object detection was reconstructed according to a new cost-sensitive learning criterion explained by a label\u2013cost vector selection method. In this way, the classification risk information from a cost matrix is directly introduced into the detection model and fully exploited in training. As a result, the developed approach can make low-risk classification decisions for defect detection. It is applicable for direct cost-sensitive learning based on a cost matrix to implement detection tasks. Using two datasets of a painting surface and a hot-rolled steel strip surface, our CS-YOLOv5 model outperforms the original version with respect to cost under different positive classes, coefficients, and weight ratios, but also maintains effective detection performance measured by mAP and F1 scores.<\/jats:p>","DOI":"10.3390\/s23052610","type":"journal-article","created":{"date-parts":[[2023,2,27]],"date-time":"2023-02-27T05:20:50Z","timestamp":1677475250000},"page":"2610","update-policy":"https:\/\/doi.org\/10.3390\/mdpi_crossmark_policy","source":"Crossref","is-referenced-by-count":12,"title":["Cost-Sensitive YOLOv5 for Detecting Surface Defects of Industrial Products"],"prefix":"10.3390","volume":"23","author":[{"given":"Ben","family":"Liu","sequence":"first","affiliation":[{"name":"School of Mechanical and Precision Instrument Engineering, Xi\u2019an University of Technology, Xi\u2019an 710048, China"}],"role":[{"vocabulary":"crossref","role":"author"}]},{"given":"Feng","family":"Gao","sequence":"additional","affiliation":[{"name":"School of Mechanical and Precision Instrument Engineering, Xi\u2019an University of Technology, Xi\u2019an 710048, China"}],"role":[{"vocabulary":"crossref","role":"author"}]},{"given":"Yan","family":"Li","sequence":"additional","affiliation":[{"name":"School of Mechanical and Precision Instrument Engineering, Xi\u2019an University of Technology, Xi\u2019an 710048, China"}],"role":[{"vocabulary":"crossref","role":"author"}]}],"member":"1968","published-online":{"date-parts":[[2023,2,27]]},"reference":[{"key":"ref_1","doi-asserted-by":"crossref","unstructured":"Qi, S., Yang, J., and Zhong, Z. (2020, January 18\u201320). A Review on Industrial Surface Defect Detection Based on Deep Learning Technology. Proceedings of the 3rd International Conference on Machine Learning and Machine Intelligence, Hangzhou, China.","DOI":"10.1145\/3426826.3426832"},{"key":"ref_2","first-page":"409","article-title":"Refining Yolov4 for Vehicle Detection","volume":"11","author":"Mahto","year":"2020","journal-title":"Int. J. Adv. Res. Eng. Technol. (IJARET)"},{"key":"ref_3","doi-asserted-by":"crossref","first-page":"1135","DOI":"10.1007\/s00530-022-00891-0","article-title":"Multi-scale feature balance enhancement network for pedestrian detection","volume":"28","author":"He","year":"2022","journal-title":"Multimed. Syst."},{"key":"ref_4","doi-asserted-by":"crossref","first-page":"1137","DOI":"10.1109\/TPAMI.2016.2577031","article-title":"Faster R-CNN: Towards Real-Time Object Detection with Region Proposal Networks","volume":"39","author":"Ren","year":"2017","journal-title":"IEEE Trans. Pattern Anal. Mach. Intell."},{"key":"ref_5","doi-asserted-by":"crossref","unstructured":"Redmon, J., and Farhadi, A. (2017, January 21\u201326). YOLO9000: Better, Faster, Stronger. Proceedings of the 30th IEEE Conference on Computer Vision and Pattern Recognition, Honolulu, HI, USA.","DOI":"10.1109\/CVPR.2017.690"},{"key":"ref_6","doi-asserted-by":"crossref","unstructured":"He, K., Gkioxari, G., Doll\u00e1r, P., and Girshick, R. (2017, January 22\u201329). Mask R-CNN. Proceedings of the 2017 IEEE International Conference on Computer Vision (ICCV), Venice, Italy.","DOI":"10.1109\/ICCV.2017.322"},{"key":"ref_7","unstructured":"Jocher, G., Stoken, A., Borovec, J., NanoCode012, Chaurasia, A., Liu, C., Xie, T., Abhiram, V. (2021). Ul-tralytics\/Yolov5: V5.0\u2014YOLOv5-P6 1280 Models, AWS, Supervise.ly and YouTube Integrations. Zenodo, 11."},{"key":"ref_8","doi-asserted-by":"crossref","unstructured":"Redmon, J., Divvala, S., Girshick, R., and Farhadi, A. (2016, January 27\u201330). You Only Look Once: Unified, Real-Time Object Detection. Proceedings of the 2016 IEEE Conference on Computer Vision and Pattern Recognition (CVPR), Las Vegas, NV, USA.","DOI":"10.1109\/CVPR.2016.91"},{"key":"ref_9","doi-asserted-by":"crossref","unstructured":"Yang, G., Feng, W., Jin, J., Lei, Q., Li, X., Gui, G., and Wang, W. (2020, January 11\u201314). Face mask recognition system with YOLOV5 based on image recognition. Proceedings of the 2020 IEEE 6th International Conference on Computer and Communications (ICCC), Chengdu, China.","DOI":"10.1109\/ICCC51575.2020.9345042"},{"key":"ref_10","doi-asserted-by":"crossref","unstructured":"Chen, X., Lv, J., Fang, Y., and Du, S. (2022). Online Detection of Surface Defects Based on Improved YOLOV3. Sensors, 22.","DOI":"10.3390\/s22030817"},{"key":"ref_11","doi-asserted-by":"crossref","first-page":"101566","DOI":"10.1016\/j.aei.2022.101566","article-title":"Efficient surface defect detection using self-supervised learning strategy and segmentation network","volume":"52","author":"Xu","year":"2022","journal-title":"Adv. Eng. Inform."},{"key":"ref_12","doi-asserted-by":"crossref","first-page":"759","DOI":"10.1007\/s10845-019-01476-x","article-title":"Segmentation-based deep-learning approach for surface-defect detection","volume":"31","author":"Tabernik","year":"2019","journal-title":"J. Intell. Manuf."},{"key":"ref_13","doi-asserted-by":"crossref","unstructured":"Chen, Y., Ding, Y., Zhao, F., Zhang, E., Wu, Z., and Shao, L. (2021). Surface Defect Detection Methods for Industrial Products: A Review. Appl. Sci., 11.","DOI":"10.3390\/app11167657"},{"key":"ref_14","doi-asserted-by":"crossref","first-page":"181","DOI":"10.1016\/j.ijengsci.2018.09.005","article-title":"A novel approach to surface defect detection","volume":"133","author":"Da","year":"2018","journal-title":"Int. J. Eng. Sci."},{"key":"ref_15","first-page":"973","article-title":"The foundations of cost-sensitive learning","volume":"Volume 2","author":"Elkan","year":"2001","journal-title":"Proceedings of the 17th International Joint Conference on Artificial Intelligence"},{"key":"ref_16","doi-asserted-by":"crossref","first-page":"1758","DOI":"10.1109\/TPAMI.2009.195","article-title":"Cost-Sensitive Face Recognition","volume":"32","author":"Zhang","year":"2010","journal-title":"IEEE Trans. Pattern Anal. Mach. Intell."},{"key":"ref_17","doi-asserted-by":"crossref","first-page":"113653","DOI":"10.1016\/j.eswa.2020.113653","article-title":"Cost-sensitive learning classification strategy for predicting product failures","volume":"161","author":"Frumosu","year":"2020","journal-title":"Expert Syst. Appl."},{"key":"ref_18","doi-asserted-by":"crossref","unstructured":"Tan, M., Pang, R., and Le, Q.V. (2020, January 13\u201319). EfficientDet: Scalable and Efficient Object Detection. Proceedings of the IEEE\/CVF Conference on Computer Vision and Pattern Recognition, Seattle, WA, USA.","DOI":"10.1109\/CVPR42600.2020.01079"},{"key":"ref_19","doi-asserted-by":"crossref","first-page":"39","DOI":"10.1016\/j.neucom.2020.01.085","article-title":"Recent advances in deep learning for object detection","volume":"396","author":"Wu","year":"2020","journal-title":"Neurocomputing"},{"key":"ref_20","doi-asserted-by":"crossref","first-page":"863","DOI":"10.1613\/jair.1.11192","article-title":"SMOTE for Learning from Imbalanced Data: Progress and Challenges, Marking the 15-year Anniversary","volume":"61","author":"Fernandez","year":"2018","journal-title":"J. Artif. Intell. Res."},{"key":"ref_21","doi-asserted-by":"crossref","first-page":"2425","DOI":"10.1109\/TKDE.2019.2956530","article-title":"Efficient Utilization of Missing Data in Cost-Sensitive Learning","volume":"33","author":"Zhu","year":"2021","journal-title":"IEEE Trans. Knowl. Data Eng."},{"key":"ref_22","doi-asserted-by":"crossref","unstructured":"Fern\u00e1ndez, A., Garc\u00eda, S., Galar, M., Prati, R.C., Krawczyk, B., and Herrera, F. (2018). Learning from Imbalanced Data Sets, Springer.","DOI":"10.1007\/978-3-319-98074-4"},{"key":"ref_23","unstructured":"Kukar, M., and Kononenko, I. (1998). European Conference on Artificial Intelligence, John Wiley & Sons, Ltd."},{"key":"ref_24","doi-asserted-by":"crossref","first-page":"1","DOI":"10.1007\/s10618-021-00790-4","article-title":"Cost-sensitive ensemble learning: A unifying framework","volume":"36","author":"Petrides","year":"2022","journal-title":"Data Min. Knowl. Discov."},{"key":"ref_25","doi-asserted-by":"crossref","first-page":"3573","DOI":"10.1109\/TNNLS.2017.2732482","article-title":"Cost-Sensitive Learning of Deep Feature Representations from Imbalanced Data","volume":"29","author":"Khan","year":"2018","journal-title":"IEEE Trans. Neural Netw. Learn. Syst."},{"key":"ref_26","doi-asserted-by":"crossref","first-page":"63","DOI":"10.1109\/TKDE.2006.17","article-title":"Training cost-sensitive neural networks with methods addressing the class imbalance problem","volume":"18","author":"Zhou","year":"2006","journal-title":"IEEE Trans. Knowl. Data Eng."},{"key":"ref_27","doi-asserted-by":"crossref","unstructured":"Li, T., Cao, P., Yuan, Y., Fan, L., Yang, Y., Feris, R., Indyk, P., and Katabi, D. (2022, January 18\u201324). Targeted Supervised Contrastive Learning for Long-Tailed Recognition. Proceedings of the 2022 IEEE\/CVF Conference on Computer Vision and Pattern Recognition (CVPR), New Orleans, LA, USA.","DOI":"10.1109\/CVPR52688.2022.00679"},{"key":"ref_28","unstructured":"Raj, V., Magg, S., and Wermter, S. (2016). Artificial Neural Networks in Pattern Recognition, Springer."},{"key":"ref_29","unstructured":"Zhou, Z.-H. (2011). Modeling Decision for Artificial Intelligence: 8th International Conference, Springer."},{"key":"ref_30","unstructured":"Chung, Y.-A., Lin, H.-T., and Yang, S.-W. (2016, January 9\u201315). Cost-aware pre-training for multiclass cost-sensitive deep learning. Proceedings of the Twenty-Fifth International Joint Conference on Artificial Intelligence, New York, NY, USA."},{"key":"ref_31","doi-asserted-by":"crossref","first-page":"330","DOI":"10.1016\/j.neucom.2017.08.035","article-title":"A simple plug-in bagging ensemble based on threshold-moving for classifying binary and multiclass imbalanced data","volume":"275","author":"Collell","year":"2018","journal-title":"Neurocomputing"},{"key":"ref_32","unstructured":"Kuo, W., H\u00e4ne, C., Yuh, E., Mukherjee, P., and Malik, J. (2018). Medical Image Computing and Computer Assisted Intervention\u2014MICCAI, Springer."},{"key":"ref_33","doi-asserted-by":"crossref","first-page":"115673","DOI":"10.1016\/j.eswa.2021.115673","article-title":"CS-ResNet: Cost-sensitive residual convolutional neural network for PCB cosmetic defect detection","volume":"185","author":"Zhang","year":"2021","journal-title":"Expert Syst. Appl."},{"key":"ref_34","doi-asserted-by":"crossref","first-page":"676","DOI":"10.1109\/TR.2014.2316951","article-title":"Two-Stage Cost-Sensitive Learning for Software Defect Prediction","volume":"63","author":"Liu","year":"2014","journal-title":"IEEE Trans. Reliab."},{"key":"ref_35","first-page":"5666","article-title":"Cost-Sensitive Learning with Noisy Labels","volume":"18","author":"Natarajan","year":"2017","journal-title":"J. Mach. Learn. Res"},{"key":"ref_36","doi-asserted-by":"crossref","first-page":"448","DOI":"10.1002\/widm.38","article-title":"The use of decision trees for cost-sensitive classification: An empirical study in software quality prediction","volume":"1","author":"Seliya","year":"2011","journal-title":"WIREs Data Min. Knowl. Discov."},{"key":"ref_37","unstructured":"Wan, J., and Yang, M. (2019). Survey on Cost-sensitive Learning Method. J. Softw., 113\u2013136."},{"key":"ref_38","doi-asserted-by":"crossref","first-page":"1263001","DOI":"10.1142\/S0218001412630013","article-title":"Cost-sensitive neural network classifiers for postcode recognition","volume":"26","author":"Lu","year":"2012","journal-title":"Int. J. Pattern Recognit. Artif. Intell."},{"key":"ref_39","doi-asserted-by":"crossref","first-page":"707","DOI":"10.1016\/j.ress.2006.03.006","article-title":"Bayesian risk-based decision method for model validation under uncertainty","volume":"92","author":"Jiang","year":"2007","journal-title":"Reliab. Eng. Syst. Saf."},{"key":"ref_40","doi-asserted-by":"crossref","first-page":"436","DOI":"10.1038\/nature14539","article-title":"Deep learning","volume":"521","author":"LeCun","year":"2015","journal-title":"Nature"},{"key":"ref_41","doi-asserted-by":"crossref","first-page":"858","DOI":"10.1016\/j.apsusc.2013.09.002","article-title":"A noise robust method based on completed local binary patterns for hot-rolled steel strip surface defects","volume":"285","author":"Song","year":"2013","journal-title":"Appl. Surf. Sci."},{"key":"ref_42","first-page":"25","article-title":"On extending f-measure and g-mean metrics to multi-class problems","volume":"Volume 35","author":"Ebecken","year":"2005","journal-title":"Sixth International Conference on Data Mining, Text Mining and Their Business Applications"},{"key":"ref_43","doi-asserted-by":"crossref","unstructured":"Liu, W., Anguelov, D., Erhan, D., Szegedy, C., Reed, S., Fu, C.-Y., and Berg, A.C. (2016). SSD: Single Shot Multibox Detector, Springer International Publishing.","DOI":"10.1007\/978-3-319-46448-0_2"},{"key":"ref_44","doi-asserted-by":"crossref","first-page":"257","DOI":"10.1109\/TIM.2017.2775345","article-title":"Automatic Defect Detection of Fasteners on the Catenary Support Device Using Deep Convolutional Neural Network","volume":"67","author":"Chen","year":"2018","journal-title":"IEEE Trans. Instrum. Meas."},{"key":"ref_45","unstructured":"Redmon, J., and Farhadi, A. (2018). Yolov3: An incremental improvement. arXiv."},{"key":"ref_46","doi-asserted-by":"crossref","first-page":"1493","DOI":"10.1109\/TIM.2019.2915404","article-title":"An End-to-End Steel Surface Defect Detection Approach via Fusing Multiple Hierarchical Features","volume":"69","author":"He","year":"2020","journal-title":"IEEE Trans. Instrum. Meas."}],"container-title":["Sensors"],"original-title":[],"language":"en","link":[{"URL":"https:\/\/www.mdpi.com\/1424-8220\/23\/5\/2610\/pdf","content-type":"unspecified","content-version":"vor","intended-application":"similarity-checking"}],"deposited":{"date-parts":[[2025,10,10]],"date-time":"2025-10-10T18:43:42Z","timestamp":1760121822000},"score":1,"resource":{"primary":{"URL":"https:\/\/www.mdpi.com\/1424-8220\/23\/5\/2610"}},"subtitle":[],"short-title":[],"issued":{"date-parts":[[2023,2,27]]},"references-count":46,"journal-issue":{"issue":"5","published-online":{"date-parts":[[2023,3]]}},"alternative-id":["s23052610"],"URL":"https:\/\/doi.org\/10.3390\/s23052610","relation":{},"ISSN":["1424-8220"],"issn-type":[{"value":"1424-8220","type":"electronic"}],"subject":[],"published":{"date-parts":[[2023,2,27]]}}}