Discriminative training approaches to fabric defect classification based on wavelet transform

Discriminative training approaches to fabric defect classification based on wavelet transform

Pattern Recognition 37 (2004) 889 – 899 www.elsevier.com/locate/patcog Discriminative training approaches to fabric defect classi#cation based on wav...

570KB Sizes 0 Downloads 12 Views

Pattern Recognition 37 (2004) 889 – 899 www.elsevier.com/locate/patcog

Discriminative training approaches to fabric defect classi#cation based on wavelet transform Xuezhi Yang, Grantham Pang∗ , Nelson Yung Department of Electrical and Electronic Engineering, The University of Hong Kong, Pokfulam Road, Hong Kong Received 13 February 2003; received in revised form 20 October 2003; accepted 20 October 2003

Abstract Wavelet transform is able to characterize the fabric texture at multiscale and multiorientation, which provides a promising way to the classi#cation of fabric defects. For the objective of minimum error rate in the defect classi#cation, this paper compares six wavelet transform-based classi#cation methods, using di4erent discriminative training approaches to the design of the feature extractor and classi#er. These six classi#cation methods are: methods of using an Euclidean distance classi#er and a neural network classi#er trained by maximum likelihood method and backpropagation algorithm, respectively; methods of using an Euclidean distance classi#er and a neural network classi#er trained by minimum classi#cation error method, respectively; method of using a linear transformation matrix-based feature extractor and an Euclidean distance classi#er, designed by discriminative feature extraction (DFE) method; method of using an adaptive wavelet-based feature extractor and an Euclidean distance classi#er, designed by the DFE method. These six approaches have been evaluated on the classi#cation of 466 defect samples containing eight classes of fabric defects, and 434 nondefect samples. The DFE training approach using adaptive wavelet has been shown to outperform the other approaches, where 95.8% classi#cation accuracy was achieved. ? 2003 Pattern Recognition Society. Published by Elsevier Ltd. All rights reserved. Keywords: Fabric inspection; Discriminative training; Wavelet transform; Minimum classi#cation error; Adaptive wavelets

1. Introduction In the textile industry, fabric defect detection and classi#cation is of vital importance in the quality control of textile manufacturing. In general, fabric defect detection and classi#cation is a two-stage process: detection followed by classi#cation. The detection process detects the presence of fabric defects in the fabric products while the classi#cation process classi#es the detected defects into their corresponding categories. In contrast to fabric defect detection, fabric defect classi#cation is considered to be more meaningful, as it provides the necessary information for the grading of fabric product, as well as indicates malfunctions in certain ∗ Corresponding author. Tel.: +852-2857-8492; fax: +8522559-8738. E-mail address: [email protected] (G. Pang).

components of the weaving machine. Moreover, the on-line quality control of the weaving process, which is highly desirable in textile industry, depends on the information from an accurate classi#cation of the detected fabric defects. Although fabric defect detection has already been widely studied, much less e4orts have been given to the development of the techniques for fabric defect classi#cation. Currently, fabric defect classi#cation still remains a research issue due to the following reasons [1,2]. Firstly, there exists a large number of defect classes to be classi#ed, while new classes of fabric defects may be introduced in the weaving process. Secondly, the diversities within each class of defects and the similarities among di4erent classes of defects make their discrimination challenging. Generally, fabric defect classi#cation method consists of a feature extraction module followed by a classi#cation module (Fig. 1). In terms of the feature extraction techniques,

0031-3203/$30.00 ? 2003 Pattern Recognition Society. Published by Elsevier Ltd. All rights reserved. doi:10.1016/j.patcog.2003.10.011

890

X. Yang et al. / Pattern Recognition 37 (2004) 889 – 899

F Feature Extractor

C1 C 2

C3 C4

...

Fabric Image

Ci ---Defect Type

Classifier

Fig. 1. Basic structure of fabric defect classi#cation.

the existing defect classi#cation methods can be categorized as follows: • Methods of using #rst-order statistical texture features [3,4]. • Methods of using second-order statistical texture features [1,5–8]. • Methods of using texture model features [7]. • Methods of using shape characteristics features [2,9]. • Methods of using wavelet transform-based features [5,7,10,11].

• Maximum likelihood (ML) and MSE training— SW-E-ML and SW-N-MSE In these cases, feature extraction is performed on wavelet frame decomposition [26] of the fabric image, in which di4erent standard wavelets are investigated. In the classi#cation module, Euclidean distance classi#er trained by ML method, and neural network classi#er trained by using MSE criterion-based backpropagation algorithm, are evaluated. These two methods are abbreviated SW-E-ML (Fig. 2) and SW-N-MSE (Fig. 3), respectively, where SW denotes the use of the standard wavelets. E and N denote the Euclidean distance classi#er and the neural

F Fabric Image

Wavelet Frames (standard wavelets)

...

Of these feature extraction methods, wavelet transform approach yields multiscale and multiorientation representations of the fabric image, which are considered to be more appropriate and e4ective for the characterization of di4erent classes of defects than other single-scale methods. In the wavelet transform approach, the wavelet in the feature extractor is normally empirically selected from a number of standard wavelets (referred to these commonly used wavelets, e.g., Haar wavelet, Daubechies wavelets, etc. [12]) which may not yield wavelet features with powerful discriminations between defect classes. A method that can design the wavelet for the mathematical optimality in the defect classi#cation, is therefore highly desirable. The classi#cation module often employs a neural network classi#er, which is trained by using the minimum-squared-error (MSE) criterion-based backpropagation algorithm. However, it has been reported that the MSE criterion does not generate a minimum error probability classi#er [13]. To mend this problem, Juang and Katagiri [13] has developed a new discriminative training method, called MCE training method. MCE training method is a general methodology for the design of the classi#er with mathematically proven optimality. Compared to the traditional training method, MCE method directly incorporates the decision rule of the classi#er into the training, which designs the classi#er in a way more consistent with the objective of minimum classi#cation error rate. The eLciency of this design strategy in pattern recognition has been clearly demonstrated in speech recognition [13–15], optical character recognition [16,17] and face recognition [18], however, not in fabric defect classi#cation. Apart from the issues of the wavelet design and the classi#er design, it is a normal practice that the front-end feature extractor and the back-end classi#er in the existing wavelet transform-based defect classi#cation methods are separately designed. As a result, the extracted wavelet features may

not be in a form suitable for the back-end classi#cation operation. In fact, this design inconsistency widely exists in many pattern recognition methods. A solution to this issue is to employ the so-called discriminative feature extraction (DFE) method [19–21]. DFE training method is an extension of the MCE training method from the back-end classi#er to the overall pattern recognizer. That is, the front-end feature extractor and the back-end classi#er are simultaneously designed for the objective of minimum error rate in the classi#cation. By using the DFE training method, the inconsistency between the feature extractor and the classi#er can be alleviated, which consequently leads to better performance in the classi#cation. In our previous works [22], MCE training method was applied to design a neural network classi#er in wavelet transform-based fabric defect classi#cation. Later, by using the DFE training method, a linear transformation matrix-based feature extractor was designed together with the design of an Euclidean distance classi#er for fabric defect classi#cation [23]. Next, instead of empirically preselecting a wavelet from the standard wavelets, the so-called adaptive wavelets were designed for the discrimination between defect and nondefect [24]. Furthermore, based on the DFE training framework, the design of an adaptive wavelet-based feature extractor was incorporated with the design of an Euclidean distance-based detector for the detection of fabric defects, where much better detection performance was achieved than the use of the standard wavelets [25]. In this paper, a comparative study is carried out for di4erent discriminative training methods for fabric defect classi#cation based on wavelet transform. These methods include

Ci ---Defect Type

Euclidean Classifier

C1 C2 C3 C4

(Λ)

ML

Fig. 2. SW-E-ML.

X. Yang et al. / Pattern Recognition 37 (2004) 889 – 899

F

(vij , wji )

Fabric Image

Wavelet Frames (standard wavelets)

Ci ---Defect Type Transform. Matrix

(U )

...

(standard wavelets)

C1 C 2 C3 C4

...

Wavelet Frames

...

Fabric Image

F

Ci ---Defect Type

Neural Network

891

Euclidean Classifier

(Λ )

DFE

Backpropa.

C C C C

MCE Loss

MSE Loss

Fig. 6. SWT-E-DFE.

Fig. 3. SW-N-MSE.

F Wavelet Frames (standard wavelets)

...

Fabric Image

Ci ---Defect Type

Euclidean Classifier

C1 C2 C3 C4

(Λ)

MCE Loss MCE

Fig. 4. SW-E-MCE.

F Wavelet Frames (standard wavelets)

...

Fabric Image

Ci ---Defect Type

Neural Network (vij, w ji )

C1 C2

C3 C4

In this case, an adaptive wavelet is specially designed for fabric defect classi#cation. The DFE training method is used to design both an adaptive wavelet-based feature extractor and an Euclidean distance classi#er simultaneously, with the objective of minimum error rate in defect classi#cation. This method is abbreviated as AW-E-DFE, where AW denotes the use of adaptive wavelet. These six methods have been evaluated on the classi#cation of eight classes of representative fabric defects, including nondefect class. For a reliable evaluation of the classi#cation performance, fabric images used for training and test are separated. This paper is organized as follows. In the next section, the six methods for the design of the classi#er and the feature extractor are described brieNy. Section 3 provides the evaluation conditions, results and discussions of these methods. This paper is concluded in Section 4.

MCE Loss MCE

Fig. 5. SW-N-MCE.

network classi#er, respectively. ML and MSE denote the ML training method and the MSE criterion-based back-propagation training method, respectively. The method SW-E-ML acts as the baseline of the comparison. • MCE training—SW-E-MCE and SW-N-MCE Apart from the above two traditional training methods, we also studied the application of MCE training to the design of the Euclidean distance classi#er and the neural network classi#er, which are abbreviated SW-E-MCE (Fig. 4) and SW-N-MCE (Fig. 5), respectively. • DFE training using a linear transformation matrix— SWT-E-DFE In this case, a linear transformation matrix is applied for extracting classi#cation-oriented features from the raw wavelet frames features. The design of the linear transformation matrix-based feature extractor is incorporated with the design of the back-end Euclidean distance classi#er by using DFE training method, for achieving appropriate interactions between the feature extractor and classi#er. This approach is abbreviated SWT-E-DFE (Fig. 6), where SWT denotes the use of the standard wavelets and linear transformation matrix in the feature extraction module. • DFE training using adaptive wavelet—AW-E-DFE

2. Discriminative training approaches to fabric defect classication using wavelet transform As depicted in Fig. 1, in the feature extraction module, feature vector F is formed from the wavelet frame decomposition of the fabric image to characterize each nonoverlapping window of the fabric image. In the classi#cation module, a classi#er is then used to assign the feature vector F into its corresponding category. In the follows, these two modules are elaborated and di4erent training methods are presented. 2.1. SW-E-ML This method is illustrated in Fig. 2, where standard wavelets are used in the wavelet frame decomposition, and an Euclidean distance classi#er trained by using the ML method is employed for the classi#cation. 2.1.1. Feature extraction module Wavelet frames yield a multiscale and multiorientation representation of the fabric image. Compared to critically sampled wavelet transform, the outputs of the wavelet frame decomposition are not subsampled. This yields translation-invariant signal representation that is desirable for pattern recognition applications. Moreover, wavelet frame decomposition allows for more freedoms in the

892

X. Yang et al. / Pattern Recognition 37 (2004) 889 – 899

design of the wavelets [27]. The e4ectiveness of wavelet frames has been demonstrated in its applications on texture classi#cation and segmentation [26,28]. In this work, based on the wavelet frame decomposition, channel variances [26] at the #rst three scales are used to form the feature vector F for the characterization of each window in the fabric image. 2.1.2. Classi7cation module In the classi#cation module, an Euclidean distance classi#er is used. Based on the Euclidean distance similarity measure, the discriminant function gl (F; ) for class Cl is given as follows. 2

gl (F; ) = F − ml  =

D 

(Fi − mli )

2

i=1

for l = 1; : : : ; J;

(1)

where l = 1; : : : ; J − 1 denotes J − 1 classes of defects and l = J denotes the nondefect class.  = {ml }l=1; :::; J are the reference vectors representing each class. D denotes the dimensionality of the feature vector F. Fi and mli denote the ith element of the feature vector F and ml , respectively. The decision rule of the classi#er is F ∈ Cq

if q = arg min gl (F; ): l

(2)

That is, an image window with feature vector F is classi#ed as class q if the discriminant function gq (F; ) is the smallest among all the classes. 2.1.3. ML training In the training of the Euclidean distance classi#er, the reference vectors  = {ml }l=1; :::; J are normally estimated by using the ML method [29]. Assuming that the feature vectors follow multivariate normal distribution, the reference vector for each class is calculated as the class-dependent mean vector. However, the actual distribution may not #t this assumption well, in which case the classi#cation result could be adversely a4ected. 2.2. SW-N-MSE

kth node in the output layer. zk , the activation output of the kth node in the output layer, is obtained using the equation   D NH   zk = f(netzk ) with netzk = f Fi vij wjk ; (3) j=1

i=1

where f(:) is the sigmoid function, and NH denotes the number of nodes in the hidden layer. The decision rule of the classi#er is if q = arg max zk :

F ∈ Cq

k

(4)

2.2.2. MSE criterion-based backpropagation algorithm Normally, the neural network classi#er is trained by using a MSE error criterion, which is de#ned as the sum of the squared di4erence between the desired outputs and the actual outputs of the network: No

Jmse =

1 (tk − zk )2 ; 2

(5)

k=1

where No denotes the number of nodes in the output layer. By using the backpropagation algorithm [29], the weights of the network are adjusted to minimize the error Jmse . It should be noted that the decision rule of the classi#er is not directly incorporated into the error criterion Jmse . As a result, the weights which minimize the error Jmse may not be consistent with the objective of MCE [13]. 2.3. SW-E-MCE This approach is illustrated in Fig. 4. The feature extraction module and the classi#cation module of the SW-E-MCE are the same as the SW-E-ML. In the training of the classi#er, the MCE method is used, which is implemented as follows [13]. Given a set of N training samples ={F(n) }n=1; :::; N where the class of each sample is labeled, a misclassi#cation measure dn is de#ned for each training sample F(n) ∈ Cq as −1=   [1=(J − 1)] Jp=q gp (F(n) ; )− dn = 1 − ; (6) gq (F(n) ; )

Fig. 3 illustrates the SW-N-MSE method. The feature extraction module of the SW-N-MSE is the same as the SW-E-ML. In the classi#cation module, a neural network classi#er [29] is employed instead, which is trained by using the MSE criterion-based backpropagation algorithm.

where  is a positive number which controls the contributions of the competing classes. Then a loss function is used to evaluate the classi#cation performance on training sample F(n) , which is de#ned as the smoothed zero-one function of the misclassi#cation measure:

2.2.1. Classi7cation module A three-layer neural network classi#er is employed for the defect classi#cation. The number of nodes in the input layer, hidden layer and output layer is 9, 16 and 9, respectively. Let vij denotes the weight connecting the ith node in the input layer to the jth node in the hidden layer, and wjk denotes the weight connecting the jth node in the hidden layer to the

ln =

1 ; 1 + e−dn

(7)

where  ¿ 0. For the total set of training samples , the empirical average cost is de#ned as 1 ln : N n=1 N

L=

(8)

X. Yang et al. / Pattern Recognition 37 (2004) 889 – 899

F Fabric Image

Wavelet Frames (adaptive wavelet)

(θ)

...

The MCE training of the classi#er is accomplished by minimizing the empirical average cost with respect to the reference vectors of the Euclidean distance classi#er.

893 Ci ---Defect Type

Euclidean Classifier

C1 C2

C3 C4

(Λ)

2.4. SW-N-MCE This method is illustrated in Fig. 5. The feature extraction module and the classi#cation module of the SW-N-MCE are the same as the SW-N-MSE, while the MCE method is used for the training of the neural network classi#er. Similar to the previous section, given a set of N training samples  = {F(n) }n=1; :::; N where the class of each sample is labeled, a misclassi#cation measure dn is de#ned for each training sample F(n) ∈ Cq as 1=  J  1 e·netzp  : (9) d = −netzq + ln  J −1 p=q

Then a loss value for the training sample F(n) is calculated using Eq. (7). For the total set of training samples, an empirical average cost is calculated using Eq. (8). The MCE training of the neural network classi#er is accomplished by minimizing the empirical average cost with respect to the network weights [22]. 2.5. SWT-E-DFE Fig. 6 illustrates this method, where standard wavelets are used in the wavelet frame decomposition, and an Euclidean distance classi#er is employed for the classi#cation. In general, the feature representation of the raw wavelet features F may not be appropriate for the classi#cation process. Therefore, a feature extractor is further incorporated to extract classi#cation-oriented features from the raw wavelet features F. In this case, a D × D linear transformation matrix U = {Uij }16i; j6D is used as the feature extractor, which yields a new feature vector V = UF. In the classi#cation module, the discriminant function gl (F; ) for class Cl is de#ned as gl (F; T1 ) = V − ml 2 =

D 

(Vi − mli )2

i=1

=

 D D   i=1

2 Uij Fj − mli

j=1

for l = 1; : : : ; J;

(10)

where T1 = {U; } denotes the trainable parameters in the feature extractor and the classi#er. Vi , mli , and Fj represent the ith and jth component of V, ml and F, respectively. Both the linear transformation matrix-based feature extractor and the Euclidean distance classi#er can be designed by using the DFE training method [19,21], which is illustrated in Fig. 6. The DFE method is an extension of the

DFE

MCE Loss

Fig. 7. AW-E-DFE.

MCE method from the classi#er to both the front-end feature extractor and the back-end classi#er. In the DFE training, the empirical average cost is calculated using Eq. (8) to evaluate the performance on the classi#cation of a set of training samples . By minimizing the empirical average cost with respect to the set of parameters T1 = {U; }, both the feature extractor and the classi#er are designed for the minimum error rate in the defect classi#cation [23]. 2.6. AW-E-DFE This method is illustrated in Fig. 7, where adaptive wavelet is used in the wavelet frame decomposition, and an Euclidean distance classi#er is employed for the classi#cation. In the wavelet transform-based fabric defect classi#cation, the wavelet has a direct impact on the resulting wavelet features, which indicates that the selection of the wavelet is closely related to the performance of the defect classi#cation. Normally, several standard wavelets are empirically tested for the application. The wavelet which yields the best classi#cation performance is #nally chosen. However, this selection scheme cannot guarantee that the selected wavelet is most suitable for the defect classi#cation. A better approach is to use the so-called adaptive wavelet which is specially designed for this purpose. In the application of fabric defect detection, the advantages of using adaptive wavelet has been clearly demonstrated [24,25]. Based on the undecimated octave band #lter banks [27], we study the design of a class of wavelets for the undecimated wavelet transform from the power complementary #lter banks. To ensure the multiresolution approximations and the wavelets exist, the #lter bank should satisfy the following conditions [27]: H (z)H (z −1 ) + G(z)G(z −1 ) = 1;

(11)

H (−1) = 0;

(12)

G(1) = 0;

where H (z) and G(z) denote the z-transform of the lowpass #lter h[n] and highpass #lter g[n] of the #lter bank, respectively. To design the wavelet using optimization strategy, it is important to parameterize the #lter bank [H (z); G(z)] to satisfy the given conditions. To this end, lattice structure factorization [30] is used, which performs a cascade-form

894

X. Yang et al. / Pattern Recognition 37 (2004) 889 – 899

factorization for the power complementary pairs [H (z) G(z)] as follows: H (z) cos &0 = Rm %(z)Rm−1 %(z) : : : R1 %(z) ; (13) sin &0 G(z) where Rk =

cos &k

sin &k

−sin &k

cos &k



and

%(z) =

1

0

0

z −1

:

Based on the lattice structure factorization, the design of the wavelet #lters can be formulated as an unconstrained optimization of a set of lattice coeLcients "={&k }06k6m−2 [25]. This advantage makes the lattice structure suitable for the wavelet #lter design. As illustrated in Fig. 7, the design of the adaptive wavelet is combined with the design of the classi#er by using the DFE training method. In the feature extractor, the adjustable parameters are the lattice coeLcients ", which determine the wavelet. In the classi#er, the adjustable parameters are the reference vectors . The total set of adjustable parameters is T2 = {"; }. By minimizing the empirical average cost with respect to the set of parameters T2 = {"; }, both the adaptive wavelet and the classi#er are designed for the objective of minimum error rate in the defect classi#cation.

3. Evaluations 3.1. Evaluation data collection The discriminative training methods presented in the preceding section were evaluated on the classi#cation of eight types of typical fabric defects on plain, twill fabrics, as shown in Fig. 8. Fabric without defect was classi#ed into the nondefect class. Totally 64 fabric images containing eight types of defects were used for the evaluation. The fabric images are 256 × 256 pixels in size with 256 gray levels. Feature vectors were extracted to characterize the image windows of size 32 × 32 pixels. Thirty-three fabric images were used for training, where 494 defect samples and 462 nondefect samples were collected. The remaining 31 fabric images were used for testing, where 466 defect samples and 434 nondefect samples were collected. 3.2. Evaluation results and comparison The performance of these defect classi#cation methods is evaluated and compared based on their resulting overall classi#cation accuracy, which is the percentage of samples correctly classi#ed. Moreover, the classi#cation accuracy of each class of defects is also investigated, for a better understanding of why a particular method performs well or poorly for a particular class of defects. In the MCE and DFE

training, the results are a4ected by the selection of the parameters  and  (see Eqs. (6), (7) and (9)). In this work, di4erent  and  were used in the training. For the clarity of presentation, the values corresponding to the best classi#cation performance of each method are given. The following subsections present the performance of these methods by grouping the similar ones together. 3.2.1. SW-E-ML and SW-N-MSE In the evaluation of these two methods, several standard wavelets were examined in the feature extraction part, respectively. These standard wavelets include Haar wavelet [12], Daubechies wavelet with length 10 [12], Battle-Lemarie wavelet of degree 1 [31] and cubic B-spline wavelet [31]. Their wavelet functions have di4erent vanishing moments, size of support and regularity, which are viewed as the most important properties of wavelet bases [12]. Therefore, the comparison between these wavelets can indicate whether these properties are also important for the discrimination of fabric defects. Table 1 gives the classi#cation performance corresponding to di4erent wavelets, where ML method and backpropagation algorithm with MSE error criterion were used to train the Euclidean distance classi#er and neural network classi#er, respectively. From this table, it can be seen that the ML method yields a classi#er with very poor performance (37.7– 63.2%). This fact clearly indicates that the ML method causes large decision bias in designing the Euclidean distance classi#er. On the other hand, the more sophisticated neural network classi#er trained by using MSE criterion-based backpropagation algorithm achieves much better classi#cation performance (87.3–90.3%). As to the di4erent wavelets, Haar wavelet, Daubechies wavelet, Battle-Lemarie wavelet achieve similar performance in the classi#cation of test samples. This suggests that the properties of the wavelets (vanishing moments, size of support and regularity) have limited impacts on the defect classi#cation. The cubic B-spline wavelet, which is proven to be similar to the Gabor function [32], is well localized in both space and frequency. However, this wavelet gives the worst classi#cation performance, which is probably due to poor spatial localization of the associated analysis #lter bank [26]. In the following sections (Sections 3.2.2 and 3.2.3), the Haar wavelet is used in the feature extraction, since it achieves the best classi#cation performance in the use of the Euclidean distance classi#er and is close to the best performance in the use of the neural network classi#er. 3.2.2. SW-E-MCE and SW-N-MCE The classi#cation performance of the MCE training-based Euclidean distance classi#er and neural network classi#er are given in Table 2. Compared with the ML method, the MCE training method largely reduces the decision bias of the Euclidean distance classi#er, which results in an

X. Yang et al. / Pattern Recognition 37 (2004) 889 – 899

(a)

(b)

(c)

(d)

(e)

(f)

(g)

(h)

895

Fig. 8. Fabric images containing defects: (a) Broken End; (b) Slack End; (c) Dirty Yarn; (d) Wrong Draw; (e) Netting Multiples; (f) Thin Bar; (g) Mispick; (h) Thick Bar.

Table 1 Classi#cation accuracy of SW-E-ML and SW-N-MSE Standard Wavelets

Classi#cation accuracy (%) SW-E-ML

Haar Daubechies Battle-lemarie Cubic B-spline

SW-N-MSE

Train

Test

Train

Test

70.3 73.5 73.6 48.5

63.2 62.5 63.1 37.7

98.1 99.5 99.4 99.6

90.3 90.6 89.5 87.3

improvement on the classi#cation accuracy of test samples from 63.2% to 88.0%. The eLciency of MCE training is also demonstrated in the design of the neural network classi#er. Compared with the MSE criterion-based training method, MCE training method improves the classi#cation accuracy from 90.3% to 91.7%. These results imply that the selection of training method is more important than the selection of the classi#er structure in the defect classi#cation.

3.2.3. SWT-E-DFE In this section, DFE training method was used to simultaneously design both a linear transformation matrix-based feature extractor and an Euclidean distance classi#er. At the beginning of the DFE training, the transformation matrix U was initialized with an identity matrix I, and the reference vectors  of the Euclidean classi#er was initialized by the MCE training method. Then T1 = {U; } was adjusted by

896

X. Yang et al. / Pattern Recognition 37 (2004) 889 – 899

Table 2 Classi#cation accuracy of SW-E-MCE and SW-N-MCE

Table 4 Classi#cation accuracy of AW-E-DFE

Methods

Training process

SW-E-ML SW-N-MSE

Classi#cation accuracy (%) Train

Test

96.0 99.4

88.0 91.7

Table 3 Classi#cation accuracy of SWT-E-DFE Training process

U = I, MCE training of % DFE training of T1 = {U; }

Classi#cation accuracy (%) Train

Test

96.0 97.1

88.0 91.5

using the DFE training for minimizing the error rate in the classi#cation. The classi#cation performance at the beginning and at the end of the DFE training are evaluated and presented in Table 3. Compared to the MCE training of the classi#er, the DFE training of the linear transformation matrix further achieves an improvement on the classi#cation of the test samples from 88.0% to 91.5%. Such an improvement is primarily attributed to the design of the linear transformation matrix-based feature extractor, where wavelet features suitable for the back-end classi#er are extracted. 3.2.4. AW-E-DFE Rather than using the standard wavelets, adaptive wavelet was used in the wavelet frame decomposition. Based on the DFE design framework, the design of an adaptive wavelet-based feature extractor was incorporated with the design of an Euclidean distance classi#er for the fabric defect classi#cation. At the beginning of the DFE training, the lattice coeLcients ", which determines the wavelet function, was randomly initialized. Corresponding to the feature extractor with the initial wavelet, the reference vectors  of the Euclidean classi#er was initialized using the MCE training method. Then, the DFE training method was applied to adjust T2 = {"; } for minimizing the error rate in the classi#cation. Table 4 gives the classi#cation performance at the beginning and the end of the DFE training procedure. In contrast to the DFE training using Haar wavelet and the linear transformation matrix, DFE training using adaptive wavelet further achieves an improvement on the classi#cation of the testing samples from 91.5% to 95.8%. This improvement is due to the use of adaptive wavelet, which substantially increases the discriminative power of the wavelet features for di4erent classes of fabric defects.

MCE training of  DFE training of T2 = {"; }

Classi#cation accuracy (%) Train

Test

85.9 99.8

82.2 95.8

3.2.5. Detailed evaluations of the classi7cation performance of each class of fabric defects Apart from the evaluation criterion of overall classi#cation accuracy, it is also meaningful to compare the above discriminative training approaches in terms of their classi#cation accuracy on each class of defects. Fig. 9 illustrates the classi#cation accuracy on the test samples of each class of fabric defects by using the six classi#cation methods. As it is shown in Fig. 9, in the classi#cation of defect Broken End, Slack End, Thin Bar, Mispick and nondefect, the best performance of the #ve methods using the Haar wavelet (SW-N-MSE, SW-N-MCE, SW-E-ML, SW-E-MCE and SWT-E-DFE) is similar to the method using the adaptive wavelet (AW-E-DFE). In the classi#cation of class nondefect, the method using the adaptive wavelet only slightly outperforms the best of the other approaches using the Haar wavelet. It is worth noting that this small improvement bene#ted the overall fabric defect classi#cation, since most of the samples under inspection are nondefect samples. In the classi#cation of defect Dirty Yarn and Netting Multiples, the best of the methods using the Haar wavelet achieves better performance than the method using the adaptive wavelet. However, much better performance is achieved by the latter method in the classi#cation of defect Wrong Draw and Thick Bar. This large improvement on the classi#cation performance is primarily due to the use of adaptive wavelet. Fig. 10 (Fig. 11) illustrates the histograms of the Euclidean distances between the Wrong Draw (Thick Bar) training samples and its reference vector in the methods SWT-E-DFE and AW-E-DFE, respectively. From these two #gures, it can be seen that the use of adaptive wavelet substantially reduces the within-class scatter of the wavelet features in contrast to the use of the Haar wavelet. In this way, the adaptive wavelet not only achieves better discriminative power between defect classes, but also increases the consistency between the training samples and the unknown test samples, which subsequently enhances the generalization capacity of the classi#cation method. By taking an overall viewpoint of the classi#cation performance on individual classes, the method of using the adaptive wavelet is considered to be more desirable for fabric defect classi#cation, since the worst individual classi#cation accuracy is 87.5% in the classi#cation of defect Dirty Yarn. The approaches using the Haar wavelet, however, have quite poor performance (around 70%) in the classi#cation of defects Wrong Draw and Thick Bar.

X. Yang et al. / Pattern Recognition 37 (2004) 889 – 899

897

Fig. 9. Classi#cation accuracy of each class of fabric defects by using di4erent discriminative training approaches.

Fig. 10. The histograms of the Euclidean distances between the Wrong Draw samples and its reference vector, where the training approach is (a) SWT-E-DFE, (b) AW-E-DFE.

Fig. 11. The histograms of the Euclidean distances between the Thick Bar samples and its reference vector, where the training approach is (a) SWT-E-DFE, (b) AW-E-DFE.

898

X. Yang et al. / Pattern Recognition 37 (2004) 889 – 899

4. Conclusions In this paper, six discriminative training methods for fabric defect classi#cation based on wavelet transform have been studied. Compared with the ML method for the design of the Euclidean distance classi#er and the MSE criterion-based backpropagation algorithm for the design of the neural network classi#er, the MCE training method designs the classi#er in a way which is more consistent with the objective of minimum classi#cation error. By using the linear transformation matrix-based DFE training, wavelet features more appropriate for the back-end classi#er are extracted, which subsequently improve the classi#cation performance. Compared to the standard wavelets, the adaptive wavelet designed with DFE method largely enhances the discriminant power of the wavelet features, which results in much better classi#cation performance than the other discriminant training methods.

References [1] R. Stojanpvic, M. Panagiotis, K. Christos, K. Yorgos, K. Stavros, P. George, Real-time vision-based system for textile fabric inspection, Real-Time Imaging 7 (2001) 507–518. [2] D. Brzakovic, N. Vujovic, Designing a defect classi#cation system: a case study, Pattern Recognition 29 (8) (1996) 1401–1419. [3] Y.F. Zhang, R.R. Bresee, Fabric defect detection and classi#cation using image analysis, Textile Res. J. 65 (1) (1995) 1–9. [4] D. Rohrmus, Invariant web defect detection and classi#cation system, Proceedings of IEEE International Conference on CVPR, Vol. 2, 2000, pp. 794 –795. [5] Y.A. Karayiannis, R. Stojanovic, P. Mitropoulos, C. Koulamas, T. Stouraitis, S. Koubias, G. Papadopoulos, Defect detection and classi#cation on web textile fabric using multiresolution decomposition and neural networks, Proceedings of IEEE International Conference on Electronics, Circuits and Systems, Vol. 2, 1999, pp. 765 –768. [6] A.S. Tolba, A.N. Abu-Rezeq, A self-organizing feature map for automated visual inspection of textile products, Comput. Ind. 32 (1997) 319–333. [7] YuNan Gong, Study on image analysis of fabric defects, Ph.D. Dissertation, China Textile University, Shanghai, China, 1999. [8] C. Fernandez, S. Fernandez, P. Campoy, R. Aracil, On-line texture analysis for Nat products inspection, Neural Nets Implementation, Proceedings of 20th IEEE International Conference on Industrial Electronics, Control and Instrumentation, Vol. 2, 1994, pp. 867–872. [9] M. Bradshaw, The application of machine vision to the automated inspection of knitted fabrics, Mechatronics 5 (1995) 233–243. [10] M. Mufti, Fault detection and identi#cation using fuzzy wavelets, Ph.D. Thesis, School of Electrical and Computer Engineering, Georgia Institute of Technology, 1995. [11] J.L. Dorrity, G. Vachtsevanos, On-line defect detection for weaving systems, Proceedings of IEEE Technical Conference on Textile, Fiber and Film Industry, 1996, pp. 1– 6.

[12] S. Mallat, A Wavelet Tour of Signal Processing, 2nd Edition, Academic Press, San Diego, 1999. [13] B.H. Juang, S. Katagiri, Discriminant learning for minimum error classi#cation, IEEE Trans. Signal Process. 40 (12) (1992) 3043–3054. [14] S. Katagiri, B.H. Juang, C.H. Lee, Pattern recognition using a family of design algorithms based upon the generalized probabilistic descent method, Proc. IEEE 86 (11) (1998) 2345 –2373. [15] B.H. Juang, W. Chou, C.H. Lee, Minimum classi#cation error rate methods for speech recognition, IEEE Trans. Speech Audio Process. 5 (3) (1997) 257–265. [16] M.K. Tasy, K.H. Shyu, P.H. Chang, Feature transformation with generalized learning vector quantization for handwritten Chinese character recognition, IEICE Trans. Inform. Syst. E82-D (3) (1999) 687–692. [17] Q. Huo, Y. Ge, Z. Feng, High performance Chinese OCR based on Gabor features, discriminative feature extraction and model training, Proceedings of IEEE International Conference on Acoustics, Speech and Signal Processing, 2001, pp. 1517– 1520. [18] L.H. Chen, S.H. Deng, H.Y. Liao, MCE-based face recognition, Int. J. Pattern Recognition Artif. Intell. 15 (8) (2001) 1311–1327. [19] A. Biem, S. Katagiri, B.H. Juang, Pattern recognition based on discriminative feature extraction, IEEE Trans. Signal Process. 45 (2) (1997) 500–504. [20] A. Biem, S. Katagiri, E. McDermott, B.H. Juang, An application of discriminative feature extraction to #lter-bank-based speech recognition, IEEE Trans. Speech Audio Process. 9 (2) (2001) 96–110. [21] K.K. Paliwal, M. Bacchiani, Y. Sagisaka, Simultaneous design of feature extractor and pattern classi#er using the minimum classi#cation error training algorithm, Proceedings of the IEEE Workshop on Neural Networks for Signal Processing, 1995, pp. 67–76. [22] G. Pang, X.Z. Yang, N. Yung, Fabric Defect Classi#cation using Wavelet Frames and Minimum Classi#cation Error-based Neural Network, in: R. Bradbeer, J. Billingsley (Eds.), Mechatronics and Machine Vision 2002: Current Practice, Research Studies Press Ltd., 2002, pp. 77–85. [23] X.Z. Yang, G. Pang, N. Yung, Fabric defect classi#cation using wavelet frames and minimum classi#cation error training, Proceedings of the 37th IEEE International Conference on Industry Applications, Vol. 1, 2002, pp. 290 –296. [24] X.Z. Yang, G. Pang, N. Yung, Fabric defect detection using adaptive wavelet, Proceedings of IEEE International Conference on Acoustics, Speech and Signal Processing, Vol. 6, 2001, pp. 3697–3700. [25] X.Z. Yang, G. Pang, N. Yung, Discriminative fabric defect detection using adaptive wavelet, Opt. Eng. 41 (12) (2002) 3116–3126. [26] M. Unser, Texture classi#cation and segmentation using wavelet frames, IEEE Trans. Image Process. 4 (11) (1995) 1549–1560. [27] Z. Cvetkovic, M. Vetterli, Oversampled #lter banks, IEEE Trans. Signal Process. 45 (5) (1998) 1245–1255. [28] A. Laine, J. Fan, Frame representations for texture segmentation, IEEE Trans. Image Process. 5 (5) (1996) 771–780. [29] R.O. Duda, P.E. Hart, D.G. Stork, Pattern Classi#cation, 2nd Edition, Wiley, New York, 2001.

X. Yang et al. / Pattern Recognition 37 (2004) 889 – 899 [30] P.P. Vaidyanathan, Z. Doganata, The role of lossless systems in modern digital signal processing: a tutorial, IEEE Trans. Educ. 32 (3) (1989) 181–197. [31] M. Unser, A practical guide to the implementation of wavelet transform, in: A. Aldroubi, M. Unser (Eds.), Wavelets in

899

Medicine and Biology, CRC Press, Boca Raton, FL, USA, 1996, pp. 37–73. [32] M. Unser, A. Aldroubi, M. Eden, On the asymptotic convergence of b-spline wavelets to Gabor functions, IEEE Trans. Inform. Theory 38 (2) (1992) 867–872.

About the Author—XUEZHI YANG received the B.Eng. degree from Anhui University, China, in 1992 and the M.Eng. degree from Hefei University of Technology, China, in 1995, and the Ph.D. degree from The University of Hong Kong, China, in 2003. He is currently with Hefei East Radiation Technology Corporation., Hefei Hi-Tech Development Zone, China, involved in the research and development on Compton scatter imaging. His research interests include pattern recognition, multiscale image/signal processing using wavelets, Compton scatter imaging, and automated visual inspection system. About the Author—GRANTHAM K.H. PANG (http://www.eee.hku.hk/∼gpang) obtained his Ph.D. degree from the University of Cambridge in 1986. He was with the Department of Electrical and Computer Engineering, University of Waterloo, Canada, from 1986 to 1996 and joined the Department of Electrical and Electronic Engineering at The University of Hong Kong in 1996. Since 1988, he published more than 130 technical papers and has authored or co-authored six books. He has also obtained two US patents. His research interests include machine vision for surface defect detection, optical communications, expert systems for control system design, intelligent control and intelligent transportation systems. Dr. Pang is in charge of the Industrial Automation Research Lab (http://www.eee.hku.hk/∼gpang/IARL/HomeIARL.htm). Dr. Pang has acted as a consultant to many companies, including Mitsubishi Electric Corp. in Japan, Northern Telecom and Imperial Oil Ltd. in Canada, MTR Corp. and COTCO Int. Ltd. in Hong Kong. In 1994, he worked as a Senior Visiting Researcher at Hitachi Research Lab. in Japan. Dr. Pang is a Chartered Electrical Engineer, and a member of the IEE, HKIE as well as a Senior Member of IEEE. About the Author—NELSON YUNG received his B.Sc. and Ph.D. degrees from the University of Newcastle-Upon-Tyne. He was lecturer at the same university from 1985 to 1990. From 1990 to 1993, he worked as senior research scientist at the Department of Defence, Australia. He joined the University of Hong Kong in late 1993 as Associate Professor. He is the founding Director of the Laboratory for Intelligent Transportation Systems Research at HKU, and also Deputy Director of HKU’s Institue of Transport Studies. Dr. Yung has co-authored a computer vision book, and has published over 100 journal and conference papers in the areas of digital image processing, parallel algorithms, visual traLc surveillance and autonomous vehicle navigation and learning algorithms. He is a Chartered Electrical Engineer, Member of the HKIE, IEE and Senior member of the IEEE. He is the Chairman of the Technology Advisory Board of mCommerce Online Ltd, a university spin-o4 company.