The invention relates to the technical field of
image processing, and discloses a tobacco sundry image set construction method, which comprises the following steps: S1, collecting tobacco shred sundry images; s2, gray correction and
noise suppression are carried out on the tobacco shred sundry image, a sundry main body and a sundry background of the tobacco shred sundry image are separated, and an independent sundry image with a transparent background is generated; s3, repeatedly executing the steps S1 to S2, and storing the
impurity independent images to form a sample set; s4, constructing a tobacco shred sundry
training set, and obtaining a plurality of tobacco shred sundry-free image samples; s5, superposing the tobacco shred sundry-free image and the multiple sundry independent images to form a
fusion image set; s6, dividing the fused image set into a
training set, a
verification set and a
test set according to the proportion of 8: 1: 1; and S7, obtaining an anchor frame set for tobacco shred
impurity detection through a clustering
algorithm. Tobacco shred background interference is removed, training data generated through follow-up fusion can force the model to focus on learning of visual features of sundries, and the generalization ability of the detection model is improved.