We propose a new method for fabric defect detection by incorporating the design of an adaptive wavelet-based feature extractor with the design of an Euclidean distance-based detector. The proposed method characterizes the fabric image with multiscale wavelet features by using undecimated discrete wavelet transforms. Each nonoverlapping window of the fabric image is then detected as defect or nondefect with an Euclidean distance-based detector. Instead of using the standard wavelet bases, an adaptive wavelet basis is designed for the detection of fabric defects. Minimization of the detection error is achieved by incorporating the design of the adaptive wavelet with the design of the detector parameters using a discriminative feature extraction (DFE) training method. The proposed method has been evaluated on 480 defect samples from five types of defects, and 480 nondefect samples, where a 97.5% detection rate and 0.63% false alarm rate were achieved. The evaluations were also carried out on unknown types of defects, where a 93.3% detection rate and 3.97% false alarm rate were achieved in the detection of 180 defect samples and 780 nondefect samples.