The invention provides a
friction stir welding defect detection method fused with weak
supervised learning, which belongs to the technical field of
welding defect detection, and constructs a unified detection framework suitable for various weak labels such as points, frames, graffiti and the like by referring to the advantages of a
large model SAM (Section Anything Model) in visual segmentation. The method comprises the following steps: firstly, converting different types of weak tags into an
input format acceptable by SAM by adopting a prompt adapter module, and enhancing the prompt compatibility of a model; and secondly, abnormal region responses are eliminated through a response filter, and the recognition precision of the disguise or low-contrast
defect region is improved in combination with a semantic matcher. A prompt self-adaptive knowledge
distillation mechanism is further introduced, so that knowledge migration from the SAM model to the lightweight detection model is realized, and the
feature learning ability of complex weld defects is enhanced. According to the method, high-quality defect detection can be realized in the weld defect image without a large number of accurate labels, and particularly, the method has remarkable advantages in the aspect of
processing the
welding defects with fuzzy boundaries, small sizes or weak contrast, and has wide industrial application value.