{"status":"ok","message-type":"work","message-version":"1.0.0","message":{"indexed":{"date-parts":[[2026,4,21]],"date-time":"2026-04-21T14:51:26Z","timestamp":1776783086481,"version":"3.51.2"},"reference-count":39,"publisher":"MDPI AG","issue":"1","license":[{"start":{"date-parts":[[2022,12,22]],"date-time":"2022-12-22T00:00:00Z","timestamp":1671667200000},"content-version":"vor","delay-in-days":0,"URL":"https:\/\/creativecommons.org\/licenses\/by\/4.0\/"}],"funder":[{"name":"the Natural Science Foundation of China","award":["51207133"],"award-info":[{"award-number":["51207133"]}]},{"name":"the Natural Science Foundation of China","award":["2020J01272"],"award-info":[{"award-number":["2020J01272"]}]},{"name":"the Natural Science Foundation of Fujian Province, China","award":["51207133"],"award-info":[{"award-number":["51207133"]}]},{"name":"the Natural Science Foundation of Fujian Province, China","award":["2020J01272"],"award-info":[{"award-number":["2020J01272"]}]}],"content-domain":{"domain":[],"crossmark-restriction":false},"short-container-title":["Sensors"],"abstract":"<jats:p>Limited by computing resources of embedded devices, there are problems in the field of fabric defect detection, including small defect size, extremely unbalanced aspect ratio of defect size, and slow detection speed. To address these problems, a sliding window multihead self-attention mechanism is proposed for the detection of small targets, and the Swin Transformer module is introduced to replace the main module in the original YOLOv5 algorithm. First, to reduce the distance between several scales, the weighted bidirectional feature network is employed on embedded devices. In addition, it is helpful to improve the perception of small-target faults by incorporating a detection layer to achieve four-scale detection. At last, to improve the learning of positive sample instances and lower the missed detection rate, the generalized focal loss function is finally implemented on YOLOv5. Experimental results show that the accuracy of the improved algorithm on the fabric dataset reaches 85.6%, and the mAP is increased by 4.2% to 76.5%, which meets the requirements for real-time detection on embedded devices.<\/jats:p>","DOI":"10.3390\/s23010097","type":"journal-article","created":{"date-parts":[[2022,12,23]],"date-time":"2022-12-23T03:55:21Z","timestamp":1671767721000},"page":"97","update-policy":"https:\/\/doi.org\/10.3390\/mdpi_crossmark_policy","source":"Crossref","is-referenced-by-count":41,"title":["An Efficient and Intelligent Detection Method for Fabric Defects based on Improved YOLOv5"],"prefix":"10.3390","volume":"23","author":[{"given":"Guijuan","family":"Lin","sequence":"first","affiliation":[{"name":"School of Mechanical and Automotive Engineering, Xiamen University of Technology, Xiamen 361024, China"}],"role":[{"role":"author","vocabulary":"crossref"}]},{"given":"Keyu","family":"Liu","sequence":"additional","affiliation":[{"name":"School of Mechanical and Automotive Engineering, Xiamen University of Technology, Xiamen 361024, China"}],"role":[{"role":"author","vocabulary":"crossref"}]},{"given":"Xuke","family":"Xia","sequence":"additional","affiliation":[{"name":"Quanzhou Institute of Equipment Manufacturing, Haixi Institute, Chinese Academy of Sciences, Jinjiang 362216, China"}],"role":[{"role":"author","vocabulary":"crossref"}]},{"given":"Ruopeng","family":"Yan","sequence":"additional","affiliation":[{"name":"School of Mechanical and Automotive Engineering, Xiamen University of Technology, Xiamen 361024, China"}],"role":[{"role":"author","vocabulary":"crossref"}]}],"member":"1968","published-online":{"date-parts":[[2022,12,22]]},"reference":[{"key":"ref_1","first-page":"197","article-title":"Research progress of image processing technology for fabric defect detection","volume":"42","author":"Lu","year":"2021","journal-title":"Fangzhi Xuebao\/J. Text. Res."},{"key":"ref_2","doi-asserted-by":"crossref","unstructured":"Gustian, D.A., Rohmah, N.L., Shidik, G.F., Fanani, A.Z., Pramunendar, R.A. (2019, January 21\u201322). Classification of Troso Fabric Using SVM-RBF Multi-class Method with GLCM and PCA Feature Extraction. In Proceedings of the 2019 International Seminar on Application for Technology of Information and Communication, iSemantic 2019, Semarang, Indonesia.","DOI":"10.1109\/ISEMANTIC.2019.8884329"},{"key":"ref_3","doi-asserted-by":"crossref","first-page":"83962","DOI":"10.1109\/ACCESS.2019.2925196","article-title":"Defect Detection for Patterned Fabric Images Based on GHOG and Low-Rank Decomposition","volume":"7","author":"Li","year":"2019","journal-title":"IEEE Access"},{"key":"ref_4","doi-asserted-by":"crossref","unstructured":"Pan, Z., He, N., and Jiao, Z. (2017, January 25\u201326). FFT used for fabric defect detection based on CUDA. Proceedings of the 2nd IEEE Advanced Information Technology, Electronic and Automation Control Conference, IAEAC 2017, Chongqing, China.","DOI":"10.1109\/IAEAC.2017.8054389"},{"key":"ref_5","doi-asserted-by":"crossref","first-page":"202","DOI":"10.1108\/IJCST-03-2013-0031","article-title":"Fabric Defects Detection using Adaptive Wavelets","volume":"26","author":"Wen","year":"2014","journal-title":"Int. J. Cloth. Sci. Technol."},{"key":"ref_6","doi-asserted-by":"crossref","first-page":"103551","DOI":"10.1016\/j.compind.2021.103551","article-title":"Improved faster R-CNN for fabric defect detection based on Gabor filter with Genetic Algorithm optimization","volume":"134","author":"Chen","year":"2022","journal-title":"Comput. Ind."},{"key":"ref_7","doi-asserted-by":"crossref","first-page":"2423","DOI":"10.1016\/j.ifacol.2015.06.451","article-title":"A learning-based approach for automatic defect detection in textile images","volume":"48","author":"Yapi","year":"2015","journal-title":"IFAC-PapersOnLine"},{"key":"ref_8","doi-asserted-by":"crossref","first-page":"1256","DOI":"10.1109\/TASE.2016.2520955","article-title":"Deformable patterned fabric defect detection with fisher criterion-based deep learning","volume":"14","author":"Li","year":"2016","journal-title":"IEEE Trans. Autom. Sci. Eng."},{"key":"ref_9","doi-asserted-by":"crossref","unstructured":"Zhang, H.-W., Zhang, L.-J., Li, P.-F., and Gu, D. (2018, January 25\u201327). Yarn-dyed fabric defect detection with YOLOV2 based on deep convolution neural networks. Proceedings of the 2018 IEEE 7th Data Driven Control and Learning Systems Conference (DDCLS), Enshi, China.","DOI":"10.1109\/DDCLS.2018.8516094"},{"key":"ref_10","doi-asserted-by":"crossref","first-page":"161317","DOI":"10.1109\/ACCESS.2020.3021189","article-title":"Pixel-wise fabric defect detection by CNNs without labeled training data","volume":"8","author":"Wang","year":"2020","journal-title":"IEEE Access"},{"key":"ref_11","doi-asserted-by":"crossref","unstructured":"Mei, S., Wang, Y., and Wen, G. (2018). Automatic fabric defect detection with a multi-scale convolutional denoising autoencoder network model. Sensors, 18.","DOI":"10.3390\/s18041064"},{"key":"ref_12","first-page":"1","article-title":"Fabric defect segmentation method based on deep learning","volume":"70","author":"Huang","year":"2021","journal-title":"IEEE Trans. Instrum. Meas."},{"key":"ref_13","doi-asserted-by":"crossref","unstructured":"Han, K., Wang, Y., Tian, Q., Guo, J., Xu, C., and Xu, C. (2020, January 13\u201319). Ghostnet: More features from cheap operations. Proceedings of the IEEE\/CVF Conference on Computer Vision and Pattern Recognition, Seattle, WA, USA.","DOI":"10.1109\/CVPR42600.2020.00165"},{"key":"ref_14","doi-asserted-by":"crossref","unstructured":"Girshick, R., Donahue, J., Darrell, T., and Malik, J. (2014, January 23\u201328). Rich feature hierarchies for accurate object detection and semantic segmentation. Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, Columbus, OH, USA.","DOI":"10.1109\/CVPR.2014.81"},{"key":"ref_15","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_16","doi-asserted-by":"crossref","unstructured":"Santos, C., Aguiar, M., Welfer, D., and Belloni, B. (2022). A New Approach for Detecting Fundus Lesions Using Image Processing and Deep Neural Network Architecture Based on YOLO Model. Sensors, 22.","DOI":"10.3390\/s22176441"},{"key":"ref_17","doi-asserted-by":"crossref","unstructured":"Chollet, F. (2017, January 21\u201326). Xception: Deep learning with depthwise separable convolutions. Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, Honolulu, HI, USA.","DOI":"10.1109\/CVPR.2017.195"},{"key":"ref_18","doi-asserted-by":"crossref","unstructured":"Liu, H., Sun, F., Gu, J., and Deng, L. (2022). SF-YOLOv5: A Lightweight Small Object Detection Algorithm Based on Improved Feature Fusion Mode. Sensors, 22.","DOI":"10.3390\/s22155817"},{"key":"ref_19","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 IEEE Conference on Computer Vision and Pattern Recognition, Las Vegas, NV, USA.","DOI":"10.1109\/CVPR.2016.91"},{"key":"ref_20","unstructured":"Redmon, J., and Farhadi, A. (2018). Yolov3: An incremental improvement. arXiv."},{"key":"ref_21","unstructured":"Bochkovskiy, A., Wang, C.-Y., and Liao, H.-Y.M. (2020). Yolov4: Optimal speed and accuracy of object detection. arXiv."},{"key":"ref_22","doi-asserted-by":"crossref","unstructured":"Lin, T.-Y., Doll\u00e1r, P., Girshick, R., He, K., Hariharan, B., and Belongie, S. (2017, January 21\u201326). Feature pyramid networks for object detection. Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, Honolulu, HI, USA.","DOI":"10.1109\/CVPR.2017.106"},{"key":"ref_23","doi-asserted-by":"crossref","unstructured":"Rezatofighi, H., Tsoi, N., Gwak, J., Sadeghian, A., Reid, I., and Savarese, S. (2019, January 16\u201317). Generalized intersection over union: A metric and a loss for bounding box regression. Proceedings of the IEEE\/CVF Conference on Computer Vision and Pattern Recognition, Long Beach, CA, USA.","DOI":"10.1109\/CVPR.2019.00075"},{"key":"ref_24","doi-asserted-by":"crossref","first-page":"1904","DOI":"10.1109\/TPAMI.2015.2389824","article-title":"Spatial pyramid pooling in deep convolutional networks for visual recognition","volume":"37","author":"He","year":"2015","journal-title":"IEEE Trans. Pattern Anal. Mach. Intell."},{"key":"ref_25","doi-asserted-by":"crossref","unstructured":"Liu, Z., Lin, Y., Cao, Y., Hu, H., Wei, Y., Zhang, Z., Lin, S., and Guo, B. (2021, January 20\u201325). Swin transformer: Hierarchical vision transformer using shifted windows. Proceedings of the IEEE\/CVF International Conference on Computer Vision, Nashville, TN, USA.","DOI":"10.1109\/ICCV48922.2021.00986"},{"key":"ref_26","doi-asserted-by":"crossref","unstructured":"Shaw, P., Uszkoreit, J., and Vaswani, A. (2018). Self-attention with relative position representations. arXiv.","DOI":"10.18653\/v1\/N18-2074"},{"key":"ref_27","doi-asserted-by":"crossref","unstructured":"Chen, J., Mai, H., Luo, L., Chen, X., and Wu, K. (2021, January 19\u201322). Effective feature fusion network in BIFPN for small object detection. Proceedings of the 2021 IEEE International Conference on Image Processing (ICIP), Anchorage, AK, USA.","DOI":"10.1109\/ICIP42928.2021.9506347"},{"key":"ref_28","doi-asserted-by":"crossref","unstructured":"Lin, T.-Y., Goyal, P., Girshick, R., He, K., and Doll\u00e1r, P. (2017, January 22\u201329). Focal loss for dense object detection. Proceedings of the IEEE International Conference on Computer Vision, Venice, Italy.","DOI":"10.1109\/ICCV.2017.324"},{"key":"ref_29","first-page":"21002","article-title":"Generalized focal loss: Learning qualified and distributed bounding boxes for dense object detection","volume":"33","author":"Li","year":"2020","journal-title":"Adv. Neural Inf. Process. Syst."},{"key":"ref_30","first-page":"1","article-title":"ES-Net: Efficient Scale-Aware Network for Tiny Defect Detection","volume":"71","author":"Yu","year":"2022","journal-title":"IEEE Trans. Instrum. Meas."},{"key":"ref_31","doi-asserted-by":"crossref","unstructured":"Selvaraju, R.R., Cogswell, M., Das, A., Vedantam, R., Parikh, D., and Batra, D. (2017, January 22\u201329). Grad-cam: Visual explanations from deep networks via gradient-based localization. Proceedings of the IEEE International Conference on Computer Vision, Venice, Italy.","DOI":"10.1109\/ICCV.2017.74"},{"key":"ref_32","doi-asserted-by":"crossref","unstructured":"Woo, S., Park, J., Lee, J.-Y., and Kweon, I.S. (2018, January 8\u201314). Cbam: Convolutional block attention module. Proceedings of the European Conference on Computer Vision (ECCV), Munich, Germany.","DOI":"10.1007\/978-3-030-01234-2_1"},{"key":"ref_33","doi-asserted-by":"crossref","unstructured":"Hu, J., Shen, L., and Sun, G. (2018, January 8\u201312). Squeeze-and-excitation networks. Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, Salt Lake City, UT, USA.","DOI":"10.1109\/CVPR.2018.00745"},{"key":"ref_34","unstructured":"Liu, Y., Shao, Z., and Hoffmann, N. (2021). Global Attention Mechanism: Retain Information to Enhance Channel-Spatial Interactions. arXiv."},{"key":"ref_35","doi-asserted-by":"crossref","unstructured":"Liu, X., and Gao, J. (2021, January 11\u201314). Surface Defect Detection Method of Hot Rolling Strip Based on Improved SSD Model. Proceedings of the International Conference on Database Systems for Advanced Applications, Taipei, Taiwan.","DOI":"10.1007\/978-3-030-73216-5_15"},{"key":"ref_36","doi-asserted-by":"crossref","unstructured":"Zhao, W., Huang, H., Li, D., Chen, F., and Cheng, W. (2020). Pointer defect detection based on transfer learning and improved cascade-RCNN. Sensors, 20.","DOI":"10.3390\/s20174939"},{"key":"ref_37","doi-asserted-by":"crossref","unstructured":"Sujee, R., Shanthosh, D., and Sudharsun, L. (2020, January 20\u201322). Fabric Defect Detection Using YOLOv2 and YOLO v3 Tiny. Proceedings of the International Conference on Computational Intelligence in Data Science, Chennai, India.","DOI":"10.1007\/978-3-030-63467-4_15"},{"key":"ref_38","doi-asserted-by":"crossref","first-page":"675","DOI":"10.1177\/00405175211034241","article-title":"Development of a real-time machine vision system for functional textile fabric defect detection using a deep YOLOv4 model","volume":"92","author":"Dlamini","year":"2022","journal-title":"Text. Res. J."},{"key":"ref_39","doi-asserted-by":"crossref","first-page":"7321394","DOI":"10.1155\/2021\/7321394","article-title":"Automatic Fabric Defect Detection Based on an Improved YOLOv5","volume":"2021","author":"Jin","year":"2021","journal-title":"Math. Probl. Eng."}],"container-title":["Sensors"],"original-title":[],"language":"en","link":[{"URL":"https:\/\/www.mdpi.com\/1424-8220\/23\/1\/97\/pdf","content-type":"unspecified","content-version":"vor","intended-application":"similarity-checking"}],"deposited":{"date-parts":[[2025,10,11]],"date-time":"2025-10-11T01:48:05Z","timestamp":1760147285000},"score":1,"resource":{"primary":{"URL":"https:\/\/www.mdpi.com\/1424-8220\/23\/1\/97"}},"subtitle":[],"short-title":[],"issued":{"date-parts":[[2022,12,22]]},"references-count":39,"journal-issue":{"issue":"1","published-online":{"date-parts":[[2023,1]]}},"alternative-id":["s23010097"],"URL":"https:\/\/doi.org\/10.3390\/s23010097","relation":{},"ISSN":["1424-8220"],"issn-type":[{"value":"1424-8220","type":"electronic"}],"subject":[],"published":{"date-parts":[[2022,12,22]]}}}