CPC G06T 7/001 (2013.01) [G06V 10/764 (2022.01); G06V 10/82 (2022.01); G01N 29/4445 (2013.01); G06T 2207/20081 (2013.01); G06T 2207/20084 (2013.01); G06T 2207/30121 (2013.01)] | 13 Claims |
1. A detection method, comprising:
inputting an image to be detected into a detection model being pre-constructed and detecting the image to be detected;
wherein the detection model comprises:
a defect classification identification sub-model configured to identify a classification of a defect in the image to be detected; wherein the defect classification identification sub-model comprises a plurality of base models and a secondary model;
the plurality of base models are configured to respectively determine an initial classification of the defect in the image to be detected; and
the secondary model is configured to determine a final classification of the defect in the image to be detected according to input data obtained by integrating output data of the plurality of base models;
wherein the detection model further comprises: a defect position identification sub-model configured to mark a position of the defect in the image to be detected;
wherein the defect position identification sub-model is an object detector; and
wherein the defect position identification sub-model is obtained by training the object detector based on an original data set;
the training the object detector based on the original data set comprises:
acquiring the original data set comprising a plurality of images to be detected with known defects; and
classifying first regions corresponding to defects of all classifications of defects in the plurality of images to be detected with known defects into one classification as a foreground and classifying regions outside the first regions in the plurality of images to be detected with known defects into the other classification as a background such that the object detector only distinguishes between the foreground and the background when the object detector is trained, to identify only positions of the defects.
|