Visual automatic detection method for welding defects of circuit board
By constructing a large defect detection model and using labeled sample training and actual location comparison, the problem of high false positive rate in automatic circuit board welding inspection is solved, improving the accuracy and reliability of inspection, and making it suitable for high-precision electronic manufacturing.
Patent Information
- Application Number
- CN202511278019.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-09-09
- Publication Date
- 2025-12-16
AI Technical Summary
Existing automated optical inspection systems for circuit board soldering are sensitive to factors such as changes in ambient light, differences in component character printing, and image noise, resulting in a high misjudgment rate and affecting inspection accuracy and production efficiency.
A large-scale defect detection model is constructed, trained with a large number of labeled samples, and outputs the actual similarity and location information of the labels. This information is then compared with a preset threshold and combined with the actual location overlap analysis of the components to achieve accurate judgment of welding defects and missing components.
It significantly reduces sensitivity to changes in lighting and printing, improves the reliability and accuracy of inspection, and is suitable for high-precision electronic manufacturing applications.
Smart Images

Figure CN121147149A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of circuit board welding automatic detection, and particularly relates to a visual automatic detection method for circuit board welding defects. BACKGROUND
[0002] In the prior art, a visual-based automatic optical inspection (AOI) system has been widely applied to the detection of circuit board welding quality. The traditional method usually relies on a preset image template or rules for feature matching and defect recognition, and has problems of being sensitive to environmental light changes, component character printing differences, image noise and other factors, resulting in a high misjudgment rate. Especially in the aspect of character recognition, due to different printing depths, blurring or pollution interference, uneven light, environmental light changes and other factors, qualified components are often misjudged as defects, which seriously affects the detection accuracy and production efficiency. Therefore, it is necessary to provide a visual automatic detection method for circuit board welding defects to overcome the above defects. SUMMARY
[0003] The purpose of the present application is to provide a visual automatic detection method for circuit board welding defects, which aims to solve the problems of high misjudgment rate and poor adaptability of existing automatic optical inspection results, and improve the reliability and accuracy of detection, so as to be applicable to the field of high-precision electronic manufacturing.
[0004] In order to achieve the above purpose, the present application provides a visual automatic detection method for circuit board welding defects, comprising: a plurality of circuit board pictures labeled with various defect characteristics are input into a defect detection large model for training, and a trained defect detection large model is obtained; a circuit board picture taken by a camera device is obtained, and input into the defect detection large model for automatic recognition, and an identification result labeled on the circuit board picture is output; wherein the identification result includes a plurality of labels and their corresponding actual similarity values and position information, and the plurality of labels include preset electronic components and welding defects; each label obtained by recognition is compared in sequence in a preset label list, and if the actual similarity value of any electronic component label is less than the corresponding threshold value in the label list, or the actual similarity value of any welding defect label is greater than the corresponding threshold value in the label list, then the detection of the to-be-detected circuit board is reported as an error; the actual positions of each electronic component on the to-be-detected circuit board are obtained, and the position information in the identification result is compared with the corresponding actual positions, and if the position comparison result of each electronic component within a predetermined error range is coincident, it indicates that the welding of each electronic component on the to-be-detected circuit board is qualified.
[0005] In a preferred embodiment, the node tree is preset based on the label type; when the label is compared with the label list, all labels are cyclically scanned in sequence according to the node order of the node tree.
[0006] In a preferred embodiment, the welding defects include preset standard defect types and non-standard defect types; a mark string is attached to the front or rear end of the label string of all the non-standard defect types; when the label is compared with the label list, if any label with the mark string is successfully compared, an error is reported for the detection of the to-be-tested circuit board.
[0007] In a preferred embodiment, the actual positions of the electronic components on the to-be-tested circuit board are obtained by: At least three reference position points set by the operator on the qualified circuit board picture and the labeled boxes of the electronic components are obtained, and then the relative positions of the labeled boxes are automatically calculated based on the reference position points.
[0008] The visual automatic detection method for welding defects of a circuit board provided by the application constructs a defect detection large model, trains a large number of labeled samples, and improves the generalization recognition ability for various defect features; in the recognition process, the actual similarity and position information of each label are output and compared with a preset threshold, so as to accurately judge the welding defects and the missing components; at the same time, the coincidence degree of the actual position of the component and the recognized position is analyzed, so as to further ensure the accuracy of the welding position. The method significantly reduces the sensitivity to light and printing changes, improves the reliability and accuracy of the detection, and is suitable for the electronic manufacturing field with high precision requirements. BRIEF DESCRIPTION OF DRAWINGS
[0009] In order to more clearly illustrate the technical solutions of the embodiments of the application, the following will briefly introduce the drawings needed to be used in the embodiments. It should be understood that the following drawings only show some embodiments of the application, and therefore should not be regarded as a limitation on the scope. For those skilled in the art, other related drawings can also be obtained without creative labor on the basis of these drawings.
[0010] Figure 1 The flowchart of the visual automatic detection method for welding defects of a circuit board provided by the application.
[0011] Figure 2 The recognition result schematic diagram output by the exemplary large model; Figure 3 The recognition result schematic diagram of characters by the exemplary large model; Figure 4 The exemplary preset label list schematic diagram; Figure 5An exemplary detection error result schematic diagram is shown in the figure; Figure 6 An exemplary detection qualified result schematic diagram is shown in the figure; Figure 7 An exemplary calibration position schematic diagram is shown in the figure. DETAILED DESCRIPTION
[0012] In order to make the purposes, technical solutions and beneficial technical effects of the present application clearer and more understandable, the present application will be further described in detail below in combination with the drawings and specific embodiments. It should be understood that the specific embodiments described in the present specification are only for the purpose of explaining the present application and are not intended to limit the present application.
[0013] It should also be understood that the terms used in the present application specification herein are only for the purpose of describing specific embodiments and are not intended to limit the present application. As used in the present application specification and the appended claims, the singular forms "a", "an" and "the" are intended to include the plural forms unless the context clearly indicates otherwise.
[0014] It should also be further understood that the term "and / or" used in the present application specification and the appended claims means any combination of one or more of the associated listed items and all possible combinations, and includes these combinations.
[0015] In an embodiment of the present application, a visual automatic detection method for circuit board welding defects is provided, which is used to double-verify the detection results after deep learning large model identification, so as to improve the reliability and accuracy of detection. For example, an exemplary fan-shaped circuit board is shown in the figure to detect whether various electronic components such as resistors, processors and wires are welded in place, whether the welding positions of various electronic components are correct, and whether there are poor defects such as virtual welding, false welding, tin slag and tin beads.
[0016] As shown in the figure, the visual automatic detection method for circuit board welding defects includes steps S10-S40. Figure 1
[0017] Step S10: input multiple circuit board pictures labeled with various poor defect features into a defect detection large model for training to obtain a trained defect detection large model.
[0018] Specifically, an industrial camera (such as a Daheng camera) can be controlled to capture more than 100 circuit board pictures, and the poor defect features such as virtual welding, false welding, tin slag and tin beads on the above pictures are labeled through deep learning software (such as Hitop software) to train a defect detection large model. The Hitop software compares the images on the products to be tested through the trained large model to identify poor defects.
[0019] Step S20: Obtain the circuit board picture taken by the camera of the camera device, and input it into the defect detection large model for automatic recognition, and output the recognition result labeled on the circuit board picture. The recognition result includes multiple labels and their corresponding actual similarity values and position information, and the multiple labels include preset electronic components and welding defects.
[0020] Specifically, the circuit board to be tested can be placed under the camera of the detection equipment, as shown in Figure 2 The defect detection large model will automatically detect the positions of each electronic component, wire welding point, and defective defect (annotated and displayed by a detection box) and the corresponding similarity value (i.e. the predicted accuracy probability of the large model for the result) in the photographed picture. For example, when the electronic component has characters (such as resistor label R200), the defect detection large model will also recognize the characters and give the corresponding predicted accuracy probability (i.e. the similarity value), as shown in Figure 3 For defects, the large model will also give the defect type and its corresponding similarity value. It should be noted that the construction, training, image recognition, and similarity value (each output result has a prediction probability in the large model) of the large model can refer to the existing technology for implementation principle and specific implementation manner, which will not be described here.
[0021] In addition, in order to facilitate the cyclic scanning of the recognition result, as shown in Figure 4 The electronic components, wires, and main defect types to be detected can be set in advance and manually assigned a label. For example, the main defects such as virtual welding, false welding, tin slag, and tin beads can be set with corresponding labels; and for small defects that do not need to be detected, the corresponding label can not be set, so as to skip this part of the result. Further, the welding defects include preset standard defect types (such as virtual welding, false welding, tin slag, and tin beads) and non-standard defect types (such as infrequent center line defect and character welding). The label string of all non-standard defect types is attached with a mark string at the front or rear end, for example, an "NG" is added at the end of these labels. It can be understood that the label can be added, deleted, and modified at any time according to different detection requirements.
[0022] Step S30: Compare each label recognized with the preset label list in turn, if the actual similarity value of any electronic component label is less than the corresponding threshold value in the label list (which indicates that there may be a welding error of the electronic component), or the actual similarity value of any welding defect label is greater than the corresponding threshold value in the label list (which indicates that there is a welding defect), then the detection of the circuit board to be tested is reported as an error; when comparing the label with the label list, if any label with the mark string is matched successfully, then the detection of the circuit board to be tested is reported as an error (as shown in Figure 5 ).
[0023] Further, as shown in Figure 3 The node tree can be preset based on the label type; when comparing the label with the label list, all labels are scanned in turn according to the node order of the node tree.
[0024] Step S40: Obtain the actual positions of each electronic component on the to-be-tested circuit board, and compare the position information in the recognition result with the corresponding actual positions. If the comparison result of the positions of each electronic component within a predetermined error range is coincident, it indicates that the welding of each electronic component on the to-be-tested circuit board is qualified, as shown in Figure 6 .
[0025] As shown in Figure 7 , obtaining the actual positions of each electronic component on the to-be-tested circuit board includes: obtaining at least three reference position points set by an operator on a qualified circuit board picture and the bounding boxes of each electronic component, and then automatically calculating the relative positions of each bounding box based on the reference position points. This calculation method can refer to the prior art, and will not be repeated here.
[0026] To sum up, the visual automatic detection method for circuit board welding defects provided by the present application constructs a defect detection large model, trains a large number of labeled samples, and improves the generalization recognition ability of various defect features. In the recognition process, the actual similarity and position information of each label are output and compared with the preset threshold, so as to realize accurate judgment of welding defects and missing components. At the same time, the coincidence degree of the actual position of the component and the recognition position is analyzed to further ensure the accuracy of the welding position. This method significantly reduces the sensitivity to light and printing changes, improves the reliability and accuracy of detection, and is suitable for the field of electronic manufacturing with high precision requirements.
[0027] The present application is not limited to the description and embodiments described in the specification, and therefore persons skilled in the art can easily realize other advantages and modifications, and therefore the present application is not limited to specific details, representative devices and examples of drawings shown and described herein. The spirit and scope of the general concept defined by the claims and their equivalents are not deviated.
Claims
1. A visual automatic detection method for soldering defects on circuit boards, characterized in that, include: Multiple circuit board images labeled with various defect features are input into the large defect detection model for training, resulting in a trained large defect detection model. The system acquires images of the circuit board under test taken by a camera device and inputs them into the large defect detection model for automatic identification, outputting identification results marked on the circuit board images. The identification results include multiple tags and their corresponding actual similarity values and location information. The multiple tags include preset electronic components and soldering defects. Each identified tag is sequentially compared in a preset tag list. If the actual similarity value of any electronic component tag is less than the corresponding threshold in the tag list, or the actual similarity value of any welding defect tag is greater than the corresponding threshold in the tag list, then an error is reported for the detection of the circuit board under test. The actual positions of each electronic component on the circuit board under test are obtained. The position information in the identification result is compared with the corresponding actual positions. If the calculated position comparison results of each electronic component are consistent within a predetermined error range, it indicates that the soldering of each electronic component on the circuit board under test is qualified.
2. The visual automatic detection method for circuit board soldering defects as described in claim 1, characterized in that, A node tree is pre-defined based on the tag type; when comparing a tag with the tag list, all tags are scanned sequentially according to the node order of the node tree.
3. The visual automatic detection method for circuit board welding defects as described in claim 1, characterized in that, The welding defects include preset standard defect types and non-standard defect types; all non-standard defect types have a tag string at the beginning or end; when comparing the tags with the tag list, if any tag with the tag string is successfully matched, an error is reported for the circuit board under test.
4. The visual automatic detection method for circuit board soldering defects as described in claim 1, characterized in that, Obtaining the actual location of each electronic component on the circuit board under test includes: The system acquires at least three reference points set by the operator on a qualified circuit board image, as well as the label boxes for each electronic component. Then, it automatically calculates the relative positions of each label box based on the reference points.