The invention discloses a
particle board surface defect identification method and
system based on a twin network and supervised comparative learning, and the method comprises the steps: (1) collecting a
particle board surface image, carrying out the preprocessing, constructing a
small sample data set containing various defects, and dividing the
small sample data set into a
training set and a
test set; (2) constructing an improved twin supervised contrast
network model, wherein the model comprises a
feature extraction backbone network, an LDFPN and a classification contrast learning head; (3) training the twin supervised comparison
network model by using the
training set, and adopting joint optimization of
cross entropy classification loss and supervised comparison loss during training; and (4) performing defect identification and classification on the shaving board surface image by using the trained twin supervision comparison
network model. The method and the
system aim at solving the problems of low
particle board surface defect identification accuracy and weak model generalization ability under the condition of small samples, efficient and accurate automatic quality detection is realized, and the method and the
system have the potential of real-time deployment on a
production line.