The invention relates to the technical field of
textile fabrics, in particular to a knitted fabric broken
yarn defect detection
system and method based on
artificial intelligence. The method comprises the following steps: firstly, collecting knitted fabric images containing broken
yarn defects, and constructing a target domain
data set; secondly, acquiring defect images and labels of different knitted fabrics, and constructing a
source field data set; performing pre-training on the OfficientNet by using the
source field data set to obtain
source field features; and inputting the target domain data set into the pre-trained OfficientNet to obtain a target domain feature. Secondly, transmitting the source domain feature and the target domain feature to
a domain classifier, and outputting
a domain label vector; thirdly, a defect detection
loss function is designed and comprises a plurality of loss items, and all the loss items are added through weighting; and finally, the OfficientNet and the domain classifier are subjected to alternate updating. And outputting the broken
yarn defect type of the knitted fabric image through the softmax layer according to the output of the OfficientNet. According to the invention, the problem of insufficient data volume of the defect image of the knitted fabric can be solved, and the defect detection accuracy is further improved.