Image judgment method and system for printed circuit board characteristic-free defect multi-classification
By using CAM and UV image preprocessing and template matching and overlay techniques, combined with YOLOv8 network training of independent models, the problem of accurate classification of featureless defects in PCB inspection was solved, achieving stable identification of short-circuit and open-circuit defects, reducing the false negative rate and improving classification accuracy.
Patent Information
- Application Number
- CN202511689730.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-11-18
- Publication Date
- 2026-03-27
AI Technical Summary
Existing technologies are insufficient in classifying non-featured defects in PCB inspection, especially in accurately identifying short-circuit and open-circuit defects. Furthermore, traditional methods are prone to missed or false detections, particularly in cases of large areas of non-featured defects.
By employing CAM and UV image preprocessing, template matching, and weighted overlay techniques, and combining them with YOLOv8 network to train an independent defect classification model, short circuits, open circuits, or alignment anomalies are identified through multi-model fusion judgment rules. Template matching is used to quickly filter out obvious alignment errors. The overlay method is used to re-annotate and train the network to achieve accurate recall of alignment errors with high similarity.
It significantly reduced the false negative rate, improved the model's generalization ability in batch scenarios, avoided false positives or false negatives caused by traditional single threshold strategies, solved the result conflict problem in multi-model parallel inference, and improved the accuracy of defect classification.
Smart Images

Figure CN121746759A_ABST
Abstract
Description
Technical Field
[0001] This document relates to the field of PCB defect classification technology, and in particular to an image-based method and system for multi-classification of featureless defects in printed circuit boards. Background Technology
[0002] Printed circuit boards (PCBs) form the interconnecting framework of electronic devices, and their surface quality directly determines the overall performance and process yield. Due to the coupling errors of multiple processes such as photolithography, etching, and electroplating, PCB surface defects are inherent, hence the widespread deployment of online inspection systems on production lines. Currently, the mainstream solutions fall into two categories: one is based on Automated Optical Inspection (AOI) equipment, which uses grayscale templates or geometric matching algorithms to compare with standard images and quickly screen out suspected defects; the other is based on Virtual Rescan (VRS) technology, where the AOI first marks the coordinates of suspected defects, and then collects visible light, ultraviolet light, and CAM design data for each coordinate. Figure 3 The image channels are processed, and deep learning models such as convolutional neural networks are called for secondary discrimination to suppress the high false alarm rate of AOI.
[0003] In PCB inspection processes with Automated Optical Repair (AOR) equipment as the downstream link, once a defect is detected, it must be precisely archived according to its category, location, and shape so that the laser or inkjet repair head can call the corresponding process parameters. However, the existing AOI+VRS two-level architecture focuses more on the binary decision of "detection-reassessment" and lacks the ability to classify defects into fine-grained categories: although AOI can list defect labels, its coarse classification based on pixel-level differences often confuses "notches" and "pinholes" with similar shapes, or misclassifies "insufficient etching" as "copper slag" in a background of uneven copper thickness; the VRS secondary model focuses on the binary classification of "true / false defects" and no longer refines the categories, so that AOR cannot select laser power, inkjet volume, or compensate copper foil thickness according to the precise defect type. Therefore, the accuracy of defect category judgment is particularly important, as it directly affects the subsequent AOR ablation effect. When dealing with important PCB defect types such as open circuit and short circuit, the two cannot be confused and must be identified 100% correctly, otherwise there is a risk of indirect missed detection.
[0004] Furthermore, "featureless defects" also exist in PCBs, meaning that the defect area has only slight differences in grayscale and texture from the background, or is even completely submerged in the circuit texture, further exacerbating the difficulty of classification. Existing technologies often rely on single-scale convolutional features and cannot use CAM design drawings as a basis for judgment to correctly identify visible light and ultraviolet light images, resulting in frequent underclassification or misclassification of featureless defects. Summary of the Invention
[0005] This specification provides one or more embodiments of an image-based method for multi-classification of featureless defects on printed circuit boards, including: S1. Preprocess the acquired CAM and UV maps of the printed circuit board to obtain a binarized image; S2. Perform template matching on the preprocessed CAM and UV patterns of the printed circuit board to obtain the matching positions; S3. Based on the matching position, the CAM image and UV image are weighted and superimposed to generate a superimposed image containing enhanced defect features; S4. Train three independent defect classification models based on the visible light image, UV image and the superimposed image, respectively, to identify short circuit, open circuit or alignment anomaly; S5. Input the visible light image, ultraviolet light image and the superimposed image generated therefrom into the corresponding defect classification model, and output the final defect classification result or alignment anomaly prompt according to the preset fusion judgment rule.
[0006] Furthermore, the preprocessing of the acquired CAM and UV patterns of the printed circuit board includes: The CAM image is converted to grayscale and binarized using a fixed threshold method. The binarized CAM image is then subjected to morphological erosion processing. The UV image is converted to grayscale and then subjected to adaptive threshold binarization using the Otsu method to obtain a binary UV image.
[0007] Furthermore, the specific steps for template matching to obtain the matching position in the preprocessed CAM and UV patterns of the printed circuit board are as follows: The eroded CAM image is used as a template, and normalized cross-correlation matching is performed with the UV binary image to calculate the similarity score Y, as shown below: ; in, This is the CAM image after erosion. For a UV binary image, if the similarity score Y is lower than the first preset threshold, it is determined to be an alignment anomaly.
[0008] Furthermore, the step of weightedly superimposing the CAM image and UV image based on the matching position to generate a superimposed image containing enhanced defect features specifically involves: Map the matching positions onto the eroded CAM image, and then crop out the corresponding matching regions from the CAM image; The cropped CAM image and the binarized UV image are superimposed and fused with each other according to a preset transparency using the following formula to generate a superimposed image containing enhanced defect features: ; in, This is the CAM image after cropping and matching. This is a binary UV map. and These are the transparency coefficients of the CAM and UV maps, respectively. + =1; The overlapping areas, open-circuit areas, and short-circuit areas of the CAM image and the UV image have different grayscale characteristics in the overlay image.
[0009] Furthermore, the fusion determination rule is specifically as follows: The system prioritizes determining whether the output results contain residual adhesive or foreign matter defect categories based on the visible light image model and the UV image model, and if the confidence level is higher than the second preset threshold; if so, the defect category output by the model is directly used as the final result. If not, determine whether the result output by the overlay image model contains an alignment error label and whether its confidence level is higher than the third preset threshold; if so, output an alignment error message. If none of the above conditions are met, a weighted vote is performed on the confidence scores of the three models for the short-circuit and open-circuit categories, and the category with the highest weighted score is taken as the final defect classification result.
[0010] Furthermore, the weights of the weighted voting are dynamically calculated based on the highest confidence level of each model's output, assuming the highest confidence level of each model's output is... ,in The weighting coefficient is calculated as follows: ; in, These correspond to the visible light image model, the ultraviolet light image model, and the superimposed image model, respectively. The final defect category R is calculated using the following formula: ; in, For the first Each model pairs categories The predicted probability.
[0011] Furthermore, the defect classification model is trained using a YOLOv8 network, and the loss function is the joint loss of CIoU Loss and classification cross-entropy, calculated as follows: ; in, For balancing weighting coefficients; Before the model training step, there is also a data annotation step: using annotation tools to annotate the visible light image, ultraviolet light image and superimposed image to label the defect categories, and converting the annotation files into VOC dataset format, dividing them into training set, validation set and test set according to the proportion.
[0012] This specification provides one or more embodiments of an image-based determination system for multi-classification of featureless defects on printed circuit boards, including: Image preprocessing module: used to preprocess the acquired CAM and UV images of the printed circuit board to obtain a binarized image; Template matching module: used to perform template matching on the pre-processed CAM and UV patterns of printed circuit boards and obtain the matching position; Image overlay module: used to weight and overlay the CAM image and UV image based on the matching position to generate an overlay image containing enhanced defect features; Model training module: used to train three independent defect classification models based on visible light image, UV image and the superimposed image, respectively for identifying short circuit, open circuit or alignment anomaly; Fusion Judgment Module: This module is used to input the visible light image, ultraviolet light image, and the superimposed image generated therefrom into the corresponding defect classification model, and output the final defect classification result or alignment anomaly prompt according to the preset fusion judgment rules.
[0013] This specification provides one or more embodiments of an electronic device, including: Processor; and, A memory is configured to store computer-executable instructions, which, when executed, cause the processor to implement the steps of the image determination method for multi-classification of featureless defects in printed circuit boards described above.
[0014] This specification provides one or more embodiments of a storage medium for storing computer-executable instructions that, when executed, implement the steps of the above-described image determination method for multi-classification of featureless defects in printed circuit boards.
[0015] This invention addresses the problem of distinguishing between short circuits and open circuits in large-area, featureless defects. It pre-localizes and morphologically dilates high-resolution, high-semantic CAM images, then overlays them with UV defect images to form new training samples. This allows a single model to stably identify previously featureless short-circuit or open-circuit defects, significantly reducing the false negative rate and improving the model's generalization ability in batch scenarios. A two-stage decision mechanism of "template matching + overlay neural network" is employed: the first stage uses matching similarity to quickly filter out obvious alignment errors; the second stage re-labels the remaining suspected samples using an overlay method and trains a dedicated network, achieving accurate recall of "high similarity alignment errors" and avoiding false positives or false negatives caused by traditional single-threshold strategies. To address the limitation of indistinguishable residual adhesive / foreign matter in the overlay model, an independent model jointly trained with Normal and UV images is introduced. A multi-model adjudication process based on defect category credibility is proposed, automatically selecting the most credible model output, resolving the result conflict problem during multi-model parallel inference, and further reducing over- and under-detection.
[0016] The above description is merely an overview of the technical solution of the present invention. In order to better understand the technical means of the present invention and to implement it in accordance with the contents of the specification, and in order to make the above and other objects, features and advantages of the present invention more apparent and understandable, specific embodiments of the present invention are described below. Attached Figure Description
[0017] To more clearly illustrate the technical solutions in one or more embodiments of this specification or in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in this specification. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0018] Figure 1 A flowchart illustrating an image-based multi-classification method for featureless defects in printed circuit boards, provided for one or more embodiments of this specification. Figure 2 A flowchart of an image preprocessing method for image determination of featureless defects in printed circuit boards, provided for one or more embodiments of this specification; Figure 3 A flowchart of a template matching method for an image determination method for multi-classification of featureless defects in printed circuit boards, provided for one or more embodiments of this specification; Figure 4 A flowchart of an image overlay method for a multi-classification image determination method for featureless defects in printed circuit boards, provided for one or more embodiments of this specification; Figure 5A flowchart of PCB image annotation and model training for an image determination method for multi-classification of featureless defects on printed circuit boards, provided for one or more embodiments of this specification; Figure 6 A flowchart of a second-order misalignment image determination method for a multi-classification image determination method for featureless defects in printed circuit boards, provided for one or more embodiments of this specification; Figure 7 A flowchart of a model fusion determination method for an image determination method for multi-classification of featureless defects in printed circuit boards, provided for one or more embodiments of this specification; Figure 8 A schematic diagram illustrating the composition of an image determination system for multi-classification of featureless defects in printed circuit boards, provided for one or more embodiments of this specification. Figure 9 This is a schematic diagram of the structure of an electronic device provided for one or more embodiments of this specification. Detailed Implementation
[0019] To enable those skilled in the art to better understand the technical solutions in one or more embodiments of this specification, the technical solutions in one or more embodiments of this specification will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of this specification, and not all of the embodiments. Based on one or more embodiments of this specification, all other embodiments obtained by those skilled in the art without creative effort should fall within the protection scope of this document.
[0020] Method Implementation Examples According to embodiments of the present invention, an image-based method for multi-classification of featureless defects in printed circuit boards is provided. Figure 1 A flowchart illustrating an image-based multi-classification method for featureless defects on printed circuit boards, provided for one or more embodiments of this specification, is shown below. Figure 1 As shown, the image determination method for multi-classification of featureless defects in printed circuit boards according to an embodiment of the present invention specifically includes: S1. Preprocess the acquired CAM and UV maps of the printed circuit board to obtain a binarized image.
[0021] Perform a series of preprocessing steps on the CAM and UV maps, such as... Figure 2 As shown, the details are as follows: The CAM image is converted to grayscale and then binarized using a fixed threshold method. Assume the CAM image resolution is [resolution value missing]. The UV map resolution is First, convert the CAM image to a grayscale image using the following formula. : ; Binarization is performed using a fixed threshold method: ; in, =25 is the preset grayscale threshold.
[0022] Subsequently, the binarized CAM image was subjected to morphological erosion processing, with n=11 erosion cycles, to obtain the CAM eroded image. : ; Convert the UV map to grayscale. Later The UV binary map is obtained by using the Otsu method (OTSU) adaptive binarization. .
[0023] S2. Perform template matching on the preprocessed CAM and UV patterns of the printed circuit board to obtain the matching positions.
[0024] like Figure 3 As shown, the CAM image after 11 etching cycles. As a template, with UV binary map Perform normalized cross-correlation matching and calculate the similarity score Y, as shown below: ; in, This is the CAM image after erosion. For a UV binary image, if the similarity score Y is lower than a first preset threshold, it is judged as an alignment anomaly. The score after 11 matches in CAM erosion is the result. The CAM etched map is obtained by etching the binary CAM image 12 times. Then, after 12 corrosion cycles UV binary map Perform normalized cross-correlation matching and calculate similarity scores. ,Compare and ,like Greater than Then increase the number of corrosion cycles by 1 and repeat the above operation until... Less than Alternatively, if the erosion count reaches 15, output the final matching score. and its matching position.
[0025] S3. Based on the matching position, the CAM image and UV image are weighted and superimposed to generate a superimposed image containing enhanced defect features.
[0026] Image overlay can be used to enhance defect features, such as Figure 4 As shown, the obtained matching positions are mapped onto the CAM erosion map, the corresponding matching regions of the CAM are cropped, and the cropped CAM map and the binarized UV map are superimposed and fused according to a preset transparency using the following formula to generate a superimposed image containing enhanced defect features: ; in, This is the CAM image after cropping and matching. This is a binary UV map. and These are the transparency coefficients of the CAM and UV maps, respectively. + =1; In this embodiment, the CAM image transparency is =0.3, UV map transparency is =0.7.
[0027] The overlapping areas, open-circuit areas, and short-circuit areas of the CAM image and the UV image have different grayscale characteristics in the overlay image. The overlapping areas of the CAM and UV maps are displayed in black, open-circuit areas in gray, and short-circuit areas are lighter in color, appearing as grayish-white. This fused image preserves the semantic structure of the circuit in the CAM map while enhancing the defect areas in the UV map, making short-circuit / open-circuit defect features prominent. It also effectively solves the problem that the Normal and UV maps cannot correctly distinguish and classify large-area short circuits / open circuits.
[0028] S4. Train three independent defect classification models based on the visible light image, UV image, and the superimposed image, respectively, to identify short circuits, open circuits, or alignment anomalies.
[0029] Use the labelimg software to label Normal, UV, and UV values respectively. Image, as shown Figure 5 As shown, the Normal and UV icons are labeled muchcu, lesscu, other, and R_NG_06. The image is labeled with "muchcu," "lesscu," and "error." "Muchcu" represents a short circuit, "lesscu" represents an open circuit, "other" represents foreign matter, "R_NG_06" represents residual adhesive, and "error" represents an error. The label XML file generated by `labelimg` is then converted to VOC dataset format and divided into training, testing, and validation sets in an 8:1:1 ratio. The dataset is then input into a YOLOv8 network for defect classification model training. The epoch is set to 150, the batch size to 16, and the learning rate to 0.001. The loss function uses a combination of CIOU Loss and classification cross-entropy, calculated as follows: ; in, To balance the weight coefficients, after training, a defect identification model (pt file) for inference is obtained. The best-performing Normal model, UV model, and [other models] are then tested on a test set. Model.
[0030] Scoring by template matching Compared with a threshold, images with obvious alignment errors are quickly filtered out. The threshold can be set freely; in this embodiment, it is set to 0.6. If the matching score is... If the score is greater than the threshold, proceed to the next stage of judgment; if the score matches... If the value is less than the threshold, a mismatch report will be displayed. Image input In the model, detection The model determines whether the result contains an error label; if so, it reports a mismatch.
[0031] S5. Input the visible light image, ultraviolet light image and the superimposed image generated therefrom into the corresponding defect classification model, and output the final defect classification result or alignment anomaly prompt according to the preset fusion judgment rule.
[0032] Normal image, UV image and The graph is input into the corresponding training model to obtain prediction results for various defects, such as... Figure 7 As shown, the output of the Normal graphical model is denoted as... The output of the UV diagram model is denoted as... ; The output of the graphical model is denoted as... Each model's output includes a defect category label and its corresponding confidence score, i.e., a probability value. The fusion decision rule is specifically as follows: The system prioritizes using visible light and UV image models to determine whether the output contains residual adhesive or foreign matter defects. Only the Normal and UV images can accurately classify these categories. The Normal and UV outputs are then evaluated sequentially. If the output contains foreign matter / residual adhesive and its confidence level is higher than a second preset threshold, the system proceeds. If the defect category output by the model is used directly as the final result, weighted voting calculation will not be performed again. If not, then determine by If the model output contains alignment error labels and their confidence level is higher than the third preset threshold, then the alignment error message will be output first and handed over to manual processing. If none of the above conditions are met, a weighted vote is performed on the confidence scores of the three models for the short-circuit and open-circuit categories, and the category with the highest weighted score is taken as the final defect classification result.
[0033] At this time , , A weighted voting calculation is performed, whereby the weights of the weighted votes are dynamically calculated based on the highest confidence level of each model's output. Let the highest confidence level of each model's output be... ,in The weighting coefficient calculation method is defined as follows: ; in, These correspond to the visible light image model, the ultraviolet light image model, and the superimposed image model, respectively. The final defect category R is calculated using a weighted voting method based on the following formula: ; in, For the first Each model pairs categories The predicted probability.
[0034] The beneficial effects of this invention are as follows: To address the difficulty in distinguishing between short circuits and open circuits in large-area, featureless defects, this paper proposes a new training sample by pre-localizing and morphologically dilating high-resolution, high-semantic CAM images and then overlaying them with UV defect images. This allows a single model to reliably identify short-circuit or open-circuit defects that were originally featureless, significantly reducing the false negative rate and improving the model's generalization ability in batch scenarios. A two-stage decision mechanism of "template matching + overlay neural network" is adopted: the first stage uses matching similarity to quickly screen out obvious alignment errors; the second stage re-labels the remaining suspected samples in the overlay image manner and trains a dedicated network to achieve accurate recall of "high similarity alignment errors," avoiding false positives or false negatives caused by traditional single threshold strategies. To address the limitation that residual glue / foreign objects cannot be distinguished in the overlay image model, an independent model jointly trained with Normal and UV images is introduced, and a multi-model adjudication process based on defect category credibility is proposed. This automatically selects the most credible model output, solving the result conflict problem in multi-model parallel inference and further reducing over- and under-detection.
[0035] System Implementation Examples According to embodiments of the present invention, an image-based determination system for multi-classification of featureless defects in printed circuit boards is provided. Figure 8 This specification provides a schematic diagram of the composition of an image-based multi-classification system for featureless defects on printed circuit boards, as shown in one or more embodiments. Figure 8As shown, the image determination system for multi-classification of featureless defects in printed circuit boards according to an embodiment of the present invention specifically includes: Image preprocessing module 80: used to preprocess the acquired CAM and UV images of the printed circuit board to obtain a binarized image; Template matching module 82: Used to perform template matching on the pre-processed CAM and UV patterns of the printed circuit board and obtain the matching position; Image overlay module 84: used to weight and overlay the CAM image and UV image based on the matching position to generate an overlay image containing enhanced defect features; Model training module 86: used to train three independent defect classification models based on the visible light image, UV image and the superimposed image, respectively for identifying short circuit, open circuit or alignment anomaly; Fusion Judgment Module 88: It is used to input the visible light image, ultraviolet light image and the superimposed image generated therefrom into the corresponding defect classification model, and output the final defect classification result or alignment anomaly prompt according to the preset fusion judgment rules.
[0036] The embodiments of the present invention are system embodiments corresponding to the above method embodiments. The specific operation of each module can be understood by referring to the description of the method embodiments, and will not be repeated here.
[0037] Device Example 1 This invention provides an electronic device, such as... Figure 9 As shown, it includes: a memory 90, a processor 92, and a computer program stored in the memory 90 and executable on the processor 92. When the computer program is executed by the processor 92, it performs the following method steps: S1. Preprocess the acquired CAM and UV maps of the printed circuit board to obtain a binarized image; S2. Perform template matching on the preprocessed CAM and UV patterns of the printed circuit board to obtain the matching positions; S3. Based on the matching position, the CAM image and UV image are weighted and superimposed to generate a superimposed image containing enhanced defect features; S4. Train three independent defect classification models based on the visible light image, UV image and the superimposed image, respectively, to identify short circuit, open circuit or alignment anomaly; S5. Input the visible light image, ultraviolet light image and the superimposed image generated therefrom into the corresponding defect classification model, and output the final defect classification result or alignment anomaly prompt according to the preset fusion judgment rule.
[0038] Device Example 2 This invention provides a computer-readable storage medium storing an information transmission implementation program. When executed by a processor 92, the program performs the following method steps: S1. Preprocess the acquired CAM and UV maps of the printed circuit board to obtain a binarized image; S2. Perform template matching on the preprocessed CAM and UV patterns of the printed circuit board to obtain the matching positions; S3. Based on the matching position, the CAM image and UV image are weighted and superimposed to generate a superimposed image containing enhanced defect features; S4. Train three independent defect classification models based on the visible light image, UV image and the superimposed image, respectively, to identify short circuit, open circuit or alignment anomaly; S5. Input the visible light image, ultraviolet light image and the superimposed image generated therefrom into the corresponding defect classification model, and output the final defect classification result or alignment anomaly prompt according to the preset fusion judgment rule.
[0039] The computer-readable storage media described in this embodiment include, but are not limited to, ROM, RAM, disk, or optical disk.
[0040] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some or all of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present invention.
Claims
1. A method for image-based multi-classification of featureless defects in printed circuit boards, characterized in that, include: S1. Preprocess the acquired CAM and UV maps of the printed circuit board to obtain a binarized image; S2. Perform template matching on the preprocessed CAM and UV patterns of the printed circuit board to obtain the matching positions; S3. Based on the matching position, the CAM image and UV image are weighted and superimposed to generate a superimposed image containing enhanced defect features; S4. Train three independent defect classification models based on the visible light image, UV image and the superimposed image, respectively, to identify short circuit, open circuit or alignment anomaly; S5. Input the visible light image, ultraviolet light image and the superimposed image generated therefrom into the corresponding defect classification model, and output the final defect classification result or alignment anomaly prompt according to the preset fusion judgment rule.
2. The method according to claim 1, characterized in that, The preprocessing of the acquired CAM and UV patterns of the printed circuit board includes: The CAM image is converted to grayscale and binarized using a fixed threshold method. The binarized CAM image is then subjected to morphological erosion processing. The UV image is converted to grayscale and then subjected to adaptive threshold binarization using the Otsu method to obtain a binary UV image.
3. The method according to claim 1, characterized in that, The specific steps for template matching to obtain the matching position in the preprocessed CAM and UV patterns of the printed circuit board are as follows: The eroded CAM image is used as a template, and normalized cross-correlation matching is performed with the UV binary image to calculate the similarity score Y, as shown below: ; in, This is the CAM image after erosion. For a UV binary image, if the similarity score Y is lower than the first preset threshold, it is determined to be an alignment anomaly.
4. The method according to claim 1, characterized in that, The step of weighted superposition of the CAM image and UV image based on the matching position to generate a superimposed image containing enhanced defect features specifically involves: Map the matching positions onto the eroded CAM image, and then crop out the corresponding matching regions from the CAM image; The cropped CAM image and the binarized UV image are superimposed and fused with each other according to a preset transparency using the following formula to generate a superimposed image containing enhanced defect features: ; in, This is the CAM image after cropping and matching. This is a binary UV map. and These are the transparency coefficients of the CAM and UV maps, respectively. + =1; The overlapping areas, open-circuit areas, and short-circuit areas of the CAM image and the UV image have different grayscale characteristics in the overlay image.
5. The method according to claim 1, characterized in that, The specific fusion determination rule is as follows: The system prioritizes determining whether the output results contain residual adhesive or foreign matter defect categories based on the visible light image model and the UV image model, and if the confidence level is higher than the second preset threshold; if so, the defect category output by the model is directly used as the final result. If not, determine whether the result output by the overlay image model contains an alignment error label and whether its confidence level is higher than the third preset threshold; if so, output an alignment error message. If none of the above conditions are met, a weighted vote is performed on the confidence scores of the three models for the short-circuit and open-circuit categories, and the category with the highest weighted score is taken as the final defect classification result.
6. The method according to claim 5, characterized in that, The weights of the weighted voting are dynamically calculated based on the highest confidence level of each model's output. Let the highest confidence level of each model's output be... ,in The weighting coefficient is calculated as follows: ; in, These correspond to the visible light image model, the ultraviolet light image model, and the superimposed image model, respectively. The final defect category R is calculated using the following formula: ; in, For the first Each model pairs categories The predicted probability.
7. The method according to claim 1, characterized in that, The defect classification model is trained using a YOLOv8 network, and the loss function is the joint loss of CIoU Loss and classification cross-entropy, calculated as follows: ; in, For balancing weighting coefficients; Before the model training step, there is also a data annotation step: using annotation tools to annotate the visible light image, ultraviolet light image and superimposed image to label the defect categories, and converting the annotation files into VOC dataset format, dividing them into training set, validation set and test set according to the proportion.
8. An image-based classification system for featureless defects on printed circuit boards, characterized in that, include: Image preprocessing module: used to preprocess the acquired CAM and UV images of the printed circuit board to obtain a binarized image; Template matching module: used to perform template matching on the pre-processed CAM and UV patterns of printed circuit boards and obtain the matching position; Image overlay module: used to weight and overlay the CAM image and UV image based on the matching position to generate an overlay image containing enhanced defect features; Model training module: used to train three independent defect classification models based on visible light image, UV image and the superimposed image, respectively for identifying short circuit, open circuit or alignment anomaly; Fusion Judgment Module: This module is used to input the visible light image, ultraviolet light image, and the superimposed image generated therefrom into the corresponding defect classification model, and output the final defect classification result or alignment anomaly prompt according to the preset fusion judgment rules.
9. An electronic device, characterized in that, include: processor; as well as, A memory configured to store computer-executable instructions, which, when executed, cause the processor to implement the steps of the image determination method for multi-classification of featureless defects in printed circuit boards as described in any one of claims 1 to 7.
10. A storage medium, characterized in that, Used to store computer-executable instructions, which, when executed, implement the steps of the image determination method for multi-classification of featureless defects in printed circuit boards as described in any one of claims 1 to 7.