Online Detection of Fabric Defects Based on Improved CenterNet with Deformable Convolution
<p>Three kinds of defects on the fabric surface. (<b>a</b>) Regional defects in fabrics; (<b>b</b>) Weft defect in fabric; (<b>c</b>) Warp defect in fabric</p> "> Figure 2
<p>Real-time detection framework of CenterNet. The backbone outputs three feature maps, which are C3-C5, to connect a feature pyramid network (FPN). Then FPN outputs P3-P5 feature maps as the final prediction layers.</p> "> Figure 3
<p>The architecture of key prediction network (KPN). TL is top-left corner, TR is top-right corner, BL is bottom-left corner, BR is bottom-right corner, and IoU is intersection over union.</p> "> Figure 4
<p>Illustration of 3 × 3 deformable convolution [<a href="#B27-sensors-22-04718" class="html-bibr">27</a>].</p> "> Figure 5
<p>Different convolutions. (<b>a</b>) Defective image; (<b>b</b>) traditional convolution with the kernel size of 3 × 3; (<b>c</b>) deformable convolution with the kernel size of 3 × 3.</p> "> Figure 6
<p>Hardware system. (<b>a</b>) Overall diagram of the equipment; (<b>b</b>) front view of the equipment; (<b>c</b>) rear view of the equipment.</p> "> Figure 7
<p>The internal structure diagram of the developed automatic cloth inspection equipment.</p> "> Figure 8
<p>Architecture of object detector with implicit feature pyramid network. The ResNet50 [<a href="#B25-sensors-22-04718" class="html-bibr">25</a>] is adopted as the backbone network to extract backbone features. The initial pyramid features, which are all initialized to zeros, together with the backbone features are input to the i-FPN. In the i-FPN, the nonlinear transformation function <math display="inline"><semantics> <msup> <mi>G</mi> <mi>θ</mi> </msup> </semantics></math> is employed to construct the implicit function and the equilibrium feature pyramid is injected into detection head to generate the final detection predictions.</p> "> Figure 9
<p>Two residual blocks (three layers) with deformable convolutions. (<b>a</b>) The bottleneck layer that makes the shape of the feature map invariant; (<b>b</b>) the bottleneck layer that reduces the length and width of the feature map to half.</p> "> Figure 10
<p>The pipeline of residual-like iteration. Note that <math display="inline"><semantics> <mrow> <mi>n</mi> <mo>=</mo> <mn>3</mn> </mrow> </semantics></math> in this paper.</p> "> Figure 11
<p>The architecture of the nonlinear transformation <math display="inline"><semantics> <msup> <mi>G</mi> <mi>θ</mi> </msup> </semantics></math>. The dash lines denotes pyramid convolution to reduce the computation redundancy and efficiently fuse cross-scale features.</p> "> Figure 12
<p>The pipeline of detection head.</p> "> Figure 13
<p>A partial visual result of the fabric defect detection. In each fabric image, the color boxes are the predicted bounding boxes. The color of the box represents the defect of the specified category. Among them, sub-images (a1, d1, a2, b2, c2, a3, b3, c3, e3) are warp defects; sub-images (b1, d2, e2) are weft defects; sub-images (c1, e1, d3) are regional defects.</p> "> Figure 14
<p>Performance comparison between different design choices of cross-scale connection on different type of defects. (<b>a</b>) Comparison of recall of different methods; (<b>b</b>) Comparison of Detection Rate of different methods; (<b>c</b>) Comparison of False-alarm Rate of different methods; (<b>d</b>) Comparison of <math display="inline"><semantics> <mrow> <mi>m</mi> <mi>A</mi> <mi>P</mi> </mrow> </semantics></math> of different methods</p> "> Figure 15
<p>Some examples of false detections, where the first row shows the detection results and the second row shows the ground truth. Overdetection occurs in r1, g1, r2 and g2; and missed detection occurs in r3, g3, r4, g4, r5, g5.</p> ">
Abstract
:1. Introduction
2. Theoretical Basis
2.1. Multi-Resolution CenterNet Module
2.2. Deformable Convolution Module
3. Hardware System
4. Detection Algorithm
4.1. Backbone Network
4.2. Implicit Feature Pyramid Network
4.3. Detection Head
5. Experiment
5.1. Experimental Dataset
5.2. Evaluation Criteria
5.3. Implementation Details
5.4. Ablation Study
5.5. Comparisons
5.6. Error Detection Analysis
6. Conclusions
Author Contributions
Funding
Institutional Review Board Statement
Informed Consent Statement
Data Availability Statement
Conflicts of Interest
References
- Xiang, J.; Wang, J.A.; Zhou, J.; Meng, S.; Pan, R.R.; Gao, W.D. Fabric defect detection based on a deep convolutional neural network using a two-stage strategy. Text. Res. J. 2021, 91, 130–142. [Google Scholar]
- Bu, H.G.; Wang, J.; Huang, X.B. Fabric defect detection based on multiple fractal features and support vector data description. Eng. Appl. Artif. Intell. 2009, 22, 224–235. [Google Scholar] [CrossRef]
- Mak, K.; Peng, P.; Lau, H. Optimal morphological filter design for fabric defect detection. In Proceedings of the 2005 IEEE International Conference on Industrial Technology, Hong Kong, China, 14–17 December 2005; pp. 799–804. [Google Scholar]
- Jia, L.; Chen, C.; Hou, Z. Fabric defect inspection based on lattice segmentation and Gabor filtering. Neurocomputing 2017, 238, 84–102. [Google Scholar] [CrossRef]
- Bodnarova, A.; Bennamoun, M.; Latham, S. Optimal Gabor filters for textile flaw detection. Pattern Recognit. 2002, 35, 2973–2991. [Google Scholar] [CrossRef]
- Yang, X.B. Fabric defect detection of statistic aberration feature based on GMRF model. J. Text. Res. 2013, 34, 137–142. [Google Scholar]
- Allili, M.S.; Baaziz, N.; Mejri, M. Texture modeling using contourlets and finite mixtures of generalized Gaussian distributions and applications. IEEE Trans. Multimed. 2014, 16, 772–784. [Google Scholar] [CrossRef]
- Krizhevsky, A.; Sutskever, I.; Hinton, G.E. Imagenet classification with deep convolutional neural networks. In Proceeding of the Advances in Neural information Processing Systems, Lake Tahoe, NV, USA, 3–6 December 2012. [Google Scholar]
- Silver, D.; Huang, A.; Maddison, C.J.; Guez, A.; Sifre, L.; Van Den Driessche, G.; Hassabis, D. Mastering the game of Go with deep neural networks and tree search. Nature 2016, 529, 484–489. [Google Scholar] [CrossRef] [PubMed]
- Silver, D.; Schrittwieser, J.; Simonyan, K.; Antonoglou, I.; Huang, A.; Guez, A.; Hubert, T.; Baker, L.; Lai, M.; Bolton, A.; et al. Mastering the game of go without human knowledge. Nature 2017, 550, 354–359. [Google Scholar] [CrossRef] [PubMed]
- Tao, X.; Zhang, D.; Ma, W.; Liu, X.; Xu, D. Automatic metallic surface defect detection and recognition with convolutional neural networks. Appl. Sci. 2018, 8, 1575. [Google Scholar] [CrossRef] [Green Version]
- Liu, J.; Wang, C.; Su, H.; Du, B.; Tao, D. Multistage GAN for fabric defect detection. IEEE Trans. Image Process. 2019, 29, 3388–3400. [Google Scholar] [CrossRef]
- Jing, J.F.; Ma, H.; Zhang, H.H. Automatic fabric defect detection using a deep convolutional neural network. Color. Technol. 2019, 135, 213–223. [Google Scholar] [CrossRef]
- Badrinarayanan, V.; Kendall, A.; Cipolla, R. Segnet: A deep convolutional encoder-decoder architecture for image segmentation. IEEE Trans. Pattern Anal. Mach. Intell. 2017, 39, 2481–2495. [Google Scholar] [CrossRef] [PubMed]
- Creswell, A.; White, T.; Dumoulin, V.; Arulkumaran, K.; Sengupta, B.; Bharath, A.A. Generative adversarial networks: An overview. IEEE Signal Process. Mag. 2018, 35, 53–65. [Google Scholar] [CrossRef] [Green Version]
- Li, Y.; Zhao, W.; Pan, J. Deformable patterned fabric defect detection with fisher criterion-based deep learning. IEEE Trans. Autom. Sci. Eng. 2019, 14, 1256–1264. [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, 20–23 June 2014; pp. 580–587. [Google Scholar]
- Girshick, R. Fast r-cnn. In Proceedings of the IEEE International Conference on Computer Vision, Santiago, Chile, 13–16 December 2015; pp. 1440–1448. [Google Scholar]
- Ren, S.; He, K.; Girshick, R.; Sun, J. Faster r-cnn: Towards real-time object detection with region proposal networks. In Proceeding of the Advances in Neural Information Processing Systems, Montreal, QC, Canada, 11–12 December 2015. [Google Scholar]
- Cai, Z.; Vasconcelos, N. Cascade r-cnn: Delving into high quality object detection. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, Salt Lake City, UT, USA, 18–22 June 2018; pp. 6154–6162. [Google Scholar]
- Liu, W.; Anguelov, D.; Erhan, D.; Szegedy, C.; Reed, S.; Fu, C.Y.; Berg, A.C. Ssd: Single shot multibox detector. In Proceedings of the European Conference on Computer Vision, Amsterdam, The Netherlands, 11–14 October 2016; pp. 21–37. [Google Scholar]
- Redmon, J.; Divvala, S.; Girshick, R.; Farhadi, A. You only look once: Unified, real-time object detection. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, Las Vegas, NV, USA, 26 June–1 July 2016; pp. 779–788. [Google Scholar]
- Jing, J.; Zhuo, D.; Zhang, H.; Liang, Y.; Zheng, M. Fabric defect detection using the improved YOLOv3 model. J. Eng. Fibers Fabr. 2020, 15, 1558925020908268. [Google Scholar] [CrossRef] [Green Version]
- Duan, K.; Bai, S.; Xie, L.; Qi, H.; Huang, Q.; Tian, Q. CenterNet++ for Object Detection. arXiv 2022, arXiv:2204.08394. [Google Scholar]
- He, K.; Zhang, X.; Ren, S.; Sun, J. Deep residual learning for image recognition. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, Las Vegas, NV, USA, 26 June–1 July 2016; pp. 770–778. [Google Scholar]
- He, K.; Gkioxari, G.; Dollar, P.; Girshick, R. Mask r-cnn. In Proceedings of the IEEE International Conference on Computer Vision, Honolulu, HI, USA, 21–26 July 2017; pp. 2961–2969. [Google Scholar]
- Dai, J.; Qi, H.; Xiong, Y.; Li, Y.; Zhang, G.; Hu, H.; Wei, Y. Deformable convolutional networks. In Proceedings of the IEEE International Conference on Computer Vision, Honolulu, HI, USA, 21–26 July 2017; pp. 764–773. [Google Scholar]
- Bai, S.; Kolter, J.Z.; Koltun, V. Deep Equilibrium Models. In Proceedings of the Advances in Neural Information Processing Systems: Annual Conference on Neural Information Processing Systems, Vancouver, BC, Canada, 10–12 December 2019. [Google Scholar]
- Lin, T.Y.; Goyal, P.; Girshick, R.; He, K.; Dollar, P. Focal loss for dense object detection. In Proceedings of the IEEE International Conference on Computer Vision, Venice, Italy, 22–29 October 2017; pp. 2980–2988. [Google Scholar]
- Tian, C. Smart Diagnosis of Cloth Flaw Dataset. 2020. Available online: https://tianchi.aliyun.com/dataset/dataDetail?dataId=79336 (accessed on 21 October 2020).
- Lin, T.Y.; Maire, M.; Belongie, S.; Hays, J.; Perona, P.; Ramanan, D.; Zitnick, C.L. Microsoft coco: Common objects in context. In Proceedings of the European Conference on Computer Vision, Zurich, Switzerland, 6–12 September 2014; pp. 740–755. [Google Scholar]
- Tan, M.; Pang, R.; Le, Q.V. Efficientdet: Scalable and efficient object detection. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, Seattle, WA, USA, 2020, Aug 23–28; pp. 10781–10790.
- Ghiasi, G.; Lin, T.Y.; Le, Q.V. Nas-fpn: Learning scalable feature pyramid architecture for object detection. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, Long Beach, CA, USA, 15–21 June 2019; pp. 7036–7045. [Google Scholar]
- Lin, T.Y.; Dollar, P.; Girshick, R.; He, K.; Hariharan, B.; Belongie, S. Feature pyramid networks for object detection. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, Honolulu, HI, USA, 21–26 July 2017; pp. 2117–2125. [Google Scholar]
- Wang, J.; Sun, K.; Cheng, T.; Jiang, B.; Deng, C.; Zhao, Y.; Xiao, B. Deep high-resolution representation learning for visual recognition. IEEE Trans. Pattern Anal. Mach. Intell. 2020, 43, 3349–3364. [Google Scholar] [CrossRef] [PubMed] [Green Version]
- Carion, N.; Massa, F.; Synnaeve, G.; Usunier, N.; Kirillov, A.; Zagoruyko, S. End-to-end object detection with transformers. In Proceedings of the European Conference on Computer Vision, Glasgow, UK, 23–28 August 2020; pp. 213–229. [Google Scholar]
- Zhu, X.; Su, W.; Lu, L.; Li, B.; Wang, X.; Dai, J. Deformable DETR: Deformable Transformers for End-to-End Object Detection. In Proceedings of the International Conference on Learning Representations, Vienna, Austria, 4 May 2021. [Google Scholar]
- Redmon, J.; Farhadi, A. Yolov3: An incremental improvement. arXiv 2018, arXiv:1804.02767. [Google Scholar]
- Law, H.; Deng, J. Cornernet: Detecting objects as paired keypoints. In Proceedings of the European Conference on Computer Vision, Munich, Germany, 8–14 September 2018; pp. 734–750. [Google Scholar]
- Zhao, Q.; Sheng, T.; Wang, Y.; Tang, Z.; Chen, Y.; Cai, L.; Ling, H. M2det: A single-shot object detector based on multi-level feature pyramid network. In Proceedings of the AAAI Conference on Artificial Intelligence, Honolulu, HI, USA, 27 January–1 February 2019; pp. 9259–9266. [Google Scholar]
- Tian, Z.; Shen, C.; Chen, H.; He, T. FCOS: Fully Convolutional One-Stage Object Detection. In Proceedings of the CVF International Conference on Computer Vision, Seoul, Korea, 27 October–3 November 2019; pp. 9626–9635. [Google Scholar]
- Vaswani, A.; Shazeer, N.; Parmar, N.; Uszkoreit, J.; Jones, L.; Gomez, A.N.; Polosukhin, I. Attention is all you need. In Proceedings of the Advances in Neural Information Processing Systems, Long Beach, CA, USA, 8 December 2017. [Google Scholar]
Detected as Defective | Detected as Defect-Free | |
---|---|---|
Actually defective | True Positive () | False Negative () |
Actually defect-free | False Positive () | True Negative () |
Configurations | Type | R | ||||
---|---|---|---|---|---|---|
Common convolution | warp defects | 0.818 | 0.827 | 0.108 | 0.854 | 0.481 |
weft defects | 0.809 | 0.823 | 0.112 | 0.848 | 0.469 | |
regional defects | 0.847 | 0.859 | 0.057 | 0.882 | 0.586 | |
average | 0.825 | 0.842 | 0.092 | 0.869 | 0.527 | |
Deformable convolution | warp defects | 0.876 | 0.924 | 0.051 | 0.927 | 0.624 |
weft defects | 0.881 | 0.931 | 0.047 | 0.924 | 0.623 | |
regional defects | 0.960 | 0.983 | 0.017 | 0.958 | 0.752 | |
average | 0.894 | 0.938 | 0.043 | 0.942 | 0.648 |
Types | Performance for Small Defects | Average | ||||||||
---|---|---|---|---|---|---|---|---|---|---|
None | 0.737 | 0.732 | 0.177 | 0.769 | 0.437 | 0.759 | 0.764 | 0.164 | 0.783 | 0.477 |
FPN [34] | 0.796 | 0.834 | 0.104 | 0.842 | 0.517 | 0.828 | 0.826 | 0.095 | 0.834 | 0.529 |
Bi-FPN [32] | 0.818 | 0.829 | 0.091 | 0.859 | 0.531 | 0.831 | 0.837 | 0.081 | 0.852 | 0.546 |
NAS-FPN [33] | 0.825 | 0.864 | 0.084 | 0.868 | 0.548 | 0.839 | 0.875 | 0.076 | 0.879 | 0.568 |
Dense-FPN[35] | 0.841 | 0.873 | 0.072 | 0.880 | 0.562 | 0.868 | 0.889 | 0.062 | 0.902 | 0.593 |
i-FPN | 0.875 | 0.915 | 0.057 | 0.926 | 0.614 | 0.894 | 0.938 | 0.043 | 0.942 | 0.648 |
Methods | Backbone | R | FPS | ||||
---|---|---|---|---|---|---|---|
Faster R-CNN [19] | ResNet50 | 0.806 | 0.816 | 0.128 | 0.825 | 0.427 | 13.5 |
Cascade R-CNN [20] | ResNet50 | 0.872 | 0.863 | 0.095 | 0.893 | 0.528 | 11.8 |
DETR [36] | ResNet50 | 0.859 | 0.861 | 0.098 | 0.860 | 0.492 | 10.8 |
Deformable DETR [37] | ResNet50 | 0.882 | 0.898 | 0.069 | 0.896 | 0.535 | 11.3 |
YOLOv3 [38] | DarkNet53 | 0.763 | 0.782 | 0.168 | 0.776 | 0.358 | 45.0 |
SSD [21] | VGG16 | 0.718 | 0.721 | 0.218 | 0.729 | 0.309 | 43.0 |
CornerNet [39] | Hourglass | 0.749 | 0.763 | 0.231 | 0.752 | 0.349 | 6.5 |
M2det [40] | VGG16 | 0.763 | 0.775 | 0.184 | 0.769 | 0.319 | 33.4 |
RetinaNet [29] | ResNet50 | 0.792 | 0.785 | 0.163 | 0.791 | 0.315 | 16.2 |
CenterNet-RT [24] | ResNet50 | 0.858 | 0.875 | 0.073 | 0.862 | 0.593 | 30.5 |
FCOS [41] | ResNet50 | 0.834 | 0.847 | 0.105 | 0.851 | 0.549 | 26.1 |
Proposed | ResNet50 | 0.894 | 0.938 | 0.043 | 0.942 | 0.648 | 34.8 |
Publisher’s Note: MDPI stays neutral with regard to jurisdictional claims in published maps and institutional affiliations. |
© 2022 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
Xiang, J.; Pan, R.; Gao, W. Online Detection of Fabric Defects Based on Improved CenterNet with Deformable Convolution. Sensors 2022, 22, 4718. https://doi.org/10.3390/s22134718
Xiang J, Pan R, Gao W. Online Detection of Fabric Defects Based on Improved CenterNet with Deformable Convolution. Sensors. 2022; 22(13):4718. https://doi.org/10.3390/s22134718
Chicago/Turabian StyleXiang, Jun, Ruru Pan, and Weidong Gao. 2022. "Online Detection of Fabric Defects Based on Improved CenterNet with Deformable Convolution" Sensors 22, no. 13: 4718. https://doi.org/10.3390/s22134718
APA StyleXiang, J., Pan, R., & Gao, W. (2022). Online Detection of Fabric Defects Based on Improved CenterNet with Deformable Convolution. Sensors, 22(13), 4718. https://doi.org/10.3390/s22134718