Circuit board visual quality inspection system and method based on AOI
Through the AOI-based circuit board visual quality inspection system, the improved deep residual network and twin network are used for feature extraction and defect identification, which solves the problem of high error judgment rate of AOI equipment, realizes efficient and accurate quality inspection of circuit board detection, and reduces the cost of manual re-inspection.
Patent Information
- Application Number
- CN202510650047.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-20
- Publication Date
- 2025-07-25
AI Technical Summary
The existing AOI equipment has a high misjudgment rate in circuit board detection, resulting in a large number of manual re-inspections, affecting manufacturing efficiency and cost.
AOI-based circuit board visual quality inspection system is adopted, including feature extraction module and feature comparison module, and feature extraction and defect recognition are used to use the improved deep residual network ResNet-50 and twin network for feature extraction and defect recognition, combined with dynamic threshold adjustment and image enhancement technology, to achieve accurate identification of circuit board defects.
It improves the accuracy and efficiency of circuit board inspection, reduces manual re-inspection, reduces quality inspection costs, and is easy to operate and has a wide range of applications.
Smart Images

Figure CN120369744A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of circuit board quality inspection, and particularly to a circuit board visual quality inspection system and method based on AOI. Background Art
[0002] In the field of electronics manufacturing, an automatic optical inspection (AOI) system has become the core equipment for circuit board quality control. During the manufacturing process of a printed circuit board (PCB), AOI equipment is widely used for automatically detecting welding defects (such as poor soldering, short circuit, offset, etc.); for the results of the circuit boards detected by the AOI equipment, due to factors such as lighting conditions, component reflection, and limitations of the AOI algorithm, the AOI equipment may misjudge qualified samples as defective, and a large amount of manual work is required for subsequent re-inspection. Currently, the detection pass rate of AOI equipment is low, and a large number of circuit boards need to be manually re-inspected. Only a very small number of the total number of circuit boards are truly defective, resulting in unnecessary re-inspection costs, which greatly affects the efficiency of circuit board manufacturing.
[0003] Therefore, it is necessary to provide a circuit board visual quality inspection system and method based on AOI. Summary of the Invention
[0004] The present invention provides a circuit board visual quality inspection system and method based on AOI, which can achieve precise identification of circuit board defects, improve the detection pass rate of AOI equipment, and effectively reduce the cost of manual re-inspection.
[0005] The present invention provides a circuit board visual quality inspection system based on AOI, including:
[0006] A feature extraction module, configured to respectively extract features from a set circuit board component reference diagram and an input diagram of a circuit board component to be detected based on a feature extraction model, to obtain first feature data corresponding to the circuit board component reference diagram and second feature data corresponding to the input diagram of the circuit board component to be detected;
[0007] A feature comparison module, configured to identify the defect category of the first feature data and the second feature data based on a defect recognition model, to obtain a defect category recognition result.
[0008] Further, the first feature data is reference data, and the second feature data is the data to be detected of the circuit board component to be detected.
[0009] Further, multiple circuit board component reference diagrams are set.
[0010] Further, the defect categories include qualified, missing component, wrong direction, wrong component, false soldering, and poor soldering.
[0011] Further, the feature extraction module includes a region positioning unit and a feature extraction implementation unit;
[0012] A region positioning unit, which is used to perform region positioning on the reference diagram of circuit board components and the input diagram of circuit board components to be detected respectively based on positioning information, and obtain the regions to be detected of the reference diagram of circuit board components and the input diagram of circuit board components to be detected;
[0013] A feature extraction implementation unit, which is used to perform feature extraction in the region to be detected based on a feature extraction model.
[0014] Further, performing feature extraction in the region to be detected based on a feature extraction model includes:
[0015] Improving the Deep Residual Network ResNet-50 model;
[0016] Using the improved Deep Residual Network ResNet-50 model to generate a feature extraction model;
[0017] Using the feature extraction model to perform feature extraction in the region to be detected.
[0018] Further, based on a defect recognition model, performing defect category recognition on the first feature data and the second feature data to obtain a defect category recognition result, including:
[0019] Constructing a defect recognition model based on a Siamese network for metric learning;
[0020] Based on the defect recognition model, performing defect category recognition on the first feature data and the second feature data, calculating the similarity of defect categories, and obtaining a defect category similarity value;
[0021] Based on the defect category similarity value, comparing it with a set defect category similarity threshold to obtain a defect category recognition result.
[0022] Further, based on the defect category similarity value, comparing it with a set defect category similarity threshold to obtain a defect category recognition result, including:
[0023] Comparing the defect category similarity value with a set defect category similarity threshold. If the defect category similarity value is greater than the set defect category similarity threshold, then determine the defect category recognition result of the circuit board components to be detected; wherein, the defect category similarity threshold is set as a dynamic threshold; the dynamic threshold is set according to the set initial threshold, upper limit of adjustment range, and lower limit of adjustment range;
[0024] The initial threshold is set based on the historical defect category similarity threshold;
[0025] The upper limit of the adjustment range is set based on the false detection rate of the defect category. After detecting a set number of circuit board components to be detected, if the false detection rate of the defect category is greater than a set first percentage, then increase the upper limit of the adjustment range by a set ratio;
[0026] The lower limit of the adjustment range is set based on the undetected rate of the defect category. After detecting a set number of circuit board components to be detected, if the undetected rate of the defect category is greater than the set second percentage, the lower limit of the adjustment range is reduced by the set proportion; the dynamic threshold is adjusted according to the following formula:
[0027]
[0028] In the above formula, T d represents the dynamic threshold, T0 represents the initial threshold set based on the historical defect category similarity threshold; Δ h represents the upper limit of the adjustment range, Δ l represents the lower limit of the adjustment range, FPR represents the false positive rate based on the defect category, FPR α represents the target false positive rate, FPR β represents the maximum allowable false positive rate; FNR represents the undetected rate based on the defect category, FNR α represents the target undetected rate, FNR β represents the maximum allowable undetected rate.
[0029] Furthermore, the circuit board component reference diagram is marked with defect category information and is processed by image enhancement and augmentation based on the circuit board component reference diagram to be processed;
[0030] The defect category information includes the defect category, the severity of the defect category, and the precise contour of the defect category;
[0031] The image enhancement and augmentation based on the circuit board component reference diagram to be processed is specifically as follows:
[0032] Use ray tracing technology to simulate and set a variety of different lighting conditions, and use the finite element analysis method under the lighting conditions to analyze and generate defect deformation images under different stress states for the circuit board component reference diagram to be processed;
[0033] For the defect deformation images, use the CycleGAN network to generate defect samples across process parameters, and use the StyleGAN2 image generator to generate a progressive defect evolution sequence to achieve secondary enhancement processing of the defect deformation images;
[0034] For the defect deformation images after secondary enhancement processing, use a variety of transformation processes to obtain the circuit board component reference diagram.
[0035] The circuit board vision quality inspection method based on AOI applies the circuit board vision quality inspection system based on AOI to inspect the circuit board.
[0036] Compared with the prior art, the present invention has the following advantages and beneficial effects: it improves the accuracy and efficiency of circuit board quality inspection, reduces the dependence on manual quality inspection, and lowers the quality inspection cost; by performing feature extraction and feature comparison on the circuit board component reference diagram and the input diagram of the circuit board components to be detected, it can accurately identify the defect categories on the circuit board, including qualified, missing parts, wrong direction, wrong parts, false soldering, and virtual soldering, etc.; at the same time, by adopting dynamic threshold setting, it can automatically adjust the threshold according to the detection situation, further improving the accuracy and stability of detection; in addition, the system and method also have the advantages of simple operation and wide application range, and can be widely applied to quality control and detection in the circuit board production process.
[0037] Other features and advantages of the present invention will be described in the following specification, and part of them will become obvious from the specification or be understood by implementing the present invention. The objectives and other advantages of the present invention can be achieved and obtained through the structures specifically pointed out in the written specification and the drawings.
[0038] The technical solution of the present invention will be further described in detail below through the drawings and embodiments. Description of the Drawings
[0039] The drawings are used to provide a further understanding of the present invention, and constitute a part of the specification. They are used together with the embodiments of the present invention to explain the present invention, and do not constitute a limitation to the present invention. In the drawings:
[0040] Figure 1 It is a schematic diagram of the module structure of the circuit board vision quality inspection system based on AOI;
[0041] Figure 2 It is a schematic diagram of the module structure of the feature extraction module;
[0042] Figure 3 It is a schematic diagram of the steps for identifying the defect category by identifying the first feature data and the second feature data to obtain the defect category identification result. Detailed Embodiments
[0043] The following describes the preferred embodiments of the present invention with reference to the drawings. It should be understood that the preferred embodiments described herein are only used to illustrate and explain the present invention, and are not used to limit the present invention.
[0044] The present invention provides a circuit board vision quality inspection system based on AOI, as Figure 1 shown, including:
[0045] A feature extraction module, which is used to perform feature extraction on the set circuit board component reference diagram and the input diagram of the circuit board components to be detected respectively based on the feature extraction model, to obtain the first feature data corresponding to the circuit board component reference diagram and the second feature data corresponding to the input diagram of the circuit board components to be detected;
[0046] A feature comparison module, configured to perform defect category recognition on first feature data and second feature data based on a defect recognition model, and obtain a defect category recognition result.
[0047] The working principle of this technical solution is as follows: To implement a circuit board vision quality inspection system based on AOI, the present invention first uses a feature extraction model to perform detailed feature extraction on a circuit board component reference diagram and an input diagram of a circuit board component to be detected. Through this step, we can obtain two sets of feature data: one set is the first feature data corresponding to the circuit board component reference diagram, and the other set is the second feature data corresponding to the input diagram of the circuit board component to be detected. Then, the feature comparison module will use the defect recognition model to deeply compare and analyze these two sets of feature data. The defect recognition model can accurately identify the differences between the two sets of data and determine the specific categories of the defects of the circuit board components to be detected based on these differences. The core of this process lies in the accuracy and robustness of the model, which determine the overall performance and reliability of the quality inspection system.
[0048] The beneficial effects of the above technical solution are as follows: By adopting the solution provided in this embodiment, the efficiency and accuracy of circuit board quality inspection can be greatly improved, making the quality inspection results more objective and reliable.
[0049] In one embodiment, the first feature data is reference data, and the second feature data is the data to be detected of the circuit board component to be detected.
[0050] The working principle of this technical solution is as follows: The first feature data serves as reference data, which provides a benchmark for comparative analysis with the data to be detected, that is, the second feature data. By using the first feature data as reference data, the system can more accurately identify the differences between the circuit board component to be detected and the standard component, thereby determining whether the component has defects; the second feature data is the data to be detected of the circuit board component to be detected.
[0051] The beneficial effects of the above technical solution are as follows: By adopting the solution provided in this embodiment, by distinguishing between reference data and data to be detected, the reference data, as a known standard, provides a clear comparison benchmark for the system, while the data to be detected represents the actual state of the circuit board component to be detected.
[0052] In one embodiment, multiple circuit board component reference diagrams are set.
[0053] The working principle of this technical solution is as follows: By setting multiple reference diagrams of circuit board components, the comparison sample library of the system can be enriched, and the recognition ability and adaptability of the system can be improved; There are a wide variety of types and models of circuit board components, and different components have different characteristics. By setting multiple reference diagrams of circuit board components, the system can store and recognize more component characteristics, so that when facing different types of circuit board components, it can match and compare more accurately, improving the accuracy and efficiency of quality inspection.
[0054] The beneficial effects of the above technical solution are: By adopting the solution provided in this embodiment, multiple reference diagrams of circuit board components can also provide more comprehensive comparison information for the system, helping the system to more accurately judge whether there are defects or abnormalities in the components.
[0055] In one embodiment, the defect categories include qualified, missing parts, wrong direction, wrong parts, false soldering, and loose soldering.
[0056] The working principle of this technical solution is as follows: By clarifying the defect categories, various common problems in circuit board quality inspection can be characterized; For example, qualified means that the circuit board components fully meet the production standards and do not require any correction; Missing parts indicates that necessary components are missing on the circuit board; Wrong direction means that the installation direction of some components does not conform to the regulations; Wrong parts means that the components on the circuit board do not conform to the design specifications; False soldering refers to poor soldering connection between the component and the circuit board, seemingly soldered but actually not forming an effective electrical connection; Loose soldering means that the soldering connection exists but is unstable.
[0057] The beneficial effects of the above technical solution are: By adopting the solution provided in this embodiment, by clarifying the defect categories, it is convenient for the system to accurately identify these defect categories.
[0058] In one embodiment, as Figure 2 shown, the feature extraction module includes a region positioning unit and a feature extraction implementation unit;
[0059] The region positioning unit is used to perform region positioning on the reference diagram of the circuit board component and the input diagram of the circuit board component to be detected respectively based on the positioning information, and obtain the regions to be detected of the reference diagram of the circuit board component and the input diagram of the circuit board component to be detected;
[0060] The feature extraction implementation unit is used to perform feature extraction in the region to be detected based on the feature extraction model.
[0061] The working principle of this technical solution is as follows: First, the region positioning unit receives the reference diagram of circuit board components and the input diagram of circuit board components to be detected, and uses the pre-set positioning information to accurately locate the component regions to be detected in the two images. This process ensures the accuracy and pertinence of subsequent feature extraction; Next, the feature extraction implementation unit performs feature extraction on the circuit board components in the region to be detected based on the trained feature extraction model. The feature extraction model can learn the complex features of circuit board components, improving the recognition accuracy of the system.
[0062] The beneficial effects of the above technical solution are: By adopting the solution provided in this embodiment, through the close cooperation of the region positioning unit and the feature extraction implementation unit, the efficient and accurate detection of circuit board components is realized.
[0063] In one embodiment, based on the feature extraction model, feature extraction is implemented in the region to be detected, including:
[0064] Improve the Deep Residual Network ResNet-50 model. Specifically: Replace the original input layer with a single-channel convolutional kernel adapted to 256×256 grayscale images; Add a channel attention module after the third residual block; Use the Triplet Loss loss function. When training, the input samples are anchor points, positive samples, and negative samples, and the ratio of anchor points, positive samples, and negative samples is 1:1:2;
[0065] Use the improved Deep Residual Network ResNet-50 model to generate a feature extraction model;
[0066] Use the feature extraction model to implement feature extraction in the region to be detected.
[0067] The working principle of this technical solution is as follows: The improved Deep Residual Network ResNet-50 model can better meet the requirements of feature extraction for circuit board components. First, the original input layer is replaced with a single-channel convolutional kernel adapted to 256×256 grayscale images. This modification enables the model to directly process grayscale images, reducing the computational load and improving the processing speed. Second, a channel attention module is added after the third residual block. This module can focus on the key feature channels of circuit board components, enhancing the model's sensitivity to important features and further improving the accuracy of feature extraction. Finally, the Triplet Loss function is used for training. By comparing the distance relationships between the anchor, positive samples, and negative samples, the model can better learn the similarities and differences between circuit board components. During the training process, the input samples include the anchor, positive samples, and negative samples, and their ratio is 1:1:2. This ratio setting helps the model learn a more robust feature representation and improve the model's recognition ability in complex environments. Through training, the improved Deep Residual Network ResNet-50 model can generate an efficient and accurate feature extraction model. Using this feature extraction model, when implementing feature extraction in the area to be detected, it can quickly extract the key features of circuit board components, providing strong support for subsequent classification and recognition.
[0068] The beneficial effects of the above technical solution are as follows: By adopting the solution provided in this embodiment, the efficiency and accuracy of circuit board visual quality inspection can be significantly improved. By improving the Deep Residual Network ResNet-50 model to make it more suitable for feature extraction of circuit board components, not only the computational load is reduced and the processing speed is increased, but also the sensitivity of the model to key features is enhanced by adding a channel attention module, thereby improving the accuracy of feature extraction. In addition, using the Triplet Loss function for training enables the model to better learn the similarities and differences between circuit board components, further improving the model's recognition ability.
[0069] In one embodiment, as Figure 3 shown, based on the defect recognition model, defect category recognition is performed on the first feature data and the second feature data to obtain a defect category recognition result, including:
[0070] Construct a defect recognition model based on a siamese network for metric learning;
[0071] Based on the defect recognition model, defect category recognition is performed on the first feature data and the second feature data, and the defect category similarity is calculated to obtain a defect category similarity value;
[0072] Based on the defect category similarity value, compare it with a set defect category similarity threshold to obtain a defect category recognition result.
[0073] The working principle of this technical solution is as follows: The Siamese network based on metric learning can learn the similarity and difference between feature data through metric learning, so as to effectively identify the defect categories of the input first feature data and second feature data. During the identification process, the model will calculate the similarity between the second feature data and the first feature data of each known defect category to obtain the defect category similarity value. Finally, the system compares the calculated defect category similarity value with the preset defect category similarity threshold. If the similarity value exceeds the threshold, it is determined that the circuit board to be detected has the same defect as the defect category represented by the corresponding first feature data, so as to obtain the defect category identification result. This process realizes the automatic, fast and accurate identification of circuit board component defects, greatly improving the efficiency and accuracy of quality inspection.
[0074] The beneficial effects of the above technical solution are as follows: By adopting the solution provided in this embodiment, the intelligent detection of circuit board component defects can be realized, avoiding the subjectivity and inefficiency of traditional manual quality inspection; Through the metric learning of the Siamese network, the system can automatically distinguish different defect categories, reducing the cumbersome and error of manual classification.
[0075] In one embodiment, based on the defect category similarity value, comparing with the set defect category similarity threshold to obtain the defect category identification result, including:
[0076] Compare the defect category similarity value with the set defect category similarity threshold. If the defect category similarity value is greater than the set defect category similarity threshold, determine the defect category identification result of the circuit board component to be detected; Among them, the defect category similarity threshold is set as a dynamic threshold; The dynamic threshold is set according to the set initial threshold, upper adjustment limit and lower adjustment limit;
[0077] The initial threshold is set based on the historical defect category similarity threshold;
[0078] The upper adjustment limit is set based on the false detection rate of the defect category. After detecting a set number of circuit board components to be detected, if the false detection rate of the defect category is greater than the set first percentage, increase the upper adjustment limit by the set ratio;
[0079] The lower adjustment limit is set based on the missed detection rate of the defect category. After detecting a set number of circuit board components to be detected, if the missed detection rate of the defect category is greater than the set second percentage, reduce the lower adjustment limit by the set ratio; The dynamic threshold is adjusted according to the following formula:
[0080]
[0081] In the above formula, T drepresents the dynamic threshold, T0 represents the initial threshold set based on the historical defect category similarity threshold; Δ h represents the upper limit of the adjustment range, Δ l represents the lower limit of the adjustment range, FPR represents the false positive rate based on the defect category, FPR α represents the target false positive rate, FPR β represents the maximum allowable false positive rate; FNR represents the false negative rate based on the defect category, FNR α represents the target false negative rate, FNR β represents the maximum allowable false negative rate;
[0082] To improve the reliability and accuracy of the detection results, a composite similarity method is used for feature comparison. Specifically:
[0083] For the first feature data and the second feature data, first perform normalization processing to obtain the normalized first feature data and the second feature data;
[0084] For the normalized first feature data and the second feature data, first calculate the cosine similarity to obtain the similarity of the vector directions of the feature data, and obtain the first similarity; then perform Euclidean distance transformation, calculate the Euclidean distance and then transform it through mapping to obtain the second similarity; finally, through the set weight parameter, fuse the first similarity and the second similarity to obtain the composite similarity; the composite similarity formula is:
[0085]
[0086] where S represents the composite similarity, V1 represents the normalized first feature data, V2 represents the normalized second feature data, α represents the weight parameter, CosineSim(V1, V2) represents the first similarity, Deuclidean(V1, V2) represents the second similarity, n represents n pixel points on the length of the image of the feature data, and m represents m pixel points on the width of the image of the feature data.
[0087] The working principle of this technical solution is as follows: By collecting the image data of the circuit board components to be detected, extracting their characteristic data, and comparing it with the preset standard characteristic data. During the comparison process, first, the defect category similarity value is calculated, which reflects the similarity between the defects of the circuit board components to be detected and the known defect categories; subsequently, the system compares the defect category similarity value with the dynamically set defect category similarity threshold. Here, the dynamic threshold is comprehensively adjusted based on historical data, false detection rate, and missed detection rate, aiming to flexibly adjust the threshold according to the detection requirements in different situations to improve the accuracy and reliability of detection; if the defect category similarity value is greater than the dynamic threshold, the system determines that the circuit board components to be detected have defects similar to a certain defect category and outputs the corresponding defect category recognition result, which helps subsequent quality control and maintenance processing; during the feature comparison process, the system adopts a composite similarity method, combining cosine similarity and Euclidean distance transformation, comprehensively considering the vector direction similarity and distance similarity of the characteristic data. Through the set weight parameters, the system can reasonably allocate weights according to the importance of different features, thereby calculating the composite similarity more accurately. This method improves the accuracy and robustness of feature comparison and further enhances the reliability of the detection results.
[0088] The beneficial effects of the above technical solution are as follows: By adopting the solution provided in this embodiment and using technical means such as dynamically adjusting the threshold and adopting a composite similarity method for feature comparison, accurate detection and identification of circuit board component defects are achieved, providing strong support for quality control in the circuit board production process.
[0089] In one embodiment, the circuit board component reference diagram is marked with defect category information and undergoes image enhancement and augmentation processing based on the circuit board component reference diagram to be processed;
[0090] The defect category information includes the defect category, the severity of the defect category, and the precise contour of the defect category;
[0091] The image enhancement and augmentation processing based on the circuit board component reference diagram to be processed is specifically as follows: Use ray tracing technology to simulate and set a variety of different lighting conditions, and under the lighting conditions, use the finite element analysis method to analyze and generate defect deformation images under different stress states for the circuit board component reference diagram to be processed; The specific steps of the finite element analysis method are as follows: First, establish a three-dimensional finite element model for the circuit board component reference diagram through tools such as ANSYS or COMSOL, and define material properties (such as the elastic modulus of solder, the thermal conductivity of the PCB board); Then, apply a variety of stress conditions (such as thermal stress, mechanical vibration, humidity expansion) to generate corresponding deformation field distribution data; Finally, map the deformation field distribution data to the image space, and convert the deformation amount in the deformation field distribution data into pixel displacement through the OpenCV library to generate defect deformation images (such as crack propagation of virtual solder joints, collapse of solder balls).
[0092] For the defective deformation images, the CycleGAN network is used in a loop to generate defective samples across process parameters. Specifically: First, data preparation is carried out. Prepare defective images under normal process parameters (such as welding at standard temperature) as input domain A, and prepare defective images across process parameters (such as solder joint voids caused by high-temperature welding) as input domain B. Then, use the generator and discriminator of CycleGAN to learn the mapping from input domain A to input domain B through adversarial loss and cycle consistency loss, and complete the network training of the CycleGAN generator. Finally, input the images in input domain A into the CycleGAN generator to generate defective samples across process parameters (such as solder joint void images of high-temperature welding), and use the defective samples across process parameters to expand the training set;
[0093] And use the image generator StyleGAN2 to generate a progressive defective evolution sequence to achieve secondary enhancement processing of the defective deformation images. Specifically: In the latent space of StyleGAN2, perform linear interpolation on the latent vectors of normal solder joints and defective solder joints to generate an evolution sequence from normal to defective;
[0094] For the defective deformation images after secondary enhancement processing, obtain the reference diagram of circuit board components by using a variety of transformation processes; the transformation processes include but are not limited to randomly combined rotation, scaling, and adding Gaussian noise.
[0095] The working principle of this technical solution is as follows: First, use the circuit board component reference diagram marked with defect category information as the training basis. This defect category information comprehensively includes the specific types of defects, the severity, and the precise defect contours, providing rich data support for the system's learning and recognition. When processing the image of the circuit board component to be detected, the system will first perform image enhancement and augmentation processing to improve the detection accuracy and robustness. In this process, the application of ray tracing technology is a key link. It can simulate a variety of different lighting conditions, thereby analyzing the circuit board component image under different lighting environments and generating defect deformation images under different stress states. This step greatly enriches the diversity of the images, enabling the system to effectively identify defects in various complex environments. Then, the system uses the CycleGAN network for cyclic generation to generate defect samples across process parameters. This technology can cross different production process parameters and generate samples with similar defect characteristics, thereby further enhancing the generalization ability of the system. At the same time, the system also uses the StyleGAN2 image generator to generate a progressive defect evolution sequence for secondary enhancement processing of the defect deformation images. This process not only improves the quality of the images but also enables the system to more accurately capture and analyze the evolution process of defects. Finally, the system performs various transformation processes on the defect deformation images after secondary enhancement processing, such as randomly combined rotation, scaling, and adding Gaussian noise, etc., to obtain a more abundant circuit board component reference diagram. These transformation processes not only increase the diversity of the images but also improve the system's adaptability to image changes, enabling the system to accurately identify the defects of circuit board components in various complex scenarios.
[0096] The beneficial effects of the above technical solution are as follows: By adopting the solution provided in this embodiment, the accuracy and efficiency of circuit board visual quality inspection can be significantly improved. With the defect category information with detailed annotations as the training basis, the system can learn rich defect characteristics, providing a solid foundation for subsequent recognition and detection. The application of image enhancement and augmentation processing and ray tracing technology further improves the system's detection ability in different lighting environments, enabling the system to handle various complex scenarios. The use of the CycleGAN network for cyclic generation and the StyleGAN2 image generator not only enhances the generalization ability of the system but also enables it to more accurately capture and analyze the evolution process of defects, providing strong support for the quality control of circuit boards. In addition, the application of various transformation processes increases the diversity of the images and improves the system's adaptability to image changes, enabling the system to maintain stable performance in various complex scenarios.
[0097] In one embodiment, for the circuit board visual quality inspection method based on AOI, a circuit board visual quality inspection system based on AOI is used to perform quality inspection on the circuit board.
[0098] The working principle of this technical solution is as follows: For the AOI-based visual quality inspection method of circuit boards, a circuit board visual quality inspection system based on AOI is applied to conduct quality inspection on circuit boards.
[0099] The beneficial effects of the above technical solution are as follows: By adopting the solution provided in this embodiment, high-precision and high-efficiency quality inspection of circuit board components can be achieved, the yield rate of circuit board production can be improved, and the quality control cost can be effectively reduced.
[0100] Obviously, those skilled in the art can make various changes and modifications to the present invention without departing from the spirit and scope of the present invention. Thus, if these modifications and variations of the present invention fall within the scope of the claims of the present invention and their equivalent technologies, the present invention is also intended to include these changes and modifications.
Claims
1. An AOI-based visual inspection system for circuit boards, characterized in that Including: A feature extraction module, configured to perform feature extraction on a set circuit board component reference diagram and an input diagram of a circuit board component to be detected respectively based on a feature extraction model, so as to obtain first feature data corresponding to the circuit board component reference diagram and second feature data corresponding to the input diagram of the circuit board component to be detected; A feature comparison module, configured to perform defect category recognition on the first feature data and the second feature data based on a defect recognition model to obtain a defect category recognition result.
2. The AOI-based circuit board vision quality inspection system according to claim 1, wherein The first feature data is reference data, and the second feature data is data to be detected of the circuit board component to be detected.
3. The AOI-based circuit board vision quality inspection system according to claim 1, wherein, Multiple circuit board component reference diagrams are set.
4. The AOI-based circuit board vision quality inspection system according to claim 1, wherein The defect categories include qualified, missing parts, wrong direction, wrong parts, false soldering, and virtual soldering.
5. The AOI-based circuit board vision quality inspection system according to claim 1, wherein The feature extraction module includes a region positioning unit and a feature extraction implementation unit; The region positioning unit is configured to perform region positioning on the circuit board component reference diagram and the input diagram of the circuit board component to be detected respectively based on positioning information to obtain the regions to be detected of the circuit board component reference diagram and the input diagram of the circuit board component to be detected; The feature extraction implementation unit is configured to perform feature extraction within the region to be detected based on the feature extraction model.
6. The AOI-based visual quality inspection system for circuit boards according to claim 5, characterized in that Performing feature extraction within the region to be detected based on the feature extraction model includes: Improving the Deep Residual Network ResNet-50 model; Using the improved Deep Residual Network ResNet-50 model to generate a feature extraction model; Using the feature extraction model to perform feature extraction within the region to be detected.
7. The AOI-based visual quality inspection system for circuit boards according to claim 1, wherein Performing defect category recognition on the first feature data and the second feature data based on the defect recognition model to obtain a defect category recognition result includes: Constructing a defect recognition model based on a Siamese network of metric learning; Based on the defect recognition model, performing defect category recognition on the first feature data and the second feature data, calculating the similarity of defect categories, and obtaining a defect category similarity value; Based on the defect category similarity value, comparing it with a set defect category similarity threshold to obtain a defect category recognition result.
8. The AOI-based circuit board vision quality inspection system according to claim 7, wherein Based on the defect category similarity value, comparing it with a set defect category similarity threshold to obtain a defect category recognition result includes: Comparing the defect category similarity value with the set defect category similarity threshold. If the defect category similarity value is greater than the set defect category similarity threshold, determining the defect category recognition result of the circuit board component to be detected; wherein, the defect category similarity threshold is set as a dynamic threshold; the dynamic threshold is set according to the set initial threshold, upper adjustment limit, and lower adjustment limit; The initial threshold is set based on the historical defect category similarity threshold; The upper adjustment limit is set based on the false detection rate of the defect category. After detecting a set number of circuit board components to be detected, if the false detection rate of the defect category is greater than a set first percentage, the upper adjustment limit is increased by a set proportion; The lower adjustment limit is set based on the missed detection rate of the defect category. After detecting a set number of circuit board components to be detected, if the missed detection rate of the defect category is greater than a set second percentage, the lower adjustment limit is decreased by a set proportion; the dynamic threshold is adjusted according to the following formula: In the above formula, T d represents the dynamic threshold, and T0 represents the initial threshold set based on the historical defect category similarity threshold; Δ h represents the upper limit of the adjustment range, and Δ l represents the lower limit of the adjustment range, FPR represents the false positive rate based on the defect category, and FPR α represents the target false positive rate, and FPR β represents the maximum allowable false positive rate; FNR represents the false negative rate based on the defect category, and FNR α represents the target false negative rate, and FNR β represents the maximum allowable false negative rate.
9. The AOI-based circuit board vision quality inspection system according to claim 1, characterized in that, The reference diagram of circuit board components is marked with defect category information and is processed by image enhancement and expansion based on the reference diagram of circuit board components to be processed; The defect category information includes the defect category, the severity of the defect category, and the precise contour of the defect category; Based on the reference diagram of circuit board components to be processed, the image enhancement and expansion processing is specifically as follows: Use ray tracing technology to simulate and set a variety of different lighting conditions, and under the lighting conditions, use the finite element analysis method to analyze and generate defect deformation images under different stress states for the reference diagram of circuit board components to be processed; For the defect deformation images, use the CycleGAN network to generate defect samples across process parameters, and use the StyleGAN2 image generator to generate a progressive defect evolution sequence to achieve secondary enhancement processing of the defect deformation images; For the defect deformation images after secondary enhancement processing, use a variety of transformation processes to obtain the reference diagram of circuit board components.
10. A circuit board visual inspection method based on AOI, characterized in that Apply the AOI-based circuit board vision quality inspection system as described in any one of claims 1-9 to inspect the circuit board.
Citation Information
Patent Citations
PCB defect detection method and device based on dual-channel feature comparison model
CN113379685A
Printed circuit board AOI intelligent detection equipment based on deep learning algorithm
CN115100098A
Defect detection method based on feature correlation and related device
CN116152166A
SMT (surface mount technology) wrong piece detection method, SMT wrong piece detection device and visual detection system
CN117809115A
License plate generation model training method and device, equipment and storage medium
CN118506130A
Cited By
AI learning system and method for reducing AVI machine false points
CN121214179A
An ai learning system and method for reducing false positives of an avi machine
CN121214179B