CN-121998916-A - AOI-oriented welding spot defect rapid adaptation detection method, device, system and storage medium
Abstract
The embodiment of the application provides an AOI-oriented welding spot defect rapid adaptation detection method, device, system and storage medium, wherein the method comprises the steps of (1) obtaining an entire image of an AOI image, constructing a supervised model, positioning welding spots on the entire image by using the supervised model, and carrying out preliminary judgment, wherein a judgment result comprises good products and defects; the method comprises the steps of (1) cutting a front trunk network of a supervised model into a lightweight feature extractor, carrying out solder joint sub-graph extraction characterization on an image which is preliminarily judged to be good by the lightweight feature extractor, constructing a good feature vector library, cutting a solder joint sub-graph to be rechecked according to a detection frame by using a whole graph which is judged to be non-good, inputting the feature extraction network to obtain a feature vector of the solder joint sub-graph to be rechecked, and (4) rechecking the obtained feature vector through Euclidean distance and a split threshold based on good distribution, and carrying out solder joint defect judgment according to a preset threshold. The method has the advantages of rapid defect detection and precision improvement.
Inventors
- YIN QING
- GAO LIN
- DAI YI
- LIU LUPING
Assignees
- 成都信息工程大学
Dates
- Publication Date
- 20260508
- Application Date
- 20260107
Claims (10)
- 1. The AOI-oriented welding spot defect rapid adaptation detection method is characterized by comprising the following steps of: Firstly, obtaining an entire image of an AOI image, constructing a supervised model, positioning welding spots of the entire image by using the supervised model, and primarily judging, wherein a judging result comprises good products and defects; Cutting a front trunk network of the supervised model into a lightweight feature extractor, and carrying out solder joint sub-graph extraction characterization on the image which is preliminarily judged to be good by using the lightweight feature extractor to construct a good feature vector library; Cutting the whole graph with the judging result of the step one as the non-good product according to a detection frame, normalizing the welding point subgraph to be re-detected, and inputting a characteristic extraction network to obtain a characteristic vector of the welding point subgraph to be re-detected; and step four, rechecking the feature vector obtained in the step three through Euclidean distance and a grading threshold value based on good product distribution, and judging the welding spot defect according to a preset threshold value.
- 2. The method of claim 1, wherein the step one of constructing a supervised model further comprises: collecting and labeling a sample of the whole AOI image; Carrying out detection frame and category labeling on welding spots; a supervised model is trained to identify solder joint locations and defect categories.
- 3. The method of claim 1, wherein the step one locates the weld spot and makes a preliminary determination using a supervised model, further comprising: Setting a detection frame score threshold, a classification score threshold and a feature retrieval distance score threshold; Inputting the whole image of the AOI image into a supervised model to obtain a welding spot detection frame, a category and a category score; if the preliminary judgment result is good and the classification score is more than or equal to the classification threshold, directly outputting the good, and if the preliminary judgment result is defective or good but the classification score is less than the classification threshold, entering a characteristic retrieval and abnormality judgment flow.
- 4. The method according to claim 1, wherein the step two of constructing a good feature vector library further comprises: And (3) extracting feature vectors from the good subgraphs in the step one, clustering the feature vectors by using unsupervised clustering, and writing the clustered feature vectors into a good feature index library.
- 5. The method of detecting according to claim 1, further comprising: And (5) warehousing the artificially confirmed false alarm good product increment, and updating the clustering/structure of the good product characteristic index library.
- 6. The method according to claim 1, wherein the fourth step further comprises: And (3) leading the feature vector of the welding spot subgraph to be rechecked to enter and exit from the nearest search, if the rechecked distance fraction > is set with a threshold value, rechecking is judged to be a defect, otherwise rechecking is judged to be a good product.
- 7. The method of detecting according to claim 1, further comprising: The quantile threshold is adjusted to improve multi-line body/multi-standard adaptation.
- 8. AOI-oriented welding spot defect rapid adaptation detection device comprises the following modules: The image acquisition module is used for acquiring the AOI image of the panel and constructing a training set; The welding spot detection and preliminary screening module is used for outputting a welding spot detection frame, a category and a classification score based on the supervised detection model; the subgraph cutting and normalizing module is used for cutting the welding spot subgraph according to the detection frame, unifying the sizes and carrying out standardization/normalization treatment; the feature extraction module is used for cutting and freezing according to the front backbone network of the supervised detection model and outputting sub-graph feature vectors; the feature index library construction module is used for extracting feature vectors from good subgraphs of the training set by using the feature extraction module, and organizing the feature vectors into a cluster index structure by using unsupervised clustering; And the rechecking module is used for calling the feature extraction module and the feature index library, carrying out feature extraction and nearest neighbor retrieval on the subgraph to be inspected, and carrying out abnormality judgment according to a preset threshold value.
- 9. A computer system comprising a memory, a processor and a computer program stored in the memory and executable on the processor, which when executed by the processor implements an AOI-oriented solder joint defect fast adaptation detection method as described above.
- 10. A computer readable storage medium, characterized in that the computer readable storage medium stores a computer program which, when executed by a processor, implements an AOI-oriented solder joint defect fast adaptation detection method as described above.
Description
AOI-oriented welding spot defect rapid adaptation detection method, device, system and storage medium Technical Field The invention relates to the technical field of image processing and machine vision, in particular to an AOI-oriented welding spot defect rapid adaptation detection method, device and system and a storage medium. Background In printed circuit board (PCB, printed Circuit Board) soldering and surface mount technology (SMT, surface Mount Technology) production, solder joint defects (e.g. low tin, continuous tin, cold solder joint, etc.) directly affect the electrical performance and reliability of the product. Automatic optical inspection (AOI, automated Optical Inspection) is used as a key on-line quality control means, and relies on high resolution industrial cameras, on-axis/lateral multiple light sources and a stable motion platform to obtain high contrast images to highlight the weld spot geometry and reflection morphology features. However, the manual visual inspection based on the AOI image has low efficiency, high difficulty and easy interference of subjective factors, and automatic intelligent detection has become an industry development trend. In the prior art, the AOI welding spot defect detection method mainly comprises template matching, supervised learning and unsupervised learning. The template matching method (such as CN202010306399.1, CN202311815535. X) is to match the region to be detected with a pre-established reference image template, for example, based on normalized cross-correlation, structural similarity or feature point matching, and determine that the defect is a defect when the matching score is below a threshold or the geometric deviation exceeds a threshold. However, the template matching method has the defects that (1) good product appearance is diversified, illumination reflection changes are obvious, the template is difficult to cover all forms, maintenance cost is high, false alarm rate is high, and (2) the template matching method is more suitable for detecting defects of the whole forms, and fine welding spot details are difficult to align stably under the conditions of template alignment error and reflection saturation, so that missed detection exists. A supervised deep learning method (such as CN201910795988.8 and CN 202011542008.2) is used for identifying good products and defective products of an AOI image through classification/detection/segmentation models, wherein supervision is performed by training by depending on a large amount of labeling data, and good products and defective samples need to be manually labeled, and the method has the defects that (1) serious unbalance (namely, the number of good products is far more than that of defective products) and defects are scarce, so that training difficulty and generalization are limited, (2) standard difference and conflict labeling of cross workshops/products enable a single model to be difficult to be matched uniformly, (3) new products need to be labeled and retrained in large amounts, deployment and updating are complex and timeliness are poor, and (4) on-line updating needs on-site labeling and training, engineering feasibility is poor, and maintenance cost is high. An unsupervised learning (e.g. generating an countermeasure network) method (e.g. CN 201910020529.2) usually takes a normal sample as a positive sample to learn the low-dimensional hidden space distribution of the method, maps a to-be-detected graph to the same hidden space, judges abnormality according to the difference between the to-be-detected graph and the positive sample distribution and a threshold value, and has the defects that (1) only a whole device graph can be used as input modeling, tiny welding spot defects are difficult to locate, the welding spot detection effect is poor, and the interpretation is insufficient, (2) the method is interfered by background/device difference, abnormal attribution is ambiguous, the maintenance guidance value is limited, and (3) the method generates unstable training and superssence sensitivity of the countermeasure network, and the difficulty of on-site real-time training and updating of a model is high. Aiming at the defects of the existing method, a detection method capable of realizing rapid defect detection and reducing false alarm/missing report rate is needed to be provided. Disclosure of Invention The embodiment of the application solves the problems of low detection precision and false report/missing report of the panel defect detection method in the prior art by providing the AOI-oriented welding spot defect rapid adaptation detection method, the AOI-oriented welding spot defect rapid adaptation detection device, the AOI-oriented welding spot defect rapid adaptation detection system and the storage medium. In a first aspect, an embodiment of the present application provides an AOI-oriented solder joint defect fast adaptation detection method, including the following steps: Firstly, ob