Defect detection method of circuit board, electronic equipment and storage medium

By obtaining the correlation mapping data of the printed circuit board and using the neural network model to process the defect image, the problem of time-consuming, labor-intensive and low accuracy of printed circuit board detection in the existing technology is solved, and efficient and accurate defect detection is achieved.

CN118628467AInactive Publication Date: 2024-09-10NINGBO WEINA QINGKE INTELLIGENT TECH CO LTD
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202410832689.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-06-25
Publication Date
2024-09-10
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

The existing technology relies on manual visual inspection and automatic optical inspection in printed circuit board defect detection, resulting in time-consuming and labor-intensive detection, low automation, and the need for manual screening, resulting in low detection accuracy.

Method used

By obtaining the associated mapping data of the printed circuit board, the neural network model is used to process the defect image, obtain the defect vector and label, and determine the defect label of the circuit board to be inspected based on the product model, thereby improving detection efficiency and accuracy.

Benefits of technology

It achieves efficient and accurate defect detection of printed circuit boards on the production line, reduces manual intervention, and improves detection efficiency and accuracy.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118628467A
    Figure CN118628467A
Patent Text Reader

Abstract

The invention provides a defect detection method of a circuit board, electronic equipment and a storage medium. The defect detection method comprises the following steps: acquiring association mapping data of a detected circuit board; wherein the associated mapping data is a mapping relation between a first defect vector corresponding to a first defect image on the detected circuit board and a defect label; determining at least one to-be-detected circuit board based on the product model of the detected circuit board; acquiring a second defect vector corresponding to a second defect image on each circuit board to be detected; and determining a defect label corresponding to the second defect vector based on the association mapping data. Through the defect detection method, the defect label of the circuit board to be detected with the same model as the circuit board under detection can be determined through the mapping relation between the first defect vector and the defect label of the circuit board under detection at present, namely, the defect label of the circuit board to be detected is determined by utilizing the online data of the circuit board under detection; and the circuit board defect detection efficiency and accuracy are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of defect detection, and in particular to a defect detection method, electronic device and storage medium for a circuit board. Background Art

[0002] Printed Circuit Board (PCB) is a carrier for electrical connection of electronic components. It realizes specific circuit functions through multiple components installed on it and the preset logical circuit connection relationship between these components. However, during the production process of printed circuit boards, they are affected by many external factors (temperature, materials, etc.), and are prone to various defects (such as short circuit, open circuit, burr, and defect) in the circuit board. If these production defects cannot be found in time during the production process, it will inevitably cause greater losses in the later use process.

[0003] The earliest method of PCB board defect detection relies on manual visual inspection, in which an operator uses a magnifying glass or a calibrated microscope to detect whether a PCB board has defects by naked eye. However, the above method completely relies on the detection results of the naked eye, which is time-consuming and labor-intensive, and has a poor degree of automation. In order to solve the above technical problems, the related art provides a method for PCB board defect detection based on automatic optical inspection equipment. However, the method for PCB board defect detection based on automatic optical inspection equipment still requires manual screening of unqualified defect points among the defect points alarmed by the inspection equipment according to the specific quality inspection standards of each PCB product to a certain extent.

[0004] The common method of screening unqualified defects is to summarize the product types of PCBs, set a quality inspection standard for each major category of PCB products, and then use the corresponding quality inspection standard to screen PCB products. Because it is necessary to set different matching templates for different error types, the error types that do not have matching templates cannot be effectively detected, resulting in a low fault tolerance rate for detection. In order to prevent missed detection, the above method often adjusts the threshold range of detection, which will cause more correct PCB boards to be considered wrong, resulting in a low accuracy rate. Summary of the invention

[0005] The present application provides a circuit board defect detection method, electronic device and storage medium, which can utilize the online data of the circuit board being inspected to determine the defect label of the circuit board to be inspected, and the method of online defect detection can improve the efficiency and accuracy of circuit board defect detection.

[0006] In order to solve the above technical problems, the present application provides a defect detection method for a circuit board, including: obtaining association mapping data of the circuit board under inspection; wherein the association mapping data is a mapping relationship between a first defect vector corresponding to a first defect image on the circuit board under inspection and a defect label; based on the product model of the circuit board under inspection, determining at least one circuit board to be inspected; obtaining a second defect vector corresponding to a second defect image on each circuit board to be inspected; and determining a defect label corresponding to the second defect vector based on the association mapping data.

[0007] In some embodiments, associated mapping data of a circuit board under inspection is obtained; wherein the associated mapping data is a mapping relationship between a first defect vector and a defect label corresponding to a first defect image on the circuit board under inspection, including: obtaining a first defect image of the circuit board under inspection; based on the first defect image, determining a first defect vector and a defect label corresponding to each first defect image; based on the first defect vector and the defect label, establishing associated mapping data between the first defect vector and the defect label.

[0008] In some embodiments, based on the first defect image, a first defect vector and a defect label corresponding to each first defect image are determined, including: performing image processing on the first defect image using a neural network model to obtain a first defect vector corresponding to the first defect image; and performing defect detection on the first defect image to determine the time consumed for the defect detection; based on the time, determining the defect label corresponding to the first defect image.

[0009] In some embodiments, defect labels include concern and no concern; based on time, determining the defect label corresponding to the first defect image includes: judging whether the time is greater than a first threshold, and judging whether the time is less than a second threshold; wherein the second threshold is less than the first threshold; in response to the time being greater than the first threshold, determining that the defect label of the first defect image is concern; in response to the time being less than the second threshold, determining that the defect label of the first defect image is no concern.

[0010] In some embodiments, determining a defect label corresponding to the second defect vector based on the associated mapping data includes: calculating the similarity between the second defect vector and each first defect vector in the associated mapping data; and determining the defect type of the second defect vector based on the similarity.

[0011] In some embodiments, calculating the similarity between the second defect vector and each first defect vector in the associated mapping data includes: calculating a first mean of the first defect vectors whose defect labels are concerned in the associated mapping data, and calculating a second mean of the first defect vectors whose defect labels are not concerned in the associated mapping data; and calculating the similarity between the first mean, the second mean and the second defect vector, respectively.

[0012] In some embodiments, obtaining a second defect vector corresponding to a second defect image on the circuit board to be inspected includes: obtaining a second defect image based on the circuit board to be inspected; and performing image processing on the second defect image using a neural network model to obtain a second defect vector corresponding to the second defect image.

[0013] In some embodiments, the first defect image is processed using a neural network model to obtain a first defect vector corresponding to the first defect image, including: the first defect semantic extraction model and the first defect morphology extraction model are used to process the first defect image to obtain a first defect vector corresponding to the first defect image.

[0014] In some embodiments, the second defect image is processed using a neural network model to obtain a second defect vector corresponding to the second defect image, including: the second defect image is processed using a second defect semantic extraction model and a second defect morphology extraction model to obtain a second defect vector corresponding to the second defect image.

[0015] In order to solve the above technical problems, the present application provides an electronic device on the other hand, the electronic device includes a memory and a processor, the memory stores a computer program, and the processor is used to execute the computer program to implement the above defect detection method.

[0016] In order to solve the above technical problem, the present application provides, on the other hand, a computer-readable storage medium, which is used to store a computer program. When the computer program is executed by a processor, it is used to implement the above defect detection method.

[0017] The defect detection method for circuit boards provided in some embodiments of the present application obtains the associated mapping data of the circuit board under inspection, and the associated mapping data is the mapping relationship between the first defect vector corresponding to the first defect image on the circuit board under inspection and the defect label, and then, based on the product model of the circuit board under inspection, at least one circuit board to be inspected is determined, and the second defect vector corresponding to the second defect image on each circuit board to be inspected is obtained. Finally, based on the associated mapping data, the defect label corresponding to the second defect vector is determined. Through the above-mentioned defect detection method, the defect label of the circuit board to be inspected of the same model as the circuit board under inspection can be determined through the mapping relationship between the first defect vector and the defect label of the circuit board currently under inspection, that is, the defect label of the circuit board to be inspected can be determined using the online data of the circuit board under inspection, which can improve the efficiency and accuracy of circuit board defect detection. BRIEF DESCRIPTION OF THE DRAWINGS

[0018] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work. Among them:

[0019] Figure 1 is a schematic flow chart of a circuit board defect detection method in some embodiments of the present application;

[0020] Figure 2 is a flowchart of step 11 in some embodiments of the present application;

[0021] Figure 3 is a flowchart of step 14 in some embodiments of the present application;

[0022] Figure 4 is a schematic flow chart of a circuit board defect detection method in some embodiments of the present application;

[0023] Figure 5 is a schematic flow chart of a circuit board defect detection method in some embodiments of the present application;

[0024] Figure 6 is a schematic diagram of the structure of an electronic device in some embodiments of the present application;

[0025] Figure 7 It is a schematic diagram of the structure of the computer-readable storage medium in some embodiments of the present application. DETAILED DESCRIPTION

[0026] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0027] See also Figure 1 , Figure 1 : is a flow chart of a defect detection method for a circuit board in some embodiments of the present application, the defect detection method comprising:

[0028] Step 11: Obtaining the associated mapping data of the circuit board under inspection; wherein the associated mapping data is a mapping relationship between a first defect vector corresponding to a first defect image on the circuit board under inspection and a defect label.

[0029] It can be understood that the circuit board under inspection may be a PCB (Printed Circuit Board) board currently being inspected on a production line.

[0030] In some embodiments, Figure 2 As shown, step 11 may include the following steps:

[0031] Step 21: Acquire a first defect image of the circuit board under inspection.

[0032] The first defect image may be an image obtained by scanning the PCB board using AOI (Automated Optical Inspection) equipment, AVI (Automated Visual Inspection) equipment or other automatic inspection equipment.

[0033] Furthermore, the defect image obtained by scanning may not be a scan of the entire PCB board, but a scan of a small area of ​​the PCB board where the defect occurs. It can be considered that only one defect occurs in each first defect image, and a PCB board will report multiple first defect images.

[0034] The first defect image may be a single-channel grayscale image, a single-channel depth image, a single-channel infrared image, an RGB (Red, Green, Blue) image or others, and is not limited here.

[0035] Step 22: Based on the first defect images, determine the first defect vector and defect label corresponding to each first defect image.

[0036] In some embodiments, image processing may be performed on the first defect image to convert the image into a vector to obtain a first defect vector corresponding to the first defect image.

[0037] In one application scenario, a neural network model may be used to perform image processing on the first defect image to obtain a corresponding first defect vector.

[0038] Specifically, the neural network model is a first defect semantic extraction model and a first defect morphology extraction model, and the first defect semantic extraction model and the first defect morphology extraction model are used to perform image processing on the first defect image to obtain a first defect vector corresponding to the first defect image. The first defect semantic extraction model can be a deep convolutional neural network model or other image convolutional neural network model, and the first defect morphology extraction model can be a variational auto-encoder (VAE) or other image convolutional neural network model, which is not limited here.

[0039] It can be understood that the first defect semantic extraction model and the first defect morphology extraction model are used to extract defect features from the first defect image respectively to obtain vectors corresponding to the defects. At this time, one first defect image is used as input to output two first defect vectors.

[0040] Specifically, the neural network model is a single embedded vector calculation model, and the single embedded vector calculation model is used to perform image processing on the first defect image to obtain a first defect vector corresponding to the first defect image.

[0041] It can be understood that the defect features of the first defect image are extracted using a single embedded vector calculation model to obtain a vector corresponding to the defect. At this time, a first defect image is used as input to output a first defect vector.

[0042] In some embodiments, in the process of obtaining the first defect vector, in addition to performing image processing on the corresponding first defect image, additional preset features may be added based on actual needs, such as the RGB value of the image, brightness, whether it contains sharp edges, whether it contains spots, etc., so as to calculate the first defect vector based on the first defect image and the preset features, so that the obtained first defect vector is more complete and comprehensive.

[0043] It is worth noting that in some embodiments of the present application, the process of obtaining the first defect image by the automatic detection device for performing defect detection on the circuit board under inspection is: comparing the design file or drill belt file with the scanned image to determine the location of the defect and report these defects. Since the defects marked on the first defect image determined by the above method may not be real, that is, there is a possibility of false alarm defects, based on this, in order to improve the accuracy of defect category recognition, it is necessary to perform defect detection again on the first defect image with marked defects to determine whether the defects marked on the first defect image are real defect points or false alarm defect points.

[0044] In some embodiments, the time consumed by defect detection is determined by performing defect detection on the first defect image, and then the defect label corresponding to the first defect image is determined based on the time. The defect detection is to perform defect detection / defect screening again on the first defect image with defects marked; the time consumed by defect detection / defect screening is the time period between the start time point of detection and the end time point of detection.

[0045] In some embodiments, the consumed time is the time that the first defect image stays on the inspection software of the manual operation terminal, wherein the manual operation terminal is used to provide a manual inspection function, and the dwell time includes a start time point and an end time point, wherein the start time point is the time point when defect detection is performed on a first defect image, and the end time point is the time point when defect detection is stopped on the corresponding first defect image. For example, the time point when the detection of the first defect image A starts is B1 (such as 18:20, 15s), and the time point when the detection of the first defect image A stops is B2 (such as 18:21, 17s), and the dwell time at this time is the time period between B2 and B1 (such as 1min, 2s).

[0046] In one application scenario, the manual inspection process may include: when the quality inspector inspects the defects marked on the first defect image, he will judge the marked defects to determine whether the defects exceed the allowable standard. At this time, the inspection software can be used to record the time the quality inspector stays on each first defect image. Specifically, the actions of the quality inspector can be recorded by a camera, and then the actions of the quality inspector can be analyzed by video recording, so as to determine the time point when the quality inspector starts to detect the first defect image and the time point when the quality inspector ends the detection through the video recording and the actions of the quality inspector, and then determine the time of staying on the first defect image.

[0047] In other application scenarios, the start detection time point and the end detection time point can be determined by the background timing of the manual operation terminal, where the manual operation terminal records the manual actions on the manual operation terminal and determines the start detection time point and the end detection time point of the first defect image based on the recorded actions.

[0048] In other embodiments, when performing defect detection on the first defect image, it is not necessary to obtain the dwell time on the first defect image, but the defect label of the first defect image is directly determined. For example, when screening the marked defects on the manual operation terminal, the defect label of the first defect image is actively marked at the same time.

[0049] In some embodiments, the defect label includes attention and no attention, and the relationship between time and threshold can be judged to determine whether the defect label of the first defect image is attention or no attention. Among them, attention means that the marked defect is a real defect point, and no attention means that the marked defect is a false alarm defect point.

[0050] In an application scenario, whether the defect label of the first defect image is of concern or not is determined by judging whether the time is greater than the first threshold and judging whether the time is less than the second threshold. Specifically, if the second threshold is less than the first threshold, in response to the time being greater than the first threshold, the defect label of the first defect image is determined to be of concern; in response to the time being less than the second threshold, the defect label of the first defect image is determined to be of no concern; if the response time is greater than the second threshold and less than the first threshold, it can be determined that the corresponding first defect image belongs to a fuzzy sample. In order to ensure the accuracy of the label, the corresponding first defect image will be discarded.

[0051] Step 23: Based on the first defect vector and the defect label, establish association mapping data between the first defect vector and the defect label.

[0052] It can be understood that after acquiring each first defect image, the first defect vector and the defect label, the first defect vector can be paired with the defect label to establish association mapping data between the first defect vector and the defect label.

[0053] Step 12: Based on the product model of the circuit board under inspection, determine at least one circuit board to be inspected.

[0054] It is understandable that the product model of the circuit board under inspection can be determined, and then the product model can be used to determine at least one circuit board to be inspected corresponding to the product model.

[0055] Step 13: Obtain a second defect vector corresponding to the second defect image on each circuit board to be inspected.

[0056] The second defect image may be an image obtained by scanning the PCB board using AOI (Automated Optical Inspection) equipment, AVI (Automated Visual Inspection) equipment or other automatic inspection equipment.

[0057] Furthermore, the defect image obtained by scanning may not be a scan of the entire PCB board, but a scan of a small area of ​​the PCB board where the defect occurs. It can be considered that only one defect occurs in each second defect image, and a PCB board will report several second defect images.

[0058] The second defect image may be a single-channel grayscale image, a single-channel depth image, a single-channel infrared image, an RGB (Red, Green, Blue) image or others, and is not limited here.

[0059] In some embodiments, image processing may be performed on the second defect image to obtain a second defect vector corresponding to the second defect image.

[0060] In one application scenario, a neural network model may be used to perform image processing on the second defect image to obtain a corresponding second defect vector.

[0061] Specifically, the neural network model is a second defect semantic extraction model and a second defect morphology extraction model, and the second defect semantic extraction model and the second defect morphology extraction model are used to perform image processing on the second defect image to obtain a second defect vector corresponding to the second defect image. Among them, the second defect semantic extraction model can be a deep convolutional neural network model or other image convolutional neural network model, and the second defect semantic extraction model is the same or different from the first defect semantic extraction model, which is not limited here; the second defect morphology extraction model can be a variational auto-encoder (Variational Auto-Encoders, VAE) or other image convolutional neural network model, and the second defect morphology extraction model is the same or different from the first defect morphology extraction model, which is not limited here.

[0062] It can be understood that the second defect semantic extraction model and the second defect morphology extraction model are used to extract defect features from the second defect image respectively to obtain vectors corresponding to the defects. At this time, one second defect image is used as input to output two second defect vectors.

[0063] Specifically, the neural network model is a single embedded vector calculation model, and the single embedded vector calculation model is used to perform image processing on the second defect image to obtain a second defect vector corresponding to the second defect image.

[0064] It can be understood that the defect features of the second defect image are extracted using a single embedded vector calculation model to obtain a vector corresponding to the defect. At this time, a second defect image is used as input to output a second defect vector.

[0065] Similarly, since the defects marked on the second defect image may not actually exist, that is, there is a possibility of false alarm defects, based on this, in order to improve the accuracy of defect category recognition, it is necessary to perform defect detection again on the second defect image with marked defects to determine whether the defects marked on the second defect image are real defect points or false alarm defect points.

[0066] Furthermore, since the product model of the circuit board to be inspected is the same as that of the circuit board under inspection, step 14 can be executed at this time to perform online detection of the second defect image on the circuit board to be inspected based on the online data related to the circuit board under inspection (i.e., the labeled defect data generated on the circuit board under inspection that has the same product model as the circuit board to be inspected) to determine the defect label of the second defect image.

[0067] Step 14: Determine a defect label corresponding to the second defect vector based on the association mapping data.

[0068] In some embodiments, the association mapping data is traversed, and the similarity between the first defect vector and the second defect vector in the association mapping data is calculated to obtain a similarity feature parameter, and then the defect label corresponding to the second defect vector is determined based on the similarity feature parameter.

[0069] In an application scenario, when a first defect image corresponds to two first defect vectors and a second defect image corresponds to two second defect vectors, the first defect vector is set to A1 and A2, and the second defect vector is set to B1 and B2. At this time, the similarities between A1&B1, A1&B2, A2&B1, and A2&B2 can be calculated to obtain four similarity feature parameters, and then the defect label of the second defect image is determined based on these four similarity feature parameters. Among them, the similarity can be the cosine similarity, Euclidean distance or other between vectors, which is not limited here.

[0070] In an application scenario, when a first defect image corresponds to a first defect vector and a second defect image corresponds to a second defect vector, the first defect vector is set to A and the second defect vector is set to B. At this time, the similarity between A&B can be calculated to obtain a similarity feature parameter, and then based on the similarity feature parameter, the defect label of the second defect image is determined.

[0071] In some embodiments, see Figure 3 , step 14 may include the following steps:

[0072] Step 31: Calculate the similarity between the second defect vector and each first defect vector in the associated mapping data.

[0073] In some embodiments, before calculating the similarity between the second defect vector and the first defect vector, since the first defect vector and the defect label are paired and associated, in order to reduce the amount of calculation, the first defect vector can be classified according to the defect label to obtain first defect vectors of different defect categories, and then the similarity between the first defect vector and the second defect vector is calculated according to the defect category.

[0074] In an application scenario, the defect labels of the first defect vector include two types: attention and no attention. In this case, the first mean of the first defect vector whose defect label is attention in the association mapping data can be calculated, and the second mean of the first defect vector whose defect label is no attention in the association mapping data can be calculated, and then the similarity between the first mean, the second mean and the second defect vector is calculated respectively. The similarity can be the cosine similarity, Euclidean distance or other between vectors, which is not limited here.

[0075] For example, the association mapping data includes ten first defect vectors, namely A1 to A10, among which the defect labels of A1 to A3 are attention and the defect labels of A4 to A10 are not attention. Based on this, the vector average C1 of A1 to A3 and the vector average C2 of A4 to A10 can be calculated.

[0076] When the second defect vector corresponding to the second defect image is B1 and B2, the similarities between C1&B1, C1&B2, C2&B1 and C2&B2 can be calculated respectively to obtain four similarity feature parameters; when the second defect vector corresponding to the second defect image is B, the similarities between C1&B and C2&B can be calculated respectively to obtain two similarity feature parameters.

[0077] Step 32: Based on the similarity, determine the defect type of the second defect vector.

[0078] In some embodiments, the relevant parameters of the similarity (corresponding to the similarity feature parameters described above) may be input into a classifier, so as to use the classifier to predict the defect label of the second defect vector on the second defect image to obtain a prediction result.

[0079] For example, the similarities between C1&B1, C1&B2, C2&B1, and C2&B2 are input into the classifier, so that the classifier is used to analyze the four similarity feature parameters to obtain the defect prediction result.

[0080] For another example, the similarity between C1&B and C2&B is input into the classifier, so that the classifier is used to analyze the two similarity feature parameters to obtain the defect prediction result.

[0081] The classifier may be LightGBM (Light Gradient Boosting Machine), a linear classifier, a logistic regression classifier or others, without limitation.

[0082] The defect detection method for circuit boards provided in some embodiments of the present application obtains the associated mapping data of the circuit board under inspection, and the associated mapping data is the mapping relationship between the first defect vector corresponding to the first defect image on the circuit board under inspection and the defect label, and then, based on the product model of the circuit board under inspection, at least one circuit board to be inspected is determined, and the second defect vector corresponding to the second defect image on each circuit board to be inspected is obtained. Finally, based on the associated mapping data, the defect label corresponding to the second defect vector is determined. Through the above-mentioned defect detection method, the defect label of the circuit board to be inspected of the same model as the circuit board under inspection can be determined through the mapping relationship between the first defect vector and the defect label of the circuit board currently under inspection, that is, the defect label of the circuit board to be inspected can be determined using the online data of the circuit board under inspection, which can improve the efficiency and accuracy of circuit board defect detection.

[0083] See also Figure 4 , Figure 4 : is a flow chart of a defect detection method for a circuit board in some embodiments of the present application, the defect detection method comprising:

[0084] Step 401: Acquire a first defect image of the circuit board under inspection.

[0085] Step 402: Perform image processing on the first defect image using a neural network model to obtain a first defect vector corresponding to the first defect image.

[0086] Step 403: perform defect detection on the first defect image and determine the time consumed for the defect detection.

[0087] Step 404: Determine a defect label corresponding to the first defect image based on time.

[0088] Step 405: Based on the first defect vector and the defect label, establish association mapping data between the first defect vector and the defect label.

[0089] It can be understood that step 402 and steps 403 to 404 may be executed synchronously or asynchronously, and there is no limitation here.

[0090] Step 406: Determine at least one circuit board to be inspected based on the product model of the circuit board being inspected.

[0091] Step 407: Based on the circuit board to be inspected, a second defect image is acquired.

[0092] Step 408: Perform image processing on the second defect image using the neural network model to obtain a second defect vector corresponding to the second defect image.

[0093] It can be understood that steps 401 to 405 and steps 406 to 408 may be performed synchronously or asynchronously, and there is no limitation here.

[0094] Step 409: Calculate the similarity between the second defect vector and each first defect vector in the associated mapping data.

[0095] Step 410: Determine the defect type of the second defect vector based on the similarity.

[0096] The circuit board defect detection method provided in some embodiments of the present application determines the defect label of the circuit board to be inspected of the same model as the circuit board being inspected by using the mapping relationship between the first defect vector of the inspected circuit board and the defect label, and determines the defect label of the circuit board to be inspected by utilizing the online data of the circuit board being inspected, thereby improving the efficiency and accuracy of circuit board defect detection.

[0097] In an application scenario, such as Figure 5 As shown, Figure 5 It is a flow chart of a defect detection method for a circuit board in some embodiments of the present application. The defect detection method includes three parts, one part for a PCB board to be inspected, another part for a PCB board under inspection, and another part for a PCB board to be inspected and a PCB board under inspection.

[0098] For the PCB board to be inspected, the following steps are specifically included:

[0099] S11: Input the PCB board to be inspected into the automatic AVI quality inspection equipment for inspection to obtain a PCB defect image.

[0100] The PCB defect image corresponds to the second defect image.

[0101] S12: Calculate defect representation based on the PCB defect image to obtain a PCB defect embedding vector.

[0102] Among them, the PCB defect embedding vector is a low-dimensional representation of the PCB defect in the embedding space, and the PCB defect embedding vector corresponds to the second defect vector.

[0103] As far as the inspection of PCB board is concerned, the following steps are specifically included:

[0104] S21: The PCB board under inspection is input into the automatic AVI quality inspection equipment for inspection to obtain a PCB defect image.

[0105] The PCB defect image corresponds to the first defect image.

[0106] S22: Calculate defect representation based on the PCB defect image to obtain a PCB defect embedding vector.

[0107] Among them, the PCB defect embedding vector is a low-dimensional representation of the PCB defect in the embedding space, and the PCB defect embedding vector corresponds to the first defect vector.

[0108] S23: Screening the PCB defect image, automatically mapping a label to the PCB defect image, and determining a PCB defect label of the PCB defect image.

[0109] Among them, automatically mapping a label to the PCB defect image and determining the PCB defect label of the PCB defect image includes: recording the residence time of the first defect image on the inspection software of the manual operation terminal, and then mapping the PCB defect label based on the residence time.

[0110] S24: Pair the PCB defect embedding vector and the PCB defect label, and establish online defect data.

[0111] Among them, the online defect data corresponds to the associated mapping data.

[0112] For the above operation, you can then perform the following steps:

[0113] S31: Calculate the online data similarity and obtain similarity feature parameters.

[0114] Among them, the similarity feature parameter is the similarity between the PCB defect embedding vector in the online defect data and the PCB defect embedding vector on the PCB board to be inspected.

[0115] S32: Inputting the similarity feature parameters into the classifier to use the classifier to perform defect prediction and obtain a predicted defect label.

[0116] It is understood that steps S11 to S12 and steps S21 to S24 can be executed synchronously or asynchronously, and there is no limitation here. Steps S22 and S23 can be executed synchronously or asynchronously, and there is no limitation here.

[0117] The circuit board defect detection method provided in some embodiments of the present application can improve the efficiency and accuracy of circuit board defect detection by utilizing online data of the circuit board being inspected to determine the defect labels of all circuit boards to be inspected of the same product type.

[0118] See also Figure 6 , Figure 6 It is a structural diagram of an electronic device in some embodiments of the present application. The electronic device 10 includes a memory 101 and a processor 102. The memory 101 is used to store computer programs, and the processor 102 is used to execute computer programs to implement the defect detection method described in any of the above embodiments, which will not be repeated here.

[0119] In some embodiments, the electronic device 10 may be a desktop computer, a laptop computer, a smart wearable device or others, which is not limited here.

[0120] See also Figure 7 , Figure 7 It is a structural diagram of a computer-readable storage medium in some embodiments of the present application. The computer-readable storage medium 20 stores a computer program 201. When the computer program 201 is executed by the processor 102, it is used to implement the defect detection method described in any of the above embodiments, which will not be repeated here.

[0121] The processor 102 involved in the present application can be called a CPU (Central Processing Unit), which may be an integrated circuit chip, or a general-purpose processor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, and discrete hardware components.

[0122] The storage medium 20 used in this application includes various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), or a CD.

[0123] In summary, the circuit board defect detection method provided in some embodiments of the present application can use the data of the circuit board being detected to determine the defect type of all circuit boards to be inspected of the same product type. That is, by using online data to perform online inspection of the circuit board to be inspected, a plug-and-play method that automatically fits the product model quality inspection standards of various circuit boards can be provided in combination with automatic inspection equipment on the production line.

[0124] Moreover, when the defect labels include "attention" and "no attention", the defect detection method provided in the present application can make an online prediction of the defect label of the second defect image into two categories of "attention" and "no attention", instead of leaving it to manual review and determination, thereby improving the efficiency of defect detection.

[0125] The above description is only an implementation method of the present application, and does not limit the patent scope of the present application. Any equivalent structure or equivalent process transformation made using the contents of the present application specification and drawings, or directly or indirectly used in other related technical fields, are also included in the patent protection scope of the present application.

Claims

1. A circuit board defect detection method, characterized in that: The method comprises: Acquire association mapping data of the circuit board under inspection; wherein the association mapping data is a mapping relationship between a first defect vector corresponding to a first defect image on the circuit board under inspection and a defect label; Determining at least one circuit board to be inspected based on the product model of the circuit board under inspection; Acquire a second defect vector corresponding to the second defect image on each of the circuit boards to be inspected; Based on the association mapping data, a defect label corresponding to the second defect vector is determined.

2. The method according to claim 1, characterized in that The obtaining of the associated mapping data of the circuit board under inspection; wherein the associated mapping data is a mapping relationship between a first defect vector corresponding to a first defect image on the circuit board under inspection and a defect label, including: Acquire a first defect image of the circuit board under inspection; Based on the first defect images, determining a first defect vector and a defect label corresponding to each of the first defect images; Based on the first defect vector and the defect label, association mapping data between the first defect vector and the defect label is established.

3. The method according to claim 2, characterized in that The determining, based on the first defect images, first defect vectors and defect labels corresponding to each of the first defect images comprises: Performing image processing on the first defect image using a neural network model to obtain a first defect vector corresponding to the first defect image; and Performing defect detection on the first defect image to determine a time consumed by the defect detection; Based on the time, a defect label corresponding to the first defect image is determined.

4. The method according to claim 3, characterized in that The defect labels include attention and no attention; The determining, based on the time, a defect label corresponding to the first defect image includes: Determine whether the time is greater than a first threshold, and determine whether the time is less than a second threshold; wherein the second threshold is less than the first threshold; In response to the time being greater than the first threshold, determining that the defect label of the first defect image is a concern; In response to the time being less than the second threshold, it is determined that the defect label of the first defect image is not of concern.

5. The method according to claim 1, characterized in that The determining, based on the association mapping data, a defect label corresponding to the second defect vector comprises: calculating the similarity between the second defect vector and each of the first defect vectors in the association mapping data; Based on the similarity, a defect type of the second defect vector is determined.

6. The method according to any one of claims 4 or 5, characterized in that: The calculating the similarity between the second defect vector and each of the first defect vectors in the associated mapping data includes: Calculating a first mean value of first defect vectors whose defect labels are concerned in the association mapping data, and calculating a second mean value of first defect vectors whose defect labels are not concerned in the association mapping data; The similarities between the first mean, the second mean and the second defect vector are calculated respectively.

7. The method according to claim 1, characterized in that The obtaining of a second defect vector corresponding to a second defect image on the circuit board to be inspected includes: Based on the circuit board to be inspected, acquiring a second defect image; The second defect image is processed by using a neural network model to obtain a second defect vector corresponding to the second defect image.

8. The method according to any one of claims 3 or 7, characterized in that: The using a neural network model to perform image processing on the first defect image to obtain a first defect vector corresponding to the first defect image includes: Performing image processing on the first defect image using a first defect semantic extraction model and a first defect morphology extraction model to obtain a first defect vector corresponding to the first defect image; The performing image processing on the second defect image by using a neural network model to obtain a second defect vector corresponding to the second defect image includes: The second defect image is processed by using a second defect semantic extraction model and a second defect morphology extraction model to obtain a second defect vector corresponding to the second defect image.

9. An electronic device, characterized in that: The electronic device comprises a memory and a processor, the memory is used to store a computer program, and the processor is used to execute the computer program to implement the method according to any one of claims 1 to 8.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium is used to store a computer program, and the computer program is used to implement the method according to any one of claims 1 to 8 when executed by a processor.

Citation Information

Cited By

  • Method and apparatus for detecting defect type of image, electronic device, and storage medium

    WO2026129806A1