The invention discloses a fabric defect detection method based on a depth neural network. The method comprises the following steps: (1), an
image acquisition system is built to acquire an image; (2), the image is segmented into experimental samples, fabric
sample image data are enhanced at the same time, and a fabric image after enhancement serves as a training sample; (3), a depth neural network is designed; (4), parameters are set, the depth neural network is initialized, the training sample is fed to the depth neural network for training, and after network training is completed, the
network model is saved; and (5), an inputted new fabric sample is fed to the
network model for detection. According to the fabric defect detection method based on the depth neural network provided by the invention, with a
convolutional neural network as a core,
feature extraction is performed by a convolutional layer, a
pooling layer retains effective features and reduces the amount of calculation, and a full connection layer is used for classification. A mini-batch
gradient descent method is used for optimization, the generalization ability is enhanced through L2 regularization, defect recognition is carried out through determining the corresponding position of the maximum component outputted by a classifier, effects are shown in Figure 4, Actual presents the actual category of the sample, and Pred presents the predicted category of the sample.