The invention relates to a part integrity detection
algorithm for an automobile side window electroplated part, which comprises the following steps of: positioning each part and a
welding spot of the automobile electroplated part by adopting
multiple exposure, acquiring a template picture, and generating a
template matching model through the high-
exposure template picture; training a target detection model by using the low-
exposure template picture; obtaining a
homography matrix of feature point changes of the picture of the to-be-tested piece and the template picture, and calculating to obtain a
welding spot ROI position of the picture of the to-be-tested piece; and when the detection
score value is lower than the threshold value, it is indicated that the
welding spot is well welded. Performing foam detection on a high-
exposure image, detecting other parts by using a trained target detection model, performing threshold
processing and non-maximum suppression on a model reasoning result, finally summarizing all AI detection results, welding spot detection results and foam detection results, and judging OK and NG results of electroplated parts. According to the method, the interference of unstable illumination in a dark box-free environment can be overcome, and meanwhile, relatively high
algorithm accuracy is ensured.