원시데이터 수집 시스템
선정목록으로

Real‐time fabric defect detection based on multi‐scale convolutional neural network

간접 관련 패션 · (24) 패션(코오롱FnC) (17) 스펀본드 부직포(3) 자동차 인테리어 소재

기본 정보

저자
  1. Shuxuan Zhao — College of Mechanical Engineering, Donghua University, Shanghai, 201620 People's Republic of China
  2. Yin Li — College of Mechanical Engineering, Donghua University, Shanghai, 201620 People's Republic of China
  3. Jie Zhang — College of Mechanical Engineering, Donghua University, Shanghai, 201620 People's Republic of China
  4. Junliang Wang — College of Mechanical Engineering, Donghua University, Shanghai, 201620 People's Republic of China
  5. Ray Y. Zhong — Department of Industrial and Manufacturing Systems Engineering, University of Hong Kong, Hong Kong, 999077 People's Republic of China
DOI
10.1049/iet-cim.2020.0062
저널
IET Collaborative Intelligent Manufacturing
발행년도
2020
발행기관
Institution of Engineering and Technology
피인용수
39
라이선스
cc-by
논문 유형
–
언어
–
원문 페이지
https://doi.org/10.1049/iet-cim.2020.0062
토픽
Surface Roughness and Optical Measurements
OpenAlex ID
W3111560876

평가 내용

관련도
간접 관련
사업분야
패션 · (24) 패션(코오롱FnC)
부 분야
(17) 스펀본드 부직포, (3) 자동차 인테리어 소재
R&D 측면
물성·성능 평가
확신도
0.90
근거 용어
fabric defect detection, textile manufacturing, quality control, multi-scale convolutional neural network, real-time
판단 근거
본 논문은 섬유 제조 공정 중 품질 관리를 위한 실시간 결함 검출 기술(CNN 기반)을 다루고 있습니다. 이는 코오롱인더스트리의 패션(의류 소재) 및 산업용 부직포 생산 공정의 품질 관리 시스템 고도화에 응용될 수 있는 기술입니다.
R&D 활용 포인트
섬유 및 부직포 생산 라인에 AI 비전 검사 시스템을 도입하여, 육안 검사의 한계를 극복하고 미세 결함을 실시간으로 탐지함으로써 제품의 품질 신뢰성을 높이는 데 활용 가능합니다.
평가 입력
본문 42,281자 중 30,032자 발췌

초록

Fabric defect detection plays an important role in ensuring quality control in the textile manufacturing industry. This study introduces a fabric defect detection method based on a multi-scale convolutional neural network (MSCNN) to improve accuracy and time efficiency. For detection accuracy, the MSCNN is constructed to obtain different scales of feature maps, which enhance the representation of tiny scale fabric defects. A faster defect locating method is designed with pre-known size information obtained by clustering analysis to reduce the computation time. An experiment is carried out for illustrating that the accuracy of MSCNN for each defect reaches over 92%, and the frames per second (FPS) is more than 29. Further analysis results demonstrate that the proposed MSCNN can accurately detect the fabric defects with a tiny scale, and the speed of detection can reach 30 m/min to satisfy the industrial requirements.

본문 42,281자

본문 펼치기
IET Collaborative Intelligent Manufacturing _Research Article_ # Real-time fabric defect detection based on multi-scale convolutional neural network _Shuxuan Zhao_ <sup>_1_</sup> _, Li Yin_ <sup>_1_</sup> _, Jie Zhang_ <sup>_1_</sup> _, Junliang Wang_ <sup>_1_</sup> _, Ray Zhong_ <sup>_2_</sup> eISSN 2516-8398 Received on 12th June 2020 Revised 17th August 2020 Accepted on 16th September 2020 E-First on 8th December 2020 doi: 10.1049/iet-cim.2020.0062 www.ietdl.org _1College of Mechanical Engineering, Donghua University, Shanghai 201620, People's Republic of China_ _2Department of Industrial and Manufacturing Systems Engineering, University of Hong Kong, Hong Kong 999077, People's Republic of China_ _E-mail: mezhangjie@dhu.edu.cn_ Abstract: Fabric defect detection plays an important role in ensuring quality control in the textile manufacturing industry. This study introduces a fabric defect detection method based on a multi-scale convolutional neural network (MSCNN) to improve accuracy and time efficiency. For detection accuracy, the MSCNN is constructed to obtain different scales of feature maps, which enhance the representation of tiny scale fabric defects. A faster defect locating method is designed with pre-known size information obtained by clustering analysis to reduce the computation time. An experiment is carried out for illustrating that the accuracy of MSCNN for each defect reaches over 92%, and the frames per second (FPS) is more than 29. Further analysis results demonstrate that the proposed MSCNN can accurately detect the fabric defects with a tiny scale, and the speed of detection can reach 30 m/min to satisfy the industrial requirements. 1�Introduction Fabric defect detection is significant for textile quality control [1]. Traditionally, the defects are examined by skilled workers via visual sensation, as shown in Fig. 1. The manual detection method has disadvantages as a high error rate for human fatigue and lowspeed execution as skilled workers can detect only 15–20 m/min. Therefore, it's necessary to develop an automatic detection method to enhance productive efficiency [2]. In recent years, with the rapid development of digital image processing techniques and machine vision, lots of automatic detection methods are proposed to replace manual detection. The Fig. 1� _Manual-based fabric defect detection_ Fig. 2� _Different methods for fabric defect detection_ fabric defect detection methods based on machine vision are mainly divided into two groups: non-motif-based and motif-based groups. The motif-based methods require a defect-free ground truth for comparison of the motifs, but there are plenty of different fabrics with complicated background features, and even the same type of fabric has a difference because of the exchanging workshop environment, such as the noise and illumination. It is hard for motif-based methods to obtain the robust defect-free ground truth for detection [3]. Therefore, most works focused on the non-motifbased group, which can be further subdivided into five categories: statistical, spectral, model-based, learning-based, and structural [4], as shown in Fig. 2. The statistical methods [5–7] distinguish defective and defect-free regions according to the analysis of their different statistical feature, similarity, and regularity. This method is not efficient in detecting low-contrast fabrics and patterned fabrics. The spectral methods [8, 9], widely used in the study of fabric defects, highlight the differences between defective and defect-free regions in the frequency domain, which can effectively realise the detection of fabrics with a simple background. Typical spectral methods include Fourier transform, wavelet transform [10], and Gabor transform [11]. Although these methods are widely studied, they cannot effectively detect patterned fabrics. Also, the real-time requirements are difficult to meet because they are high computationally demanding. The model-based and structural methods [12] are relatively less, possibly because they are not robust enough and highly data-dependent. In this paper, we will mainly concentrate on the learning-based method. With the rapid development of artificial intelligent technology, deep learning method has achieved brilliant performance in image classification and detection. Numerous learning-based methods [13–18] have been proposed to solve the problems of fabric defect detection because of its greater extraction ability of image features. Jing _et al._ [19] proposed a learning-based method with a deep convolutional neural network (CNN) to extract the features of fabric, and used the mean shift algorithm to segment the defects, realising the detection of Yarn-dyed fabric. However, this method needs two steps to realise the detection of fabric, cannot realise the end-to-end detection of detection. Wei _et al._ [20] used a learningbased method to construct faster region-CNN (R-CNN) to classify and search defects region, acquiring high accuracy end-to-end detection of fabrics with complicated texture and small defects. While this method requires lots of computational capacity, meaning to be time consuming, which cannot meet the real-time _IET Collab. Intell. Manuf._, 2020, Vol. 2 Iss. 4, pp. 189-196 189 Fig. 3� _Different types of defects_ _(a)_ - _(d)_ Linen fabric defects are classified as stain and broken course, stain, hole and broken course types, _(e)_ - _(h)_ Patterned fabric defects are classified as hole, end out, stain and double flat requirement of detection in fabric production. Liu _et al._ [21] proposed a single shot multibox detector (SSD) method for fabric defect detection; the detector is designed directly at the end of the CNN, so that the speed of detection has been improved. However, this method failed to locate some tiny defects accurately. Although the detection algorithm based on deep learning has better performance in accuracy and more robust than other detection methods. There are still two main challenges in the defect detection task [22–26]. First, the defects with tiny scales are difficult to detect, and the existing fabric defect detection methods do not design a network aiming at this character. As shown in Fig. 3, the hole and stain defects, as the common defects, have regular shapes and scales, which are relatively easy to detect. However, the end out defects, double flat and broken course defects are tiny in scale with irregular shapes. These defects are long and narrow in shape, only a few pixels, accounting for less than 1/100 of the whole image's pixels in one direction. Compared to the defects with regular shapes, these defects with irregular shapes and tiny scales are more difficult to extract effective defects features from the fabric images detected, which improves the complexity of detection. Second, the fabric production has a high requirement for realtime defect detection; the movement speed of fabrics in production is often higher than 15 m/min. While the existing deep-learning detection methods do not consider the similarity shapes and sizes of the same types of fabric defects when designing the detector, which always causes time-consuming of detection, it can hardly satisfy the real-time demand of fabric detection, and will lead to a decrease in productivity. That means they cannot be applied in practice. In this paper, a deep-learning-based detection method, multiscale CNN (MSCNN), is proposed to realise the detection for five types of defects in linen fabric and patterned fabric. Compared with other detection methods, there are two main contributions: (i) Targeting at existing fabric defects detection methods have low accuracy in detecting tiny-scale defects, applies the pyramid features a method in a neural network to enhance the feature representation and detection accuracy of tiny scale fabric defects. (ii) For real-time detection, taking advantage of the similarity of the same type of defects, using the K-means clustering analysis to obtain defects bounding boxes with pre-known size information, which are used to replace existing time-consuming locating methods, so as to reduce the computation in location and improve the speed of detection. The rest of this paper is organised as follows: Section 2 presents the MSCNN framework and the model training process. Section 3 reports the experiments and discussion. Section 4 shows the conclusion and raises several future issues. 2�Proposed fabric defects detection method _2.1 Framework of MSCNN model_ Aiming at existing fabric defects detection methods have low accuracy for detecting tiny-scale defects, we take advantage of the strong ability of pyramid features [27] for extracting multi-scale features, apply the pyramid features a method in neural network and propose the MSCNN to improve the detection accuracy for tiny scale defects. The MSCNN is constructed using feature fusion based on the VGG16 network [28]. To satisfy the requirement of fabric detection, we take advantage of that the same type of defects always have similar shapes and sizes, using a clustering algorithm to get the common size of all types defects, and then using these defects bounding boxes with pre-knowledge to replace the region generation method in defects locating, so as to reduce the computation required in the defects location process and to improve the speed of detection. The framework of the proposed MSCNN is shown in Fig. 4. _2.1.1 Fabric image feature extraction:_ In the progress of detection: the fabric images captured by the line-scan chargecoupled device (CCD) camera are used as input, and standardised as the matrix X = _x_ 1, 1, …, _xi_, _j_ . The CNN is used to extract features from the image matrix, and obtain the feature map with the pixel of 13*13 and 26*26, respectively. The feature map is input in the detection module, and the output is location and classification information of fabric defects detection. At the front end of the CNN, the features of fabric images are extracted using convolution and pooling. The 3*3 size and 1 step small convolution kernels are used in the convolutional layer to enhance the ability to extract the local features of the fabric images; the convolution computation formula is shown as 190 _IET Collab. Intell. Manuf._, 2020, Vol. 2 Iss. 4, pp. 189-196 Fig. 4� _Overall framework of the proposed MSCNN model_ ∞ ## zu, v = ∑ The defects bounding boxes with pre-known size information is obtained K-means clustering algorithm; the clustering algorithm is shown as _i_ = −∞ ∞ ## ∑ _j_ = −∞ _xi_, _j_ ⋅ _wu_ - _i_, _v_ - _j_ + _bi_, _j_ (1) where _xi_, _j_ is the value of the pixel matrix of the fabric images. _wu_ - _i_, _v_ - _j_ is the value of weight matrixes and _bi_, _j_ is the bias value. The tanh activation function is used to non-linear the convolution feature _zu_, _v_, so as to enhance the feature extraction ability of CNN, the tanh function is shown as _k_ _n_ ## ∑ _i_ = 1 ## J = Min ∑ 2 (3) _k_ = 1 ∥ _xi_ - _uk_ ∥ where _xi_ are the coordinates _w_ box _i_ box _k_, _h_ box _k_ box _i_ of defects bounding boxes box _i_, _h_ box _i_ _h_ 1 = tanh( _z_ ) = <sup>_<u>ez</u>_</sup> <sup><u>−</u></sup> <sup>_<u>e</u>_</sup> <sup>−</sup> <sup>_z_</sup> (2) _e_ <sup>_z_</sup> + _e_ <sup>−</sup> <sup>_z_</sup> in datasets, _uk_ are the coordinates _w_ box _k_, _h_ box _k_ of defects bounding boxes with the pre-known size we want to obtain, and _uk_ are randomly assigned to an initial value at first, _k_ is the number of defects bounding box types. In this study, we set _k_ = 4 corresponding to four types of defects. By iterating and minimising the _J_, the defects bounding boxes _xi_ are divided into four categories according to their size and aspect ratio. in datasets, _uk_ are the coordinates _w_ box _k_ After that, the convolution layer outputs the feature matrix _H_ = [ _h_ 1, 1, …, _hu_, _v_ ], _H_ is taken as the input of the pooling layer. The pooling layer uses 2*2 size Maxpooling operation to conduct the down-sampling of feature matrix; while extracting the key features of fabric images, the parameters of the CNN are reduced, so as to improve the computation speed of the CNN. The feature map with the pixel of 13*13 and 26*26 is finally extracted after multiple convolutions and pooling operations. At the back end of the CNN, feature maps of different pixels are used as two independent branches to detect. The feature maps with the pixel of 26*26 have a higher feature pixel, which is used to identify tiny defects in fabric images, such as hole, end out and broken course. The feature maps with the pixel of 13*13, which are used to identify more obvious defects, such as stain. At the same time, the twice up-sampling of the 13*13 feature maps are conducted, and obtain new 26*26 feature maps to conduct feature fusion with original 26*26 feature maps, so as to enhance the feature extraction ability of 26*26 feature maps. By constructing an MSCNN to extract tiny scale defects feature, respectively, the detection accuracy of tiny defects is improved. The parameters of CNN are shown in Table 1. _2.1.2 Defects location and classification:_ In the fabric production process, the two main factors determining the shape and size of defects are fabric type and production equipment. Although the shape of defects varies from this fabric to another, there is no significant difference in shape and size between the same defects. In order to reduce the computation of location and to improve the speed of detection, the locating method is designed with pre-known size information obtained by clustering analysis [29, 30] to reduce the computation time of defect region generation as shown in Fig. 5. After obtaining the categories of defects, The intersection over union (IOU ) between each type of defect bounding boxes with pre-known size and corresponding defect bounding box was calculated, respectively. The IOU represents the overlap ratio, and the higher the IOU is, the higher the overlap degree will be. When the intersection ratio value is one, it means that the defects bounding boxes with pre-known defects size and corresponding defect bounding box completely coincide. The formula of IOU is shown as _k_ box <sup><u>box</u></sup> _ii_,, _h h_ boxbox _ii_ <u>box</u> _k_ <u>,</u> _h_ <u>box</u> _k_ box _k_, _h_ box _k_ IOU _i_ = <sup><u>Box</u></sup> <sup>_w_</sup> <sup><u>box</u></sup> _ii_ <u>,</u> Box _w_ box _i_, <u>box</u> _i_ <u>∩Box</u> _w_ <u>box</u> _k_ box _i_ ∪Box _w_ box _k_ box _k_ (4) box _i_, _w_ box _k_ _k_ _i_ box = min _w_ box box _i_, _h_ box _i_ box _k_, _h_ box _k_ Box _w_ box _i_, _h_ box _i_ ∩Box _w_ box _k_, _h_ box _k_ = min _w_ box _i_, _w_ box _k_ - min _h_ box _i_, _h_ box _k_ Box _w_ box _i_ box _i_ ∩Box _w_ box _k_ box, _h_ box ∩Box _w_ box = min _w_ box, _w_ box - min _k_ (5) box _i_, _h_ box _k_ (see (6)) where Box _w_ box, _h_ box represent the defects bounding boxes with the pre-known defects size corresponding to ( _w_ box, _h_ box) in length and width. Although set _D_ to be the optimisation parameters of IOU _D_ = <sup><u>1</u></sup> _N_ _N_ (1 −IOU _i_ )2 (7) 2 (7) <sup><u>1</u></sup> ## N i ∑ = 0 _i_ = 0 The gradient descent algorithm is used to optimise the parameters _D_ . After many iterations, the maximum size parameters of the _IET Collab. Intell. Manuf._, 2020, Vol. 2 Iss. 4, pp. 189-196 191 <u>Table 1</u> <u>Parameters of CNN</u> <u>Layer</u> <u>Size</u> <u>Filters</u> <u>Input</u> <u>Output</u> 1 Conv 3*3/1 16 416*416*3 416*416*16 2 MaxP 2*2/2 - 416*416*16 208*208*16 3 Conv 3*3/1 32 208*208*16 208*208*32 4 MaxP 2*2/2 - 208*208*32 104*104*32 5 Conv 3*3/1 64 104*104*32 104*104*64 6 MaxP 2*2/2 - 104*104*64 52*52*64 7 Conv 3*3/1 128 52*52*64 52*52*128 8 MaxP 2*2/2 - 52*52*128 26*26*128 9 Conv 3*3/1 256 26*26*128 26*26*256 10 MaxP 2*2/2 - 26*26*256 13*13*256 11 Conv 3*3/1 512 13*13*256 13*13*512 12 MaxP 2*2/1 - 13*13*512 13*13*512 13 Conv 3*3/1 256 13*13*512 13*13*256 14 Conv 3*3/1 256 13*13*256 13*13*256 15 Conv 1*1/1 27 13*13*256 13*13*27 detect - - - route 13 - - - 16 Conv 1*1/1 128 13*13*256 13*13*128 17 up-sample 2 13*13*128 26*26*128 routes 17, 9 - - - 18 Conv 3*3/1 256 26*26*384 26*26*256 19 Conv 1*1/1 27 26*26*256 26*26*27 <u>detect</u> <u>—</u> <u>—</u> <u>—</u> <u>—</u> bounding boxes of four categories are scaled in turn, and the size parameters ( _bw_, _bh_ ) of the defects bounding boxes corresponding to the feature map are obtained, which are shown as _<mark>b</mark>_ _w_ <mark>=</mark> _<mark>p</mark>_ _w_ _<mark>e</mark>_ <sup>_w_</sup> <mark>(</mark> 10) _<mark>b</mark>_ _w_ <mark>=</mark> _<mark>p</mark>_ _w_ _<mark>e</mark>_ <sup>_w_</sup> <mark>(</mark> 11) Fig. 5� _Fabric defect detection with pre-known defects size bounding boxes_ defects bounding boxes with pre-known size for each type of defects are obtained; the gradient descent formula is shown as _t_ box _t_ + 1 = _w_ box ∂ _w_ box _t_ <sup>_<u>D</u>_</sup> _t_ (8) Thirdly, the feature map is divided into _N_ - _N_ cells according to the columns and rows of the feature map, the centre of each cell is obtained as the anchor coordinates ( _tx_, _ty_ ). Each anchor coordinate is matched with the corresponding four types of defects bounding boxes, and only generate a total number of _N_ - _N_ *4 defects bounding boxes. Finally, the classification probability _P_ ( _i_ ) of the defects and the confidence of defects bounding boxes are computed, which are shown as _<u>e</u>_ <sup>_hi_</sup> _P_ ( _i_ ) = (12) ∑ _j_ _e_ <sup>_hj_</sup> <mark>Confidence =</mark> _<mark>P</mark>_ <mark>(</mark> _<mark>i</mark>_ <mark>)*IOU</mark> _i_ <mark>(</mark> 13) where _hi_ represents the value of the convolution kernels corresponding to the last convolutional layer. The confidence threshold value of the defects bounding box is set according to the detection requirements, and the threshold segmentation is used to remove the defects bounding boxes with a confidence lower than the threshold, so as to output the final fabric defect detection result, which is shown as _Y_ = <sup>0</sup> if confidence ≤ _T_ (14) 1 otherwise _w_ box _t_ + 1 _t_ box - _α_ <sup><u>∂</u></sup> <sup>_<u>D</u>_</sup> _t_ box _t_ + 1 = _h_ box _t_ ∂ _h_ box _t_ <sup>_<u>D</u>_</sup> _t_ (9) _h_ box _t_ + 1 _t_ box - _α_ <sup><u>∂</u></sup> <sup>_<u>D</u>_</sup> _t_ After obtaining the size parameters of the defects bounding boxes with pre-known size, the feature map of the last convolution is input to detection. Although CNN's can extract fabric image features efficiently, it is hard to locate fabric defects. To locate the defects, it is necessary to match the defects bounding boxes with the feature map. Firstly, the scaling ratios _pw_ and _ph_ are obtained according to the matrix column-to-column ratio between the feature and the defects bounding boxes. Secondly, after obtaining the scaling ratios, the size parameters _w_ box _k_, _h_ box _k_ of the defects box _k_, _h_ box _k_ box _k_ of the defects box _i_ - _h_ box _i_ + _w_ box _k_ (6) _k_ _k_ _i_ box = _w_ box box _k_ - _h_ box _k_ _k_ box _i_, _h_ box _i_ box _k_, _h_ box _k_ Box _w_ box _i_, box _i_ ∪Box _w_ box _k_ box _i_, _w_ box _k_ + min _w_ box _i_ box _k_ - min _h_ box _i_, _h_ box _k_ 192 _IET Collab. Intell. Manuf._, 2020, Vol. 2 Iss. 4, pp. 189-196 Fig. 6� _Automatic fabric defect detection experimental platform_ <u>Table 2</u> <u>Fabric defect datasets</u> <u>Types</u> <u>Stain</u> <u>End-out</u> <u>Broken curse</u> <u>Double flat</u> <u>Hole</u> linen fabric 118 106 97 - 101 <u>patterned fabric</u> <u>109</u> <u>104</u> <u>—</u> <u>96</u> <u>106</u> where the _T_ represents the threshold, and the _Y_ represents the final output defects bounding box in the detection results. _2.2 Model training_ Image brightness changes and image noise caused by light changes and floating dust often appear in fabric image acquisition, which will influence the detection accuracy. The illumination normalisation [31] and noise corruption are processed to simulate the images of fabric in different workshop environments before the model training, so as to enhance the robust for the detection model to environmental changes. The model training takes the fabric images and defects bounding boxes with pre-known defects size as input, and improves the detection accuracy by minimising the loss function, the procedures of model training are as follows: _Input_ : Dataset X, defects bounding boxes with pre-known defects size _uk_ = _w_ box _k_, _h_ box _k_, number of epochs. _WH_ loss _N_ <sup>2</sup> _B_ _B_ ## ∑ _j_ = 0 obj _ij_ _w_ box _i_ (16) 2 ^ _i_ _h_ box 2 <sup>^</sup> _i_ box + _h_ box _i_ = _λ_ coord∑ box _i_ - _h_ ^ ^ ℓ _ij_ box _i_ - _w_ <sup>^</sup> _i_ _i_ = 0 _N_ <sup>2</sup> ## ∑ _j_ = 0 _B_ Classloss = ∑ _B_ _N_ <sup>2</sup> ℓobj _ij_ 2 + ∑ _i_ = 0 ℓ _i_ _pi_ ( _c_ ) − _p_ <sup>^</sup> _i_ <sup>(</sup> <sup>_c_</sup> <sup>)</sup> _i_ = 0 ## i obj ∑ _j_ = 0 ^ _Ci_ - _CI_ ^ _i_ = 0 _j_ = 0 _i_ = 0 _j_ = 0 (17) 2 _I_ _s_ <sup>2</sup> Confidenceloss = _λ_ noobj∑ ℓ _ij_ ^ _I_ 2 (18) _i_ = 0 _B_ ## ∑ _j_ = 0 ^ _ij_ noobj _Ci_ - _CI_ box _k_, _h_ box _k_ size _uk_ = _w_ box _k_, _h_ box _k_, number of epochs. _Process_ _Step 1_ : Randomly set network parameters _W_ ( <mark>Loss =</mark> _<mark>XY</mark>_ loss <mark>+</mark> _<mark>WH</mark>_ loss <mark>+ Class</mark> loss <mark>+ Confidence</mark> loss <mark>(</mark> 19) _Step 1_ : Randomly set network parameters _W_ ( _l_ ), _b_ ( _l_ ), and centre of anchor coordinates _xi_, _yi_ . _Step 2_ : Iterative update parameters for _i_ = 1 to _m_ Calculate the _Loss_ Calculate the partial derivatives: ∇ _W_ ( _l_ ) = ∂Loss/∂ _W_ ( _l_ ), where _N_ - _N_ represents the cell number of the feature map. _B_ represents the number of defects bounding boxes generated in each feature map. ℓobj _ij_ represents whether there are defects in the cell _i_ ( _l_ ), _b_ ( feature map. ℓobj _ij_ represents whether there are defects in the cell _i_ and bounding box _j_, when there are defects in the bounding box ℓ _ij_ obj = 1, otherwise ℓobj _ij_ = 0( _xi_, _yi_ ) represent the centre coordinates _ij_ obj = 1, otherwise ℓobj _ij_ ℓ _ij_ obj = 1, otherwise ℓobj _ij_ = 0( _xi_, _yi_ ) represent the centre coordinates of the cell _i_, ( _x_ <sup>^</sup> _i_ <sup>,</sup> <sup>_y_</sup> <sup>^</sup> _i_ <sup>) represent the actual centre coordinates of</sup> of the cell _i_, ( _x_ <sup>^</sup> _i_ <sup>,</sup> <sup>_y_</sup> <sup>^</sup> _i_ <sup>) represent the actual centre coordinates of</sup> defects area. _w_ box _i_, _h_ box _i_ represent the defects bounding boxes size box _i_, _h_ box _i_ _i_ <sup>,</sup> <sup>_y_</sup> <sup>^</sup> ( _l_ ), in the cell _i_ . _w_ <sup>^</sup> _i_ box, _h_ ^ ( _l_ ) = ∂Loss/∂ _b_ ( _l_ ), ∇ _xi_ = ∂Loss/∂ _xi_, ∇ _yi_ = ∂Loss/∂ _yi_, ( _l_ ) = ∂Loss/∂ _W_ ∇ _b_ box _i_ represent the defects bounding boxes size ^ _i_ box represent the actual sizes of the defects ^ box _k_ . box _k_ = ∂Loss/∂ _w_ box _k_ box _k_ = ∂Loss/∂ _h_ box _k_ ( _l_ ) = _W_ ∇ _w_ box _k_ box _k_, ∇ _h_ box _k_ defects in the cell _i_ and the real situation. _Ci_ - _C_ ^ ( _l_ ) + _α_ ∇ _W_ ( _l_ ) = _b_ Update these parameters: _W_ ( Update these parameters: _W_ ( _l_ ) = _W_ ( _l_ ) + _α_ ∇ _W_ ( _l_ ), _b_ ( _l_ ) = _b_ ( _l_ ) + _α_ ∇ _b_ ( _l_ ), _xi_ = _xi_ + _α_ ∇ _xi_, _yi_ = _yi_ + _α_ ∇ _yi_, ( _l_ ), _b_ ( _l_ ) + _α_ ∇ _b_ area. _pi_ ( _c_ ) − _p_ <sup>^</sup> _i_ <sup>(</sup> <sup>_c_</sup> <sup>) is the difference between the probability of</sup> defects in the cell _i_ and the real situation. _Ci_ - _C_ ^ _I_ <sup>is the confidence</sup> difference between the prediction bounding box and the truth bounding box. _λ_ is a variable constant. ^ _k_ _k_ _k_ _k_ _w_ box = _w_ box + _α_ ∇ _w_ box _k_, _h_ box = _h_ box + _α_ ∇ _h_ box _k_ . finish the iteration epochs _Output_ : detection model _k_ box + _α_ ∇ _h_ box _k_ . box _k_ = _w_ box _k_ _k_ box _k_, _h_ box _k_ _k_ box = _h_ box _w_ box _k_ _k_ box + _α_ ∇ _w_ box _k_ Where _α_ is the learning rate, which is a variable constant. The epoch is the number of images updated each time. Loss consists of four parts: central coordinate loss _XY_ loss, bounding boxes loss _WH_ loss, classification loss Classloss and confidence loss Confidenceloss, which are shown as _N_ <sup>2</sup> _B_ _B_ ## ∑ _j_ = 0 ℓ _ij_ obj _xi_ - _x_ ^ _i_ _ij_ obj _xi_ - _x_ ^ _i_ 3�Experimental results and discussion _3.1 Datasets and evaluation criteria_ In this section, typical fabric defects in production are selected as experimental samples, and automatic fabric defect detection equipment is built to collect fabric images to evaluate the fabric defect detection algorithm. The fabric defect detection experimental platform is shown in Fig. 6. The components of fabric defect datasets are shown in Table 2, which contain two types of fabrics and five types of defects. The images of defects are shown in Fig. 3. From Figs. 3 _a_ - _d_, the linen fabric defects are classified as stain and broken course, stain, hole, _XY_ loss = _λ_ coord∑ _i_ 2 + ( _yi_ - _y_ ^ _i_ <sup>)</sup> 2 (15) _i_ = 0 _IET Collab. Intell. Manuf._, 2020, Vol. 2 Iss. 4, pp. 189-196 193 Table 3 Comparison of detection results with the different <u>detection algorithm</u> <sup><u>1</u></sup> ## m ∑ 1 _precision_ (21) MAP = <sup><u>1</u></sup> _m_ # ∑ m 1 ∫ 0 0 Recall <u>Methods</u> <u>Criteria</u> MAP, % FPS, s Linen Patterned Linen <u>fabric</u> <u>fabric</u> <u>fabric</u> Patterned Linen <u>fabric</u> Patterned <u>fabric</u> <u>fabric</u> <u>fabric</u> <u>fabric</u> fast R-CNN 60.4 65.7 0.9 0.7 faster R-CNN 82.1 85.6 13.7 13.6 Yolo 70.4 71.2 20.1 20 Yolov3 93.9 95.9 21.6 21.3 SSD 89.3 91.2 23.1 22.7 <u>MSCNN</u> <u>93.7</u> <u>95.6</u> <u>29.3</u> <u>29.1</u> <u>fabric</u> Fig. 7� _MAP and FPS of experiment results with different detection method_ _results on_ _(a)_ Linen fabric, _(b)_ Patterned fabric datasets and broken course types. From Figs. 3 _e_ - _h_, the patterned fabric defects are classified as hole, end out, stain, and double flat. All images are captured by the defects detection and experimental platform. The evaluation criteria utilised in our experiments include two aspects: mean accuracy precision (MAP) and frames per second (FPS). The FPS means the number of images that can be detected within a second, which is taken as the indicator to evaluate the speed of detection, can be expanded as follows, and the frameCount means the number of detected images, the elapasedTime means the time of detecting these images <mark>FPS = frameCount/elapasedTime</mark> <mark>(</mark> 20) The MAP is taken as the indicator to evaluate the accuracy of detection, which represents the mean integral area of the precision– recall curve for each type of defects, the formula of MAP is shown as where the ‘ _m_ ’ means the types of defects, and the functions of precision and recall are shown as <u>TP</u> Precision = TP + FP <sup>*100%</sup> (22) <u>TP</u> Recall = TP + FN <sup>*100%</sup> (23) where TP (true positives) represents the images correctly divided into positive examples, FPS (false positives) represents the images are negative but falsely divided into positive examples, FN (false negatives) represents the images are positive but falsely divide into negative examples. And the positive and negative represent whether there are defects in the final output defects bounding box. _3.2 Evaluation of defect detection performance_ To verify the performance of the proposed MSCNN model more fully. In this section, we will compare detection results with other deep learning detection algorithms, such as fast R-CNN [32], faster R-CNN [33], Yolo [34], Yolov3 [35] and SSD [36], where the fast R-CNN, faster R-CNN and SSD are based on VGG16, Yolo is based on DarkNet17, which have CNN of similar depth with MSCNN, while Yolov3 is based on 53 layers DarkNet53. In terms of locating method, fast R-CNN and faster R-CNN uses a region proposal network (RPN) to locate defects. The SSD, Yolo and Yolov3 are using the bounding boxes generated randomly, which have no pre-known defects size to locate the defects. To ensure the experiment fair, all the experiments are done carried out in the same environment: the program is compiled from Python3.6, the GTX1060 GPU is used to train and test detection models, 1000 iterations are carried out in the whole training process, the learning rate is 10 <sup>−4</sup>, the batch size is set to 16, and the bounding box threshold is set to 0.4. Also, the training set and testing set have been divided according to 8:2 before training; all algorithms have experimented with the same data. The fabric defects detection results with different methods are shown in Table 3. According to these experimental results, it can be seen (i) compared with the SSD algorithm, the MSCNN has a higher accuracy of detection by constructing the multi-scale neural network and the accuracy of MSCNN is higher than fast R-CNN and faster R-CNN under the same network depth. (ii) The MSCNN we proposed has almost the same MAP as the Yolov3 algorithm, while the Yolov3 algorithm constructs a CNN with a depth of 53 layers, which is far higher than MSCNN with a depth of 16 layers. (iii) In the aspect of detection speed, by using defects bounding boxes with pre-known defects size to locate the defects, the MSCNN we proposed has the best speed of detection, and better than the fast R-CNN and faster R-CNN using region generation methods. On the whole, the fabric defects detection performance of MSCNN is better than other algorithms. The MAP and FPS of experimental results with the above detection algorithms results in two types of fabrics are shown in Fig. 7. In this contrast experiment, we used randomly generated bounding boxes to locate the defects, to quantify the effect of defects bounding boxes with pre-known defects size on detection. The number of defects bounding boxes is set to 4, 8 and 12, which are named MSCNN-4, MSCNN-8 and MSCNN-12, respectively, and have the same network structure as MSCNN; the results are shown in Table 4. Similar conclusions can be drawn that the MSCNN tends to have better detection speed and accuracy by using defects bounding boxes with pre-known defects size to locate the defects in the process of detection. Table 5 shows the detection accuracy of the proposed MSCNN algorithm of various defects on two types of fabrics. The results show that the accuracy of the proposed algorithm detection for 194 _IET Collab. Intell. Manuf._, 2020, Vol. 2 Iss. 4, pp. 189-196 <u>Table 4</u> <u>Comparison of detection results with different bounding boxes</u> <u>Methods</u> <u>Criteria</u> MAP, % FPS, s <u>Linen fabric</u> <u>Patterned fabric</u> <u>Linen fabric</u> <u>Patterned fabric</u> MSCNN-4 86.3 89.2 29.2 28.9 MSCNN-8 93.1 94.9 23.7 23.4 MSCNN-12 93.4 95.1 21.5 21.1 <u>MSCNN</u> <u>93.7</u> <u>95.6</u> <u>29.3</u> <u>29.1</u> <u>Table 5</u> <u>Defect detection accuracy of the proposed MSCNN algorithm for various fabrics</u> <u>Types</u> <u>Stain, %</u> <u>End-out, %</u> <u>Broken curse, %</u> <u>Double flat, %</u> <u>Hole, %</u> linen fabric 94.3 92.7 93.1 - 94.9 <u>patterned fabric</u> <u>97.4</u> <u>94.6</u> <u>—</u> <u>93.1</u> <u>95.3</u> <u>Table 6</u> <u>Comparison of detection results of MSCNN with 26*26 scale feature neural network</u> <u>types</u> <u>Stain, %</u> <u>End-out, %</u> <u>Broken curse, %</u> <u>Double flat, %</u> <u>Hole, %</u> linen fabric 93.9 86.4 87.9 - 91.3 <u>patterned fabric</u> <u>96.7</u> <u>89.4</u> <u>—</u> <u>81.3</u> <u>93.9</u> Fig. 8� _Detection results of linen fabric_ Fig. 9� _Detection results of patterned fabric_ each kind of tiny defects is higher than 92%. This algorithm has good suppression ability for the wrong detection and missing detection. To verify the influence of feature fusion on tiny scale fabric defects detection accuracy, we used MSCNN without a 13*13 feature map to do detection, which means the neural network only extracts 26*26 feature maps for detection. The results of detection accuracy are shown in Table 6. As we can see, for these tiny scale defects, such as end-out, broken curse and double-flat, there are obvious reduction of accuracy compared with Table 6, while the accuracy stain and hole defects are still higher than 90%. The conclusion can be drawn that the detection accuracy of tiny defects can be improved by using feature fusion to construct MSCNN. _3.3 Verification of fabric defect detection_ The fabric defect image was input into the detection model to obtain detection results with classification and location, as shown in Figs. 8 and 9. The detection results include three kinds of information: defect types, defects bounding box and confidence. The defects bounding boxes of each colour correspond to different types of defects. The detection results show that even for the fabric with the complicated texture background and the overlapping region of defect features, it also can be detected precisely. The FPS of the detection algorithm is 29.1 (29.1 images can be detected per second on average), the detection time required for each image is 30–40 ms. In the actual defect detection, the linescan CCD camera's pixel is 4096*2, and capture a 4096*512 pixel fabric image, which is divided into eight 512*512 images input detection models for detection. The fabric width is 1.2 m, each detection of eight images is equivalent to the detection of fabric length of 0.15 m. The speed of detection can reach about 30 m/min, which is faster than manual detection. 4�Conclusion This study proposed an MSCNN for fabric defect detection, which can improve the detection accuracy for tiny scale defects and the speed. Compared with traditional detection methods, MSCNN is able to extract different pixels of defects feature maps, which can enhance the representation of tiny scale fabric defects. Furthermore, this paper designed a faster location method that used the K-means clustering analysis obtaining defects bounding boxes with pre-known defects size information to replace the region generation method in location, realising the improvement of detection speed. In addition, the experiment results demonstrated that the proposed MSCNN realised the high detection accuracy for five common types of defects in linen fabric and patterned fabric, the detection accuracy for each type of tiny scale defects reached >92%, and the speed of detection reaches 30 m/min, which can satisfy the requirements of defect detection speed in production. While there are still two limitations to the proposed methods. Firstly, this method is data-driven, which needs plenty of labelled fabric images to train the model. Secondly, due to the lack of fabric images, the fabrics with more complicated texture are not tested in this paper. In the future, the few-shot learning method will be used in MSCNN to lower the demand for fabric images, which will use less data to train useful detection model. In addition, the more complicated fabrics and different structures of CNN (such as DenseNet and ResNet) will be investigated in further research to extend the types of fabrics we can detect. 5�References [1] Kumar, A.: ‘Computer-vision-based fabric defect detection: a survey’, _IEEE_ _Trans. Ind. Electron._, 2008, 55, (1), pp. 348–363 [2] Ngan, H.Y., Pang, G.K., Yung, N.H. _, et al._ : ‘Automated fabric defect detection – a review’, _Image Vis. Comput._, 2011, 29, (7), pp. 442–458 [3] Mei, S., Wang, Y., Wen, G.: ‘Automatic fabric defect detection with a multiscale convolutional denoising autoencoder network model’, _Sensors_, 2018, 18 [, (4), p. 1064. Available at https://doi.org/10.3390/s18041064](https://doi.org/10.3390/s18041064) _IET Collab. Intell. Manuf._, 2020, Vol. 2 Iss. 4, pp. 189-196 195 [4] Tilocca, A., Borzone, P., Carosio, S. _, et al._ : ‘Detecting fabric defects with a neural network using two kinds of optical patterns’, _Tex. Res. J._, 2002, 72, (6), pp. 545–550 [5] Zhou, J., Wang, J.: ‘Unsupervised fabric defect segmentation using local patch approximation’, _J. Textile Inst._, 2016, 107, (6), pp. 800–809 [6] Shi, M., Fu, R., Guo, Y. _, et al._ : ‘Fabric defect detection using local contrast deviations’, _Multimedia Tools Appl._, 2011, 52, (1), pp. 147–157 [7] Zhu, D., Pan, R., Gao, W. _, et al._ : ‘Yarn-dyed fabric defect detection based on autocorrelation function and GLCM’, _Autex Res. J._, 2015, 15, (3), pp. 226– 232 [8] Harinath, D., Babu, K.R., Satyanarayana, P. _, et al._ : ‘Defect detection in fabric using wavelet transform and genetic algorithm’, _Trans. Mach. Learn. Artif._ _Intell._, 2015, 3 [, (6), p. 10. Available at https://doi.org/10.14738/tmlai.36.1551](https://doi.org/10.14738/tmlai.36.1551) [9] Li, P., Zhang, H., Jing, J. _, et al._ : ‘Fabric defect detection based on multi-scale wavelet transform and Gaussian mixture model method’, _J. Textile Inst._, 2015, 106, (6), pp. 587–592 [10] Ngan, H.Y., Pang, G.K., Yung, S.P. _, et al._ : ‘Wavelet based methods on patterned fabric defect detection’, _Pattern Recognit._, 2005, 38, (4), pp. 559– 576 [11] Escofet, J., Navarro, R.F., Millan Garcia-Verela, M.S. _, et al._ : ‘Detection of local defects in textile webs using Gabor filters’, _Proc. SPIE Int. Soc. Opt._ _Eng._, 1998, 37, (8), pp. 163–170 [12] Li, M., Cui, S., Xie, Z.: ‘Application of Gaussian mixture model on defect detection of print fabric’, _J. Text. Res._, 2015, 36, (8), pp. 94–98 [13] Wei, B., Hao, K., Tang, X. _, et al._ : ‘A new method using the convolutional neural network with compressive sensing for fabric defect classification based on small sample sizes’, _Text. Res. J._, 2019, 89, (17), pp. 3539–3555 [14] Li, Y., Zhang, D., Lee, D.J.: ‘Automatic fabric defect detection with a wideand-compact network’, _Neurocomputing_, 2019, 329, pp. 329–338 [15] Yapi, D., Mejri, M., Allili, M.S. _, et al._ : ‘A learning-based approach for automatic defect detection in textile images’, _IFAC-Papers OnLine_, 2015, 48, (3), pp. 2423–2428 [16] Ouyang, W., Xu, B., Hou, J. _, et al._ : ‘Fabric defect detection using activation layer embedded convolutional neural network’, _IEEE Access_, 2019, 7, pp. 70130–70140 [17] Yapi, D., Allili, M.S., Baaziz, N. _, et al._ : ‘Automatic fabric defect detection using learning-based local textural distributions in the contourlet domain’, _IEEE Trans. Autom. Sci. Eng._, 2018, 15, (3), pp. 1014–1026 [18] Jing, J.F., Ma, H., Zhang, H.H.: ‘Automatic fabric defect detection using a deep convolutional neural network’, _Color. Technol._, 2019, 135, (3), pp. 213– 223 [19] Jing, J.F., Fan, X.T., Li, P.F. _, et al._ : ‘Yarn-dyed fabric defect detection based on deep-convolutional neural network’, _J. Text. Res._, 2017, 38, pp. 68–74 [20] Wei, B., Hao, K., Tang, X. _, et al._ : ‘Fabric defect detection based on faster RCNN’. Int. Conf. on Artificial Intelligence on Textile and Apparel, Hong Kong, 2018, pp. 45–51 [21] Liu, Z., Liu, S., Li, C. _, et al._ : ‘Fabric defects detection based on SSD’. Proc. of the 2nd Int. Conf. on Graphics and Signal Processing, Sydney, Australia, 2018, pp. 74–78 [22] Ng, M.K., Ngan, H.Y., Yuan, X. _, et al._ : ‘Patterned fabric inspection and visualization by the method of image decomposition’, _IEEE Trans. Autom._ _Sci. Eng._, 2014, 11, (3), pp. 943–947 [23] Li, Y., Zhao, W., Pan, J. _, et al._ : ‘Deformable patterned fabric defect detection with Fisher criterion-based deep learning’, _IEEE Trans. Autom. Sci. Eng._, 2017, 14, (2), pp. 1256–1264 [24] Jia, L., Chen, C., Liang, J. _, et al._ : ‘Fabric defect inspection based on lattice segmentation and Gabor filtering’, _Neurocomputing_, 2017, 238, pp. 84–102 [25] Huanhuan, Z., Jinxiu, M.A., Junfeng, J. _, et al._ : ‘Fabric defect detection method based on improved fast weighted median filtering and K-means’, _J._ _Text. Res._, 2019, 40, (12), pp. 50–56 [26] Chunlei, L., Guangshuai, G., Zhoufeng, L. _, et al._ : ‘Fabric defect detection based on biological vision modeling’, _IEEE Access_, 2018, 6, pp. 27659– 27670 [27] Lin, T., Dollar, P., Girshick, R. _, et al._ : ‘Feature pyramid networks for object detection’. Computer Vision and Pattern Recognition, Honolulu, USA, 2017, pp. 936–944 [28] Simonyan, K., Zisserman, A.: ‘Very deep convolutional networks for largescale image recognition’. ICLR 2015: Int. Conf. on Learning Representations, [San Diego, USA, 2015. Available at https://arxiv.org/abs/1409.1556](https://arxiv.org/abs/1409.1556) [29] Song, W., Wen, L., Gao, L. _, et al._ : ‘Unsupervised fault diagnosis method based on iterative multi-manifold spectral clustering’, _IET Collaborat. Intell._ _Manuf._, 2019, 1, (2), pp. 48–55 [30] Zhang, Z., Chai, N., Liu 1, Y. _, et al._ :: ‘Base types selection of PSS based on a priori algorithm and knowledge-based ANN’, _IET Collaborat. Intell. Manuf._, 2019, 1, (2), pp. 29–38 [31] Wang, B., Li, W., Yang, W. _, et al._ : ‘Illumination normalization based on Weber's law with application to face recognition’, _IEEE Signal Process. Lett._, 2011, 18, (8), pp. 462–465 [32] Girshick, R.: ‘Fast R-CNN’. Int. Conf. on computer vision, Santiago, Chile, 2015, pp. 1440–1448 [33] Ren, S., He, K., Girshick, R. _, et al._ : ‘Faster R-CNN: towards real-time object detection with region proposal networks’, Neural Inf. Process. Syst., Montreal, Canada, 2015, pp. 91–99 [34] Redmon, J., Divvala, S.K., Girshick, R. _, et al._ : ‘You only look once: unified, real-time object detection’. Computer Vision and Pattern Recognition, Las Vegas, USA, 2016, pp. 779–788 [35] Redmon, J., Farhadi, A.: ‘YOLO v3 An incremental improvement’, arxiv, [2018, ArXiv:1804.02767. Available at https://arxiv.org/abs/1804.02767](https://arxiv.org/abs/1804.02767) [36] Liu, W., Anguelov, D., Erhan, D. _, et al._ : ‘SSD: single shot MultiBox detector’. European Conf. on Computer Vision, Amsterdam, The Netherlands, 2016, pp. 21–37 196 _IET Collab. Intell. Manuf._, 2020, Vol. 2 Iss. 4, pp. 189-196

섹션 본문 47문단 · 23,223자

(제목 없음)

1Fabric defect detection plays an important role in ensuring quality control in the textile manufacturing industry. This study introduces a fabric defect detection method based on a multi-scale convolutional neural network (MSCNN) to improve accuracy and time efficiency. For detection accuracy, the MSCNN is constructed to obtain different scales of feature maps, which enhance the representation of tiny scale fabric defects. A faster defect locating method is designed with pre-known size information obtained by clustering analysis to reduce the computation time. An experiment is carried out for illustrating that the accuracy of MSCNN for each defect reaches over 92%, and the frames per second (FPS) is more than 29. Further analysis results demonstrate that the proposed MSCNN can accurately detect the fabric defects with a tiny scale, and the speed of detection can reach 30 m/min to satisfy the industrial requirements.

Introduction

2Fabric defect detection is significant for textile quality control [1]. Traditionally, the defects are examined by skilled workers via visual sensation, as shown in Fig. 1. The manual detection method has disadvantages as a high error rate for human fatigue and lowspeed execution as skilled workers can detect only 15-20 m/min. Therefore, it's necessary to develop an automatic detection method to enhance productive efficiency [2].

3In recent years, with the rapid development of digital image processing techniques and machine vision, lots of automatic detection methods are proposed to replace manual detection. The fabric defect detection methods based on machine vision are mainly divided into two groups: non-motif-based and motif-based groups. The motif-based methods require a defect-free ground truth for comparison of the motifs, but there are plenty of different fabrics with complicated background features, and even the same type of fabric has a difference because of the exchanging workshop environment, such as the noise and illumination. It is hard for motif-based methods to obtain the robust defect-free ground truth for detection [3]. Therefore, most works focused on the non-motifbased group, which can be further subdivided into five categories: statistical, spectral, model-based, learning-based, and structural [4], as shown in Fig. 2. The statistical methods [5][6][7] distinguish defective and defect-free regions according to the analysis of their different statistical feature, similarity, and regularity. This method is not efficient in detecting low-contrast fabrics and patterned fabrics. The spectral methods [8,9], widely used in the study of fabric defects, highlight the differences between defective and defect-free regions in the frequency domain, which can effectively realise the detection of fabrics with a simple background. Typical spectral methods include Fourier transform, wavelet transform [10], and Gabor transform [11]. Although these methods are widely studied, they cannot effectively detect patterned fabrics. Also, the real-time requirements are difficult to meet because they are high computationally demanding. The model-based and structural methods [12] are relatively less, possibly because they are not robust enough and highly data-dependent. In this paper, we will mainly concentrate on the learning-based method.

4With the rapid development of artificial intelligent technology, deep learning method has achieved brilliant performance in image classification and detection. Numerous learning-based methods [13][14][15][16][17][18] have been proposed to solve the problems of fabric defect detection because of its greater extraction ability of image features. Jing et al. [19] proposed a learning-based method with a deep convolutional neural network (CNN) to extract the features of fabric, and used the mean shift algorithm to segment the defects, realising the detection of Yarn-dyed fabric. However, this method needs two steps to realise the detection of fabric, cannot realise the end-to-end detection of detection. Wei et al. [20] used a learningbased method to construct faster region-CNN (R-CNN) to classify and search defects region, acquiring high accuracy end-to-end detection of fabrics with complicated texture and small defects. While this method requires lots of computational capacity, meaning to be time consuming, which cannot meet the real-time requirement of detection in fabric production. Liu et al. [21] proposed a single shot multibox detector (SSD) method for fabric defect detection; the detector is designed directly at the end of the CNN, so that the speed of detection has been improved. However, this method failed to locate some tiny defects accurately. Although the detection algorithm based on deep learning has better performance in accuracy and more robust than other detection methods. There are still two main challenges in the defect detection task [22][23][24][25][26].

5First, the defects with tiny scales are difficult to detect, and the existing fabric defect detection methods do not design a network aiming at this character. As shown in Fig. 3, the hole and stain defects, as the common defects, have regular shapes and scales, which are relatively easy to detect. However, the end out defects, double flat and broken course defects are tiny in scale with irregular shapes. These defects are long and narrow in shape, only a few pixels, accounting for less than 1/100 of the whole image's pixels in one direction. Compared to the defects with regular shapes, these defects with irregular shapes and tiny scales are more difficult to extract effective defects features from the fabric images detected, which improves the complexity of detection.

6Second, the fabric production has a high requirement for realtime defect detection; the movement speed of fabrics in production is often higher than 15 m/min. While the existing deep-learning detection methods do not consider the similarity shapes and sizes of the same types of fabric defects when designing the detector, which always causes time-consuming of detection, it can hardly satisfy the real-time demand of fabric detection, and will lead to a decrease in productivity. That means they cannot be applied in practice.

7In this paper, a deep-learning-based detection method, multiscale CNN (MSCNN), is proposed to realise the detection for five types of defects in linen fabric and patterned fabric. Compared with other detection methods, there are two main contributions:

8(i) Targeting at existing fabric defects detection methods have low accuracy in detecting tiny-scale defects, applies the pyramid features a method in a neural network to enhance the feature representation and detection accuracy of tiny scale fabric defects.

9(ii) For real-time detection, taking advantage of the similarity of the same type of defects, using the K-means clustering analysis to obtain defects bounding boxes with pre-known size information, which are used to replace existing time-consuming locating methods, so as to reduce the computation in location and improve the speed of detection.

10The rest of this paper is organised as follows: Section 2 presents the MSCNN framework and the model training process. Section 3 reports the experiments and discussion. Section 4 shows the conclusion and raises several future issues.

Framework of MSCNN model

11Aiming at existing fabric defects detection methods have low accuracy for detecting tiny-scale defects, we take advantage of the strong ability of pyramid features [27] for extracting multi-scale features, apply the pyramid features a method in neural network and propose the MSCNN to improve the detection accuracy for tiny scale defects. The MSCNN is constructed using feature fusion based on the VGG16 network [28].

12To satisfy the requirement of fabric detection, we take advantage of that the same type of defects always have similar shapes and sizes, using a clustering algorithm to get the common size of all types defects, and then using these defects bounding boxes with pre-knowledge to replace the region generation method in defects locating, so as to reduce the computation required in the defects location process and to improve the speed of detection. The framework of the proposed MSCNN is shown in Fig. 4.

Fabric image feature extraction:

13In the progress of detection: the fabric images captured by the line-scan chargecoupled device (CCD) camera are used as input, and standardised as the matrix X = x 1, 1 , …, x i, j . The CNN is used to extract features from the image matrix, and obtain the feature map with the pixel of 13*13 and 26*26, respectively. The feature map is input in the detection module, and the output is location and classification information of fabric defects detection.

14At the front end of the CNN, the features of fabric images are extracted using convolution and pooling. The 3*3 size and 1 step small convolution kernels are used in the convolutional layer to enhance the ability to extract the local features of the fabric images; the convolution computation formula is shown as

15where x i, j is the value of the pixel matrix of the fabric images.

16The tanh activation function is used to non-linear the convolution feature z u, v , so as to enhance the feature extraction ability of CNN, the tanh function is shown as

17After that, the convolution layer outputs the feature matrix

18, H is taken as the input of the pooling layer. The pooling layer uses 2*2 size Maxpooling operation to conduct the down-sampling of feature matrix; while extracting the key features of fabric images, the parameters of the CNN are reduced, so as to improve the computation speed of the CNN. The feature map with the pixel of 13*13 and 26*26 is finally extracted after multiple convolutions and pooling operations. At the back end of the CNN, feature maps of different pixels are used as two independent branches to detect. The feature maps with the pixel of 26*26 have a higher feature pixel, which is used to identify tiny defects in fabric images, such as hole, end out and broken course. The feature maps with the pixel of 13*13, which are used to identify more obvious defects, such as stain. At the same time, the twice up-sampling of the 13*13 feature maps are conducted, and obtain new 26*26 feature maps to conduct feature fusion with original 26*26 feature maps, so as to enhance the feature extraction ability of 26*26 feature maps. By constructing an MSCNN to extract tiny scale defects feature, respectively, the detection accuracy of tiny defects is improved. The parameters of CNN are shown in Table 1.

Defects location and classification:

19In the fabric production process, the two main factors determining the shape and size of defects are fabric type and production equipment. Although the shape of defects varies from this fabric to another, there is no significant difference in shape and size between the same defects. In order to reduce the computation of location and to improve the speed of detection, the locating method is designed with pre-known size information obtained by clustering analysis [29,30] to reduce the computation time of defect region generation as shown in Fig. 5.

20The defects bounding boxes with pre-known size information is obtained K-means clustering algorithm; the clustering algorithm is shown as

21of defects bounding boxes with the pre-known size we want to obtain, and u k are randomly assigned to an initial value at first, k is the number of defects bounding box types. In this study, we set k = 4 corresponding to four types of defects. By iterating and minimising the J, the defects bounding boxes x i are divided into four categories according to their size and aspect ratio.

22After obtaining the categories of defects, The intersection over union (IOU ) between each type of defect bounding boxes with pre-known size and corresponding defect bounding box was calculated, respectively. The IOU represents the overlap ratio, and the higher the IOU is, the higher the overlap degree will be. When the intersection ratio value is one, it means that the defects bounding boxes with pre-known defects size and corresponding defect bounding box completely coincide. The formula of IOU is shown as

23(see (6)) where Box w box , h box represent the defects bounding boxes with the pre-known defects size corresponding to (w box , h box ) in length and width.

24Although set D to be the optimisation parameters of IOU

25The gradient descent algorithm is used to optimise the parameters D. After many iterations, the maximum size parameters of the defects bounding boxes with pre-known size for each type of defects are obtained; the gradient descent formula is shown as

26After obtaining the size parameters of the defects bounding boxes with pre-known size, the feature map of the last convolution is input to detection. Although CNN's can extract fabric image features efficiently, it is hard to locate fabric defects. To locate the defects, it is necessary to match the defects bounding boxes with the feature map. Firstly, the scaling ratios p w and p h are obtained according to the matrix column-to-column ratio between the feature and the defects bounding boxes. Secondly, after obtaining the scaling ratios, the size parameters w box k , h box

27Thirdly, the feature map is divided into N*N cells according to the columns and rows of the feature map, the centre of each cell is obtained as the anchor coordinates (t x , t y ). Each anchor coordinate is matched with the corresponding four types of defects bounding boxes, and only generate a total number of N*N*4 defects bounding boxes. Finally, the classification probability P(i) of the defects and the confidence of defects bounding boxes are computed, which are shown as

28where h i represents the value of the convolution kernels corresponding to the last convolutional layer. The confidence threshold value of the defects bounding box is set according to the detection requirements, and the threshold segmentation is used to remove the defects bounding boxes with a confidence lower than the threshold, so as to output the final fabric defect detection result, which is shown as where the T represents the threshold, and the Y represents the final output defects bounding box in the detection results.

Model training

29Image brightness changes and image noise caused by light changes and floating dust often appear in fabric image acquisition, which will influence the detection accuracy. The illumination normalisation [31] and noise corruption are processed to simulate the images of fabric in different workshop environments before the model training, so as to enhance the robust for the detection model to environmental changes. The model training takes the fabric images and defects bounding boxes with pre-known defects size as input, and improves the detection accuracy by minimising the loss function, the procedures of model training are as follows:

30Input: Dataset X, defects bounding boxes with pre-known defects size u k = w box k , h box k , number of epochs.

Process

31Step 1: Randomly set network parameters W (l) , b (l) , and centre of anchor coordinates x i , y i .

32Step 2: Iterative update parameters for i = 1 to m Calculate the Loss Calculate the partial derivatives: ∇W (l) = ∂Loss/∂W (l) , ∇b (l) = ∂Loss/∂b (l) , ∇x i = ∂Loss/∂x i , ∇y i = ∂Loss/∂y i ,

33Update these parameters:

34Loss = XY loss + WH loss + Class loss + Confidence loss (19) where N*N represents the cell number of the feature map. B represents the number of defects bounding boxes generated in each feature map.

Datasets and evaluation criteria

35In this section, typical fabric defects in production are selected as experimental samples, and automatic fabric defect detection equipment is built to collect fabric images to evaluate the fabric defect detection algorithm. The fabric defect detection experimental platform is shown in Fig. 6. The components of fabric defect datasets are shown in Table 2, which contain two types of fabrics and five types of defects. The images of defects are shown in Fig. 3. From Figs. 3a-d, the linen fabric defects are classified as stain and broken course, stain, hole, and broken course types. From Figs. 3e-h, the patterned fabric defects are classified as hole, end out, stain, and double flat. All images are captured by the defects detection and experimental platform. The evaluation criteria utilised in our experiments include two aspects: mean accuracy precision (MAP) and frames per second (FPS). The FPS means the number of images that can be detected within a second, which is taken as the indicator to evaluate the speed of detection, can be expanded as follows, and the frameCount means the number of detected images, the elapasedTime means the time of detecting these images

36The MAP is taken as the indicator to evaluate the accuracy of detection, which represents the mean integral area of the precisionrecall curve for each type of defects, the formula of MAP is shown as

Evaluation of defect detection performance

37To verify the performance of the proposed MSCNN model more fully. In this section, we will compare detection results with other deep learning detection algorithms, such as fast R-CNN [32], faster R-CNN [33], Yolo [34], Yolov3 [35] and SSD [36], where the fast R-CNN, faster R-CNN and SSD are based on VGG16, Yolo is based on DarkNet17, which have CNN of similar depth with MSCNN, while Yolov3 is based on 53 layers DarkNet53. In terms of locating method, fast R-CNN and faster R-CNN uses a region proposal network (RPN) to locate defects. The SSD, Yolo and Yolov3 are using the bounding boxes generated randomly, which have no pre-known defects size to locate the defects.

38To ensure the experiment fair, all the experiments are done carried out in the same environment: the program is compiled from Python3.6, the GTX1060 GPU is used to train and test detection models, 1000 iterations are carried out in the whole training process, the learning rate is 10 −4 , the batch size is set to 16, and the bounding box threshold is set to 0.4. Also, the training set and testing set have been divided according to 8:2 before training; all algorithms have experimented with the same data. The fabric defects detection results with different methods are shown in Table 3.

39According to these experimental results, it can be seen (i) compared with the SSD algorithm, the MSCNN has a higher accuracy of detection by constructing the multi-scale neural network and the accuracy of MSCNN is higher than fast R-CNN and faster R-CNN under the same network depth. (ii) The MSCNN we proposed has almost the same MAP as the Yolov3 algorithm, while the Yolov3 algorithm constructs a CNN with a depth of 53 layers, which is far higher than MSCNN with a depth of 16 layers. (iii) In the aspect of detection speed, by using defects bounding boxes with pre-known defects size to locate the defects, the MSCNN we proposed has the best speed of detection, and better than the fast R-CNN and faster R-CNN using region generation methods.

40On the whole, the fabric defects detection performance of MSCNN is better than other algorithms. The MAP and FPS of experimental results with the above detection algorithms results in two types of fabrics are shown in Fig. 7.

41In this contrast experiment, we used randomly generated bounding boxes to locate the defects, to quantify the effect of defects bounding boxes with pre-known defects size on detection. The number of defects bounding boxes is set to 4, 8 and 12, which are named MSCNN-4, MSCNN-8 and MSCNN-12, respectively, and have the same network structure as MSCNN; the results are shown in Table 4. Similar conclusions can be drawn that the MSCNN tends to have better detection speed and accuracy by using defects bounding boxes with pre-known defects size to locate the defects in the process of detection. Table 5 shows the detection accuracy of the proposed MSCNN algorithm of various defects on two types of fabrics. The results show that the accuracy of the proposed algorithm detection for each kind of tiny defects is higher than 92%. This algorithm has good suppression ability for the wrong detection and missing detection.

42To verify the influence of feature fusion on tiny scale fabric defects detection accuracy, we used MSCNN without a 13*13 feature map to do detection, which means the neural network only extracts 26*26 feature maps for detection. The results of detection accuracy are shown in Table 6. As we can see, for these tiny scale defects, such as end-out, broken curse and double-flat, there are obvious reduction of accuracy compared with Table 6, while the accuracy stain and hole defects are still higher than 90%. The conclusion can be drawn that the detection accuracy of tiny defects can be improved by using feature fusion to construct MSCNN.

Verification of fabric defect detection

43The fabric defect image was input into the detection model to obtain detection results with classification and location, as shown in Figs. 8 and 9. The detection results include three kinds of information: defect types, defects bounding box and confidence. The defects bounding boxes of each colour correspond to different types of defects. The detection results show that even for the fabric with the complicated texture background and the overlapping region of defect features, it also can be detected precisely.

44The FPS of the detection algorithm is 29.1 (29.1 images can be detected per second on average), the detection time required for each image is 30-40 ms. In the actual defect detection, the linescan CCD camera's pixel is 4096*2, and capture a 4096*512 pixel fabric image, which is divided into eight 512*512 images input detection models for detection. The fabric width is 1.2 m, each detection of eight images is equivalent to the detection of fabric length of 0.15 m. The speed of detection can reach about 30 m/min, which is faster than manual detection.

Conclusion

45This study proposed an MSCNN for fabric defect detection, which can improve the detection accuracy for tiny scale defects and the speed. Compared with traditional detection methods, MSCNN is able to extract different pixels of defects feature maps, which can enhance the representation of tiny scale fabric defects. Furthermore, this paper designed a faster location method that used the K-means clustering analysis obtaining defects bounding boxes with pre-known defects size information to replace the region generation method in location, realising the improvement of detection speed. In addition, the experiment results demonstrated that the proposed MSCNN realised the high detection accuracy for five common types of defects in linen fabric and patterned fabric, the detection accuracy for each type of tiny scale defects reached >92%, and the speed of detection reaches 30 m/min, which can satisfy the requirements of defect detection speed in production.

46While there are still two limitations to the proposed methods. Firstly, this method is data-driven, which needs plenty of labelled fabric images to train the model. Secondly, due to the lack of fabric images, the fabrics with more complicated texture are not tested in this paper.

47In the future, the few-shot learning method will be used in MSCNN to lower the demand for fabric images, which will use less data to train useful detection model. In addition, the more complicated fabrics and different structures of CNN (such as DenseNet and ResNet) will be investigated in further research to extend the types of fabrics we can detect.

참고문헌 34건

  1. Fast R-CNN 2015 10.1109/iccv.2015.169
  2. Fabric defect detection based on multi-scale wavelet transform and Gaussian mixture model method Journal of the Textile Institute · Taylor & Francis · 2014 10.1080/00405000.2014.929790
  3. Patterned Fabric Inspection and Visualization by the Method of Image Decomposition IEEE Transactions on Automation Science and Engineering · Institute of Electrical and Electronics Engineers · 2014 10.1109/tase.2014.2314240
  4. Fabric defect detection using local contrast deviations Multimedia Tools and Applications · Springer Science+Business Media · 2010 10.1007/s11042-010-0472-8
  5. Automated fabric defect detection—A review Image and Vision Computing · Elsevier BV · 2011 10.1016/j.imavis.2011.02.002
  6. Wavelet based methods on patterned fabric defect detection Pattern Recognition · Elsevier BV · 2004 10.1016/j.patcog.2004.07.009
  7. Computer-Vision-Based Fabric Defect Detection: A Survey IEEE Transactions on Industrial Electronics · Institute of Electrical and Electronics Engineers · 2008 10.1109/tie.1930.896476
  8. Detection of local defects in textile webs using Gabor filters Optical Engineering · SPIE · 1998 10.1117/1.601751
  9. Illumination Normalization Based on Weber's Law With Application to Face Recognition IEEE Signal Processing Letters · Institute of Electrical and Electronics Engineers · 2011 10.1109/lsp.2011.2158998
  10. Detecting Fabric Defects with a Neural Network Using Two Kinds of Optical Patterns Textile Research Journal · SAGE Publishing · 2002 10.1177/004051750207200614
  11. A Learning-Based Approach for Automatic Defect Detection in Textile Images IFAC-PapersOnLine · Elsevier BV · 2015 10.1016/j.ifacol.2015.06.451
  12. Defect Detection in Fabric using Wavelet Transform and Genetic Algorithm Transactions on Machine Learning and Artificial Intelligence · 2015 10.14738/tmlai.36.1551
  13. Unsupervised fabric defect segmentation using local patch approximation Journal of the Textile Institute · Taylor & Francis · 2016 10.1080/00405000.2015.1131440
  14. Deformable Patterned Fabric Defect Detection With Fisher Criterion-Based Deep Learning IEEE Transactions on Automation Science and Engineering · Institute of Electrical and Electronics Engineers · 2016 10.1109/tase.2016.2520955
  15. Application of Gaussian mixture model on defect detection of print fabric Textile Research Journal · SAGE Publishing · 2015
  16. Feature Pyramid Networks for Object Detection 2017 10.1109/cvpr.2017.106
  17. Fabric defect inspection based on lattice segmentation and Gabor filtering Neurocomputing · Elsevier BV · 2017 10.1016/j.neucom.2017.01.039
  18. Faster R-CNN: towards real-time object detection with region proposal networks Neural Information Processing Systems · 2015
  19. Automatic Fabric Defect Detection Using Learning-Based Local Textural Distributions in the Contourlet Domain IEEE Transactions on Automation Science and Engineering · Institute of Electrical and Electronics Engineers · 2017 10.1109/tase.2017.2696748
  20. Automatic Fabric Defect Detection with a Multi-Scale Convolutional Denoising Autoencoder Network Model Sensors · Multidisciplinary Digital Publishing Institute · 2018 10.3390/s18041064
  21. Fabric Defect Detection Based on Biological Vision Modeling IEEE Access · Institute of Electrical and Electronics Engineers · 2018 10.1109/access.2018.2841055
  22. Automatic fabric defect detection with a wide-and-compact network Neurocomputing · Elsevier BV · 2018 10.1016/j.neucom.2018.10.070
  23. Fabric Defects Detection based on SSD 2018 10.1145/3282286.3282300
  24. A new method using the convolutional neural network with compressive sensing for fabric defect classification based on small sample sizes Textile Research Journal · SAGE Publishing · 2018 10.1177/0040517518813656
  25. Fabric Defect Detection Based on Faster RCNN Advances in intelligent systems and computing · Springer Nature · 2018 10.1007/978-3-319-99695-0_6
  26. Base types selection of PSS based on a priori algorithm and knowledge‐based ANN IET Collaborative Intelligent Manufacturing · Institution of Engineering and Technology · 2019 10.1049/iet-cim.2018.0003
  27. Automatic fabric defect detection using a deep convolutional neural network Coloration Technology · Wiley · 2019 10.1111/cote.12394
  28. Unsupervised fault diagnosis method based on iterative multi‐manifold spectral clustering IET Collaborative Intelligent Manufacturing · Institution of Engineering and Technology · 2019 10.1049/iet-cim.2019.0003
  29. Fabric Defect Detection Using Activation Layer Embedded Convolutional Neural Network IEEE Access · Institute of Electrical and Electronics Engineers · 2019 10.1109/access.2019.2913620
  30. Very Deep Convolutional Networks for Large-Scale Image Recognition arXiv (Cornell University) · Cornell University · 2014 10.48550/arxiv.1409.1556
  31. You Only Look Once: Unified, Real-Time Object Detection 2016 10.1109/cvpr.2016.91
  32. Fabric defect detection method based on improved fast weighted median filtering and K-means Fangzhi Xuebao · 2019
  33. SSD: Single Shot MultiBox Detector Lecture notes in computer science · Springer Science+Business Media · 2016 10.1007/978-3-319-46448-0_2
  34. Yarn-Dyed Fabric Defect Detection Based On Autocorrelation Function And GLCM Autex Research Journal · De Gruyter Open · 2015 10.1515/aut-2015-0001