PCB welding defect detection method, device and storage medium

Pixel-level segmentation and feature extraction are performed in welding defect detection through pixel classifiers and prior knowledge, which solves the problems of abnormal solder filling and false alarms in pin out-of-board defect detection in automatic optical inspection, and improves detection accuracy.

CN113506243BActive Publication Date: 2024-09-06UNITED AUTOMOTIVE ELECTRONICS SYST
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202110622967.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-06-04
Publication Date
2024-09-06
Estimated Expiration
2041-06-04

AI Technical Summary

Technical Problem

Existing automatic optical inspection technology is prone to false alarms in the detection of abnormal solder filling and pin out-of-board defects, resulting in inaccurate detection results.

Method used

Using a pixel classifier combined with prior knowledge, by obtaining the detection point image and performing pixel-level segmentation, manual features are extracted and input into the defect detection picture classifier to improve detection accuracy.

Benefits of technology

It effectively organizes the areas of concern during the inspection process, improves the detection accuracy of solder filling abnormalities and pin out-of-board defects, and reduces the false alarm rate.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113506243B
    Figure CN113506243B
Patent Text Reader

Abstract

The present application discloses a PCB welding defect detection method, device and storage medium, and relates to the field of automatic detection technology. The PCB welding defect detection method comprises: obtaining a detection point image; inputting the detection point image into a pixel classifier to obtain a pixel-level segmentation result corresponding to the detection point image; the pixel-level segmentation result is used to indicate the boundary of the pad and the abnormal filling area in the detection point image, and the area where the pin is located; the pixel-level classifier introduces prior knowledge during the construction process; according to the pixel-level segmentation result corresponding to the detection point image and the defect detection image classifier, the defect discrimination information of the detection point is obtained, and the defect discrimination information includes the product identification result; the problem that the abnormal solder filling defect and the pin-on-board defect are prone to false alarms during the current automatic detection of PCB is solved; the effect of improving the accuracy of defect detection is achieved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of automatic detection technology, and in particular to a PCB welding defect detection method, device and storage medium. Background Art

[0002] With the continuous development of science and technology and economy, people's demand for electronic products is increasing, and the application of PCB (printed circuit board) products is becoming more and more extensive.

[0003] The processing procedures of PCB products usually involve the reflow soldering process of SMD components and the selective wave soldering process of discrete plug-in components. After soldering, in order to ensure the quality of PCB products, the soldered PCB products need to be inspected. At present, AOI (Automated Optical Inspection) has replaced most manual inspections. AOI equipment is usually used on the production line to detect possible soldering defects, such as: warped feet, missing parts, bridging, reversed stickers, etc. Traditional AOI equipment suppliers, such as Traditional machine vision inspection technology will be used, and manual features will be used extensively as the basis for inspection.

[0004] In the automated defect detection of selective soldering, there are two types of soldering defects that are difficult for machines to understand. One is abnormal solder filling (solder skips), and the other is pin not over component. That is, the machine's focus area is unstable when detecting these two defects. For these two defects, the machine's detection results are prone to false alarms. Summary of the invention

[0005] In order to solve the problems in the related art, the present application provides a PCB welding defect detection method, device and storage medium. The technical solution is as follows:

[0006] In a first aspect, an embodiment of the present application provides a PCB welding defect detection method, the method comprising:

[0007] Acquire detection point image;

[0008] The detection point image is input into the pixel classifier to obtain the pixel-level segmentation result corresponding to the detection point image; the pixel-level segmentation result is used to indicate the boundaries of the pins, pads and filling abnormal areas in the detection point image, and the area where the background is located; the pixel classifier introduces prior knowledge during the construction process;

[0009] According to the pixel-level segmentation result corresponding to the detection point image and the defect detection picture classifier, the defect discrimination information of the detection point is obtained, and the defect discrimination information includes the product recognition result.

[0010] By acquiring the detection point image, the detection point image is input into the pixel classifier to obtain the pixel-level segmentation result corresponding to the detection point image, and the defect discrimination information of the detection point is obtained according to the pixel-level segmentation result corresponding to the detection point image and the defect detection picture classifier; the pixel classifier introduces prior knowledge in the construction process, regularizes the focus area of ​​the detection point image in the detection process, and solves the problem of false alarms of abnormal solder filling defects and pin-through-board defects during the current automated PCB detection; the effect of improving the accuracy of defect detection is achieved.

[0011] Optionally, before inputting the detection point image into the pixel classifier, the method further includes:

[0012] Obtain sample detection point images;

[0013] Manually annotate the sample detection point image to obtain annotated samples corresponding to the sample detection point image;

[0014] Generate pixel-level segmentation results corresponding to the sample detection point image according to the labeled sample corresponding to the sample detection point image;

[0015] Build a semantic segmentation network model;

[0016] Based on the sample detection point image and the pixel-level segmentation results corresponding to the sample detection point image, the semantic segmentation network model is trained to obtain a pixel classifier.

[0017] Optionally, when the defect type of the inspection point corresponding to the sample inspection point image is abnormal solder filling, the annotated samples include samples annotated with pins, samples annotated with pads, and samples annotated with abnormal filling areas;

[0018] When the defect type of the inspection point corresponding to the sample inspection point image is that the pin does not pass the board, the marked sample includes a sample of the marked pin.

[0019] Optionally, the semantic segmentation network model includes an encoding module, an embedding module, and a decoding module. The input of the encoding module is the detection point image. The encoding module has n encoding outputs, and an embedding module is arranged between each encoding output and the decoding module. n is a positive integer, 2 n Not larger than the size of the detection point image;

[0020] In the decoding module, n coded outputs are up-convolved respectively; the i-th coded output is up-convolved i times, i = 1, 2, ..., n;

[0021] The output of the decoding module is the pixel-level segmentation result;

[0022] Among them, each embedding module includes two cascaded embedding blocks, and each embedding block includes a pixel convolution layer, a batch normalization layer, and a non-linear activation layer in sequence.

[0023] Optionally, the processing performed by the encoding module on the detection point image includes Max Pooling processing, Conv processing, and Bottleneck processing.

[0024] Optionally, the processing performed by the decoding module is up-convolution processing, Conv processing, Softmax processing, and Argmax processing in sequence.

[0025] Optionally, the processing performed by the decoding module is up-convolution processing, Conv processing, and Softmax processing in sequence.

[0026] Optionally, the defect discrimination result of the detection point is obtained according to the pixel-level segmentation result corresponding to the detection point graphic and the defect detection image classifier, including:

[0027] Extracting manual features based on the pixel-level segmentation results corresponding to the detection point image, the manual features at least include aperture size, imaging algorithm category, number of pixels in the predicted pin area, outer perimeter of the predicted pin area convex hull area, roundness of the predicted pin area, number of pixels in the predicted pad and filling abnormal area boundary, divergence angle of the predicted pad and filling abnormal area, skewness of image pixel grayscale distribution, image foreground ratio, and pin normal extension feature;

[0028] Input the manual features into the defect detection image classifier to obtain the defect discrimination information of the detection point;

[0029] Among them, the pin normal expansion feature is the difference between the grayscale median value in the expanded area and the maximum grayscale value in the pin area after the pin is expanded by K pixels along the outer contour normal in the pixel-level segmentation result.

[0030] Optionally, before inputting the manual features into the defect detection image classifier to obtain defect discrimination information of the detection point, the method further includes:

[0031] Extracting sample manual features according to the pixel-level segmentation results corresponding to the sample detection point image and the meta-information of the sample detection point image;

[0032] Design a defect detection image classifier based on sample manual features and manual experience.

[0033] Optionally, before inputting the manual features into the defect detection image classifier to obtain defect discrimination information of the detection point, the method further includes:

[0034] Extracting sample manual features according to the pixel-level segmentation results corresponding to the sample detection point image and the meta-information of the sample detection point image;

[0035] Build a defect detection classification model;

[0036] The defect detection classification model is trained based on the sample manual features and the product recognition results of the sample inspection points to obtain the defect detection image classifier.

[0037] Optionally, before obtaining defect discrimination information of the detection point according to the pixel-level segmentation result corresponding to the detection point image and the defect detection picture classifier, the method further includes:

[0038] Obtaining a sample detection point image and a pixel-level segmentation result corresponding to the sample detection point image;

[0039] Build a defect detection classification model;

[0040] The defect detection classification model is trained based on the pixel-level segmentation results corresponding to the sample detection point images and the product recognition results of the sample detection points to obtain a defect detection image classifier.

[0041] In a second aspect, an embodiment of the present application provides a PCB welding defect detection device, the device comprising:

[0042] An image acquisition module is used to acquire images of detection points;

[0043] The segmentation module is used to input the detection point image into the pixel classifier to obtain the pixel-level segmentation result corresponding to the detection point image; the pixel-level segmentation result is used to indicate the boundary of the pad and the filling abnormal area in the detection point image, and the area where the pin is located; the pixel classifier introduces prior knowledge in the construction process;

[0044] The discrimination module is used to obtain defect discrimination information of the detection point according to the pixel-level segmentation result corresponding to the detection point image and the defect detection picture classifier, and the defect discrimination information includes the product recognition result.

[0045] In a third aspect, an embodiment of the present application provides a PCB welding defect detection device, which includes a processor and a memory; a program is stored in the memory, and the program is loaded and executed by the processor to implement the method shown in the first aspect above.

[0046] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, in which a program is stored. The program is loaded and executed by a processor to implement the method shown in the first aspect above. BRIEF DESCRIPTION OF THE DRAWINGS

[0047] In order to more clearly illustrate the specific implementation methods of the present application or the technical solutions in the prior art, the drawings required for use in the specific implementation methods or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some implementation methods of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0048] Figure 1 , Figure 2 , Figure 3 is the detection point image sample;

[0049] Figure 4 It is a flow chart of a PCB welding defect detection method provided in an embodiment of the present application;

[0050] Figure 5 It is a PCB picture sample;

[0051] Figure 6 , Figure 7 , Figure 8 It is the annotated sample after being annotated by experts;

[0052] Fig. 9 It is a PCB picture sample;

[0053] Fig.10 It is the annotated sample after being annotated by experts;

[0054] Fig.11 It is a PCB picture sample;

[0055] Fig.12 It is a visualization picture of a pixel-level segmentation result provided in an embodiment of the present application;

[0056] Fig.13 It is a PCB picture sample;

[0057] Fig.14 It is a visualization picture of a pixel-level segmentation result provided in an embodiment of the present application;

[0058] Fig.15 It is a structural diagram of a semantic segmentation network model provided in one embodiment of the present application;

[0059] Fig.16 is a structural diagram of a semantic segmentation network model provided by another embodiment of the present application;

[0060] Fig.17 It is a PCB picture sample;

[0061] Fig.18 is a schematic diagram of defect identification information provided by an embodiment of the present application;

[0062] Fig.19 It is a block diagram of a PCB welding defect detection device provided in an embodiment of the present application;

[0063] Fig. 20 It is a structural block diagram of a PCB welding defect detection device provided in an embodiment of the present application. DETAILED DESCRIPTION

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

[0065] In the description of the present application, it should be noted that the terms "center", "upper", "lower", "left", "right", "vertical", "horizontal", "inner", "outer", etc., indicating the orientation or positional relationship, are based on the orientation or positional relationship shown in the drawings, and are only for the convenience of describing the present application and simplifying the description, rather than indicating or implying that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore cannot be understood as limiting the present application. In addition, the terms "first", "second", and "third" are used for descriptive purposes only, and cannot be understood as indicating or implying relative importance.

[0066] In the description of this application, it should be noted that, unless otherwise clearly specified and limited, the terms "installed", "connected", and "connected" should be understood in a broad sense, for example, it can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection or an electrical connection; it can be a direct connection, or it can be indirectly connected through an intermediate medium, it can also be the internal connection of two components, it can be a wireless connection, or it can be a wired connection. For ordinary technicians in this field, the specific meanings of the above terms in this application can be understood according to specific circumstances.

[0067] In addition, the technical features involved in the different embodiments of the present application described below can be combined with each other as long as they do not conflict with each other.

[0068] When using automatic optical detection combined with deep learning to detect PCB selective soldering defects, for solder skips and pin not over component defects, the machine's identification of the focus area on the image is unstable due to the influence of imaging factors (such as light), which can easily lead to misjudgment. In order to improve the accuracy of the results of PCB automatic optical detection, the PCB soldering defect detection method provided in the embodiment of the present application introduces the prior knowledge of experts in the detection.

[0069] In the PCB selective soldering scenario, for abnormal solder filling defects and pin-not-crossing defects, the judgment method of experts during manual inspection is as follows:

[0070] 1. Abnormal solder filling defects

[0071] In the detection of abnormal solder filling defects, it is difficult to define the scope of the abnormal filling area. In actual samples of such defects, many of them are pins that pass through the board normally, but there are some areas where the solder filling is insufficient.

[0072] Figure 1 The image sample corresponding to a certain detection point on the PCB board is shown. The defect type of this detection point is a filling abnormality defect. Figure 1 , the pads all appear as arc-shaped brighter areas, and area 11 is the area for solder filling and replenishment.

[0073] When performing manual inspection, experts will first observe whether there is an obvious arc-shaped highlight area in the image, and then determine whether there is a crescent-shaped shadow area inside the arc-shaped highlight area. If there is a crescent-shaped shadow area, they will determine whether the inspection point has an abnormal filling defect based on the shape and size of the crescent-shaped shadow area and other characteristics.

[0074] 2. The pins do not pass through the board

[0075] In the detection of pin-not-through-board defects, it is difficult to define the pin area.

[0076] Figure 2 and Figure 3 These are the pictures actually collected during the PCB inspection process. Figure 2 This is a sample image corresponding to a certain detection point on the PCB board. Figure 3 This is a sample image corresponding to a certain detection point on the PCB board. Figure 2 The detection point in the middle actually has the defect that the pin does not pass the board. Figure 3 The inspection point in the figure does not actually have the defect of pin not passing through the board, but is mistakenly reported by the machine as having the defect of pin not passing through the board. Figure 2As shown in the figure, the solder pad is overfilled with tin, the pin does not pass through the board, but scattered highlight areas can be seen in the center of the solder pad; Figure 3 As shown in the figure, the pins have passed through the board, but the pixel grayscale of the pins is not much different from the grayscale of the surrounding tin, showing the characteristics of partial adhesion in the picture.

[0077] When the experts conduct manual inspection, they will first try their best to identify the pin part in the picture, and then determine whether there are any defects such as pins not passing through the board.

[0078] Since the results of expert manual inspection for abnormal solder filling and pin failure are more accurate, when using automatic optical inspection combined with deep learning to detect PCB selective soldering defects, it is expected that the machine's focus area on the image during the judgment process is infinitely close to the focus area on the image during expert manual inspection.

[0079] Please refer to Figure 4 , which shows a flow chart of a PCB welding defect detection method provided by an embodiment of the present application, the method at least comprises the following steps:

[0080] In step 101, a detection point image is acquired.

[0081] In the PCB packaging production line, the inspection equipment takes pictures of the PCB according to the predetermined imaging algorithm. The PCB pictures are used to detect whether there are welding defects at the inspection points.

[0082] Optionally, the PCB image is taken by an AOI device, the PCB image taken by the AOI device is stored in a res file, and the PCB image is obtained from the res file; the res file also includes meta information of the PCB image.

[0083] The PCB image includes the inspection points and the areas outside the inspection points.

[0084] Optionally, obtain a detection point image from the PCB image. One detection point image corresponds to one detection point on the PCB.

[0085] Optionally, the detection point image is a grayscale image.

[0086] In step 102, the detection point image is input into a pixel classifier to obtain a pixel-level segmentation result corresponding to the detection point image.

[0087] The pixel-level segmentation results are used to indicate the boundaries of pads and filling anomaly areas and the areas where pins are located in the detection point image.

[0088] The pixel-level segmentation results also include the background.

[0089] The pads and filling abnormal area boundaries and pins in the pixel-level segmentation results are the areas of interest for machine judgment.

[0090] In the process of soldering defect detection on PCB, the pixel-level segmentation results help stabilize the image focus areas involved in the machine identification process, such as the hot spots in the heat map.

[0091] Since the boundaries of the highlighted pad area and the abnormal filling area represented by the shadow area in the detection point image are usually easier to identify, the boundaries of the pad and the abnormal filling area are taken as the recognition targets.

[0092] The pixel-level segmentation result corresponding to each detection point image is a mask of the same size as the detection point image. Each pixel on the mask is predicted by the pixel classifier to have a label value, and a label value corresponds to a label type. For example, the label value 1 corresponds to the pin, the label value 2 corresponds to the pad and the boundary of the filling abnormal area, and the label value 0 corresponds to the background.

[0093] The pixel classifier introduces the prior knowledge of experts (technicians) during the construction process; the pixel-level segmentation result corresponding to the detection point image obtained by the pixel classifier is closer to the focus area during the expert manual judgment.

[0094] In step 103, defect discrimination information of the detection point is obtained according to the pixel-level segmentation result corresponding to the detection point image and the defect detection picture classifier, and the defect discrimination information includes the product recognition result.

[0095] The defect detection image classifier performs defect discrimination based on the pixel-level segmentation results corresponding to the detection point image and outputs the product recognition result, which is either a good product or a defective part.

[0096] Optionally, the defect identification information includes product recognition results and pixel-level segmentation results.

[0097] In summary, the PCB welding defect detection method provided in the embodiment of the present application obtains a PCB image, obtains a detection point image from the PCB image, inputs the detection point image into a pixel classifier, obtains a pixel-level segmentation result corresponding to the detection point image, and obtains defect discrimination information of the detection point according to the pixel-level segmentation result corresponding to the detection point image and the defect detection image classifier; the pixel classifier introduces prior knowledge in the construction process, regularizes the focus area of ​​the detection point image in the detection process, and solves the problem that abnormal solder filling defects and pin-out defects are prone to false alarms during the current automated detection of PCBs; the effect of improving the accuracy of defect detection is achieved.

[0098] Before using a pixel classifier and a defect detection image classifier to perform defect detection on a PCB, the PCB welding defect detection method further includes designing a pixel classifier and a defect detection image classifier, wherein the pixel classifier is designed before the defect detection image classifier, and the design parameters of the defect detection image classifier are determined based on the output result of the pixel classifier.

[0099] 1. Design of pixel classifier

[0100] Based on Figure 1 In an optional embodiment of the illustrated embodiment, before the detection point image is input into the pixel classifier, a pixel classifier needs to be designed, that is, before step 101, the method further includes the following steps:

[0101] In step 201, a sample detection point image is obtained.

[0102] Select several sample PCB images corresponding to the detection points with abnormal solder filling defects and several sample PCB images corresponding to the detection points with the defect of pins not passing through the board, and record the sample PCB images corresponding to the detection points with abnormal solder filling defects as SP images, and record the sample PCB images corresponding to the detection points with the defect of pins not passing through the board as WP images.

[0103] Get sample detection point images from SP images and WP images.

[0104] In step 202, the sample detection point image is manually annotated to obtain an annotated sample corresponding to the sample detection point image.

[0105] Experts manually annotate the sample detection point images in detail, mark the pins, pads and filling abnormal areas in the sample detection point images corresponding to the SP images, and mark the pins in the sample detection point images corresponding to the WP images.

[0106] When the defect type of the inspection point corresponding to the sample inspection point image is abnormal solder filling, the annotated samples include samples of annotated pins, samples of annotated pads, and samples of annotated filling abnormal areas; that is, for SP images, there are three annotated samples after expert annotation, corresponding to pins, pads, and filling abnormal areas, respectively.

[0107] When the defect type of the inspection point corresponding to the sample inspection point image is that the pin does not pass the board, the annotated sample includes a sample of the annotated pin; that is, for the WP image, there is one annotated sample after expert annotation, which corresponds to the pin.

[0108] In one example, Figure 5 is an SP picture, the framed portion 51 in the SP picture is the sample detection point image, and the labeled sample after expert labeling is as follows Figure 6 , Figure 7 , Figure 8As shown, Figure 6 This is a sample with the pins marked. Figure 7 To mark the pads, Figure 8 This is a marked sample after marking and filling the abnormal area.

[0109] In another example, Fig. 9 is a WP picture. The framed part 61 in the WP picture is the sample detection point image. The labeled sample after expert annotation is as follows Fig.10 As shown, Fig.10 This is the marked sample after the pins are marked.

[0110] In step 203, a pixel-level segmentation result corresponding to the sample detection point image is generated according to the labeled sample corresponding to the sample detection point image.

[0111] For the detection point image corresponding to the SP picture, the pixel-level segmentation result corresponding to the detection point image is generated according to the three labeled samples obtained after labeling.

[0112] For the detection point image corresponding to the WP picture, a pixel-level segmentation result corresponding to the detection point image is generated according to a labeled sample obtained after labeling.

[0113] For SP images, the annotation of the filling abnormal area depends heavily on the subjective judgment of experts, and there is a lot of noise in the annotation area. In the detection point image, the boundaries of the highlighted pads and the boundaries of the filling abnormal area represented by the shadow area are easier to identify. The boundaries of the pads and the boundaries of the filling abnormal area have obvious semantic features. Therefore, in order to reduce the impact of annotation noise on the pixel classifier, the boundaries of the pads and the boundaries of the filling abnormal area annotated by experts are regarded as one type of area.

[0114] When designing a pixel classifier, the target areas that the network model corresponding to the pixel classifier needs to learn are divided into two categories, one is the boundary of the pad and the boundary of the abnormal filling area, and the other is the pin.

[0115] Optionally, an image processing method is used to extract the boundaries of the pads and the boundaries of the abnormal filling areas in the annotated sample.

[0116] Image processing methods are used to extract the semantic parts of expert annotations, reducing the impact of annotation noise on subsequent semantic segmentation network model training.

[0117] In one example, Fig.11 For SP pictures, Fig.12 for Fig.11 Visualization of the pixel-level segmentation results corresponding to the sample detection point image in , area 13 represents the boundary between the pad area and the filling abnormal area, and area 14 represents the pin area; in another example, Fig.13 For SP pictures, Fig.14 for Fig.13 A visualization of the pixel-level segmentation results corresponding to the sample detection point image. Region 15 represents the boundary between the pad area and the filling abnormality area, and region 16 represents the pin area.

[0118] In step 204, a semantic segmentation network model is constructed.

[0119] It should be noted that step 204 may also be performed before step 201, and this embodiment of the present application does not limit this.

[0120] In one example, the semantic segmentation network model includes an encoding module, an embedding module, and a decoding module; the input of the encoding module is a detection point image, the encoding module has n encoding outputs, and an embedding module is set between each encoding output and the decoding module, such as Fig.15 As shown; n is a positive integer, 2 n Not larger than the size of the detection point image.

[0121] The size of the feature map output by each encoder is different.

[0122] In the upconvolution module, n coded outputs are upconvolved respectively. After each coded output is upconvolved, an upconvolution result is obtained. The i-th coded output is upconvolved i times, i = 1, 2, ..., n.

[0123] The encoded output after upconvolution is a feature map of the same size.

[0124] The output of the decoding module is the pixel-level segmentation result.

[0125] Among them, each embedding module includes two cascaded embedding blocks, and each embedding block includes a pixel convolution layer, a batch normalization layer, and a non-linear activation layer in sequence.

[0126] Through the embedding module, the description ability of the semantic segmentation network model is increased.

[0127] The processing performed by the encoding module on the detection point image includes Max Pooling processing, Conv processing, and Bottleneck processing.

[0128] Optionally, the processing performed by the decoding module is up-convolution processing, Conv processing, Softmax processing, and Argmax processing in sequence.

[0129] Optionally, the processing performed by the decoding module is up-convolution processing, Conv processing, and Softmax processing in sequence.

[0130] In an example, taking n=6, the processing performed by the decoding module is up-convolution processing, Conv processing, Softmax processing, and Argmax processing in sequence, and the structure of the semantic segmentation network model is as follows: Fig.16 As shown, the encoding module processes the detection point image in the following order: Max Pooling, Conv, Max Pooling, Bottleneck, Max Pooling, Bottleneck, Max Pooling, Bottleneck, Max Pooling, Bottleneck, Max Pooling, Bottleneck, Max Pooling, Bottleneck. The Conv processing outputs the first encoded output, and each subsequent Bottleneck processing outputs an encoded output. The sizes of the up-convolution results #1 to #6 are the same.

[0131] In another example, the semantic segmentation network model is a Unet network model.

[0132] In step 205, based on the sample detection point image and the pixel-level segmentation results corresponding to the sample detection point image, a semantic segmentation network model is trained to obtain a pixel classifier.

[0133] The input of the pixel classifier is the detection point image, and the output of the pixel classifier is the pixel-level segmentation result.

[0134] The sample detection point image and the pixel-level segmentation results corresponding to the sample detection point image are used as sample data to train the semantic segmentation network model, and the parameters of the semantic segmentation network model are determined, so as to obtain a pixel classifier.

[0135] 2. Design of defect detection image classifier

[0136] The design of the defect detection image classifier can be implemented in the following three ways:

[0137] (1) Method 1: Extract manual features based on the pixel-level segmentation results corresponding to the sample detection point image and the meta-information of the sample detection point image, and design a defect detection image classifier based on the manual features and manual experience. The specific steps are as follows:

[0138] In step 301, sample manual features are extracted according to the pixel-level segmentation results corresponding to the sample detection point images and the meta-information of the sample detection point images.

[0139] Obtain a sample detection point image, and use the designed pixel classifier to obtain the pixel-level segmentation result corresponding to the sample detection point image.

[0140] It should be noted that the sample detection point images used to design a defect detection picture classifier may be different from the sample detection point images used to design a pixel classifier.

[0141] The manual features include at least aperture size, imaging algorithm category, number of pixels in the predicted pin area, outer perimeter of the convex hull area of ​​the predicted pin area, roundness of the predicted pin area, number of pixels in the boundary of the predicted pad and the filling abnormal area, divergence angle of the predicted pad and the filling abnormal area, skewness of the grayscale distribution of image pixels, foreground ratio of the image, and pin normal extension features.

[0142] The predicted pin region refers to the region annotated as a pin in the pixel-level result label.

[0143] Automatically obtain the sample manual features from the pixel-level segmentation results corresponding to the sample detection point image; the manual features corresponding to the sample detection point image are the sample manual features

[0144] The meta information of the detection point image is obtained from the res file corresponding to the detection point.

[0145] Optionally, get the aperture size from the original res file corresponding to the detection point image.

[0146] Optionally, obtain the imaging algorithm category from the original res file corresponding to the detection point image.

[0147] Optionally, the number of pixels in the predicted pin area, the outer perimeter of the convex hull area of ​​the predicted pin area, the roundness of the predicted pin area, the number of pixels in the boundary part of the predicted pad and the filled abnormal area, the divergence angle of the predicted pad and the filled abnormal area, and the skewness of the grayscale distribution of the image pixels are obtained from the pixel-level segmentation results.

[0148] Optionally, the foreground ratio of the image is the foreground ratio after the image is binarized using the big law.

[0149] Optionally, obtain the pin normal extension feature (ddMedian) from the pixel-level segmentation result.

[0150] In the inspection point image corresponding to the inspection point with normal welding, there will be a circle of shadow area around the pin. This shadow area is formed under the illumination of light after the solder is wrapped in a cone shape along the pin. Based on this prior knowledge, the pin normal extension feature is introduced in the manual feature.

[0151] The pin normal expansion feature is the difference between the grayscale median value in the expanded area and the maximum grayscale value in the pin area after the pin is expanded by K pixels along the outer contour normal in the pixel-level segmentation result. K is a positive integer.

[0152] The extended area is defined by boundary 1 and boundary 2, where boundary 1 is the outer contour of the pin, and boundary 2 is the position where the pin is extended by K pixels along the normal direction of the outer contour.

[0153] If the solder wraps the pin normally to form a circle of shadow, the pin normal extension feature will be a relatively small negative number. For the pin normal extension feature, a threshold is selected to determine whether the pin activation area is a real pin or a false activation.

[0154] Pin area misactivation means that in the pixel-level segmentation result, a certain area indicated as a pin corresponds to a position on the PCB that is not a real pin.

[0155] Combined with the expert's prior knowledge, setting the pin normal extension feature can effectively prevent the impact of false activation of the pin area on defect identification.

[0156] In step 302, a defect detection image classifier is designed based on sample manual features and manual experience.

[0157] Without using a deep learning algorithm, the parameters of the defect detection image classifier are directly designed according to the manual features of the samples and manual experience to obtain the defect detection image classifier.

[0158] (2) Method 2: Extract manual features based on the pixel-level segmentation results corresponding to the sample inspection point image and the meta-information of the sample inspection point image, and use the manual features and the product recognition results of the sample inspection point to train a defect detection image classifier based on a deep learning algorithm. The specific steps are as follows:

[0159] In step 401, sample manual features are extracted according to the pixel-level segmentation results corresponding to the sample detection point images and the meta information of the sample detection point images.

[0160] This step has been described in the above step 301 and will not be repeated here.

[0161] In step 402, a defect detection classification model is constructed.

[0162] Optionally, build a defect detection classification model based on a deep learning algorithm.

[0163] It should be noted that step 402 may also be performed before step 401, and this embodiment of the present application does not limit this.

[0164] In step 403, a defect detection classification model is trained based on the sample manual features and the product recognition results of the sample inspection points to obtain a defect detection image classifier.

[0165] The input of the defect classifier is the manual features, and the output is the product recognition result.

[0166] The product identification result is good or defective.

[0167] The product identification result of the sample testing point is known, and the product identification result of the sample testing point is the actual defect situation of the product.

[0168] The sample manual features and the product recognition results of the sample inspection points are used as sample data to train the defect detection classification model, and the parameters of the defect detection classification model are obtained, that is, the defect detection image classifier is obtained.

[0169] (3) Method 3: Based on the pixel-level segmentation results corresponding to the sample inspection point image and the product recognition results of the sample inspection point, a defect detection image classifier is trained based on a deep learning algorithm. The specific steps are as follows:

[0170] In step 501, a sample detection point image and a pixel-level segmentation result corresponding to the sample detection point image are obtained.

[0171] Get sample detection point images.

[0172] It should be noted that the sample detection point images used to design a defect detection picture classifier may be different from the sample detection point images used to design a pixel classifier.

[0173] Using the designed pixel classifier, the pixel-level segmentation results corresponding to the sample detection point image are obtained.

[0174] In step 502, a defect detection classification model is constructed.

[0175] Optionally, build a defect detection image classifier based on a deep learning algorithm.

[0176] It should be noted that step 502 may also be performed before step 501, and this embodiment of the present application does not limit this.

[0177] In step 503, a defect detection classification model is trained based on the pixel-level segmentation results corresponding to the sample detection point images and the product recognition results of the sample detection points to obtain a defect detection image classifier.

[0178] The input of the defect detection image classifier is the pixel-level segmentation result, and the output is the product recognition result.

[0179] The product identification result is good or defective.

[0180] The pixel-level segmentation results corresponding to the sample detection point images and the product recognition results of the sample detection points are used as sample data to train the defect detection classification model, and the parameters of the defect detection classification model are obtained, that is, the defect detection image classifier is obtained.

[0181] Based on Figure 1 In an optional embodiment of the illustrated embodiment, when executing step 103, that is, executing the step of "obtaining defect discrimination information of the detection point according to the pixel-level segmentation result corresponding to the detection point image and the defect detection image classifier, wherein the defect discrimination information includes a product identification result", the defect detection image classifier used is designed using the above-mentioned method 1, method 2 or method 3.

[0182] If the defect detection image classifier is designed using method 1 or method 2, the above step 103 can be implemented as follows:

[0183] In step 1031, manual features are extracted based on the pixel-level segmentation results corresponding to the detection point image and the meta-information corresponding to the detection point image.

[0184] The manual features include at least aperture size, imaging algorithm category, number of pixels in the predicted pin area, outer perimeter of the convex hull area of ​​the predicted pin area, roundness of the predicted pin area, number of pixels in the boundary of the predicted pad and the filling abnormal area, divergence angle of the predicted pad and the filling abnormal area, skewness of the grayscale distribution of image pixels, foreground ratio of the image, and pin normal extension features.

[0185] Optionally, the manual labels are automatically extracted using a preset manual feature extraction algorithm.

[0186] This step has been described in the above step 301 and will not be repeated here.

[0187] In step 1032, the manual features are input into the defect detection image classifier to obtain defect discrimination information of the detection point.

[0188] The manual features are input into the defect detection image classifier, and the defect detection image classifier outputs the product recognition result of the detection point, and the defect discrimination information is generated according to the product recognition result.

[0189] Optionally, the defect detection image classifier outputs pixel-level segmentation results of the detection points and product recognition results; the pixel-level segmentation results of the detection points and the product recognition results together constitute the defect discrimination information output by the defect detection image classifier.

[0190] In an example, a PCB image such as Fig.17 As shown in the figure, the framed part in the PCB image is the detection point image 71. After being judged by the pixel classifier and the missing part detection image classifier, the defect judgment information of the detection point is obtained as follows: Fig.18 As shown, the defect discrimination information includes the pixel-level segmentation result 72 and the product recognition result, and the product recognition result is NG (defective part); the defect discrimination information also includes some manual features, such as the pin normal extension feature ( Fig.18 The value of dd in the prediction pin area is -4.3, which indicates the roundness of the pin area. Fig.18 The pin roundness is 0.68.

[0191] exist Fig.17 In the PCB corresponding to the PCB picture shown, the inspection point corresponding to the inspection point image 72 has a pin-through-the-board defect, but due to the uneven solder surface, Fig.17 A strip-like shadow part is presented in the image, which causes some pin activation areas to be mistakenly activated in the pixel-level segmentation result output by the pixel classifier. However, due to the extraction of manual features "pin normal extension feature" and "predicted roundness of pin area", after being judged by the defect detection image classifier, the correct product recognition result (NG) is still output, that is, there is no misjudgment in the machine detection.

[0192] If the defect classifier is designed using method 3, the above step 103 can be implemented as follows:

[0193] In step 1031a, the pixel-level segmentation result corresponding to the detection point image is input into the defect detection image classifier to obtain the defect discrimination information of the detection point.

[0194] The pixel-level segmentation result corresponding to the detection point image is input into the defect detection image classifier, and the defect detection image classifier outputs the defect discrimination information of the detection point.

[0195] Optionally, the defect detection image classifier outputs pixel-level segmentation results of the detection points and product recognition results.

[0196] Fig.19 1 is a block diagram of a PCB welding defect detection device provided by an embodiment of the present application. The device comprises at least the following modules: an image acquisition module 310 , a segmentation module 320 , and a discrimination module 330 .

[0197] An image acquisition module 310 is used to acquire an image of a detection point;

[0198] The segmentation module 320 is used to input the detection point image into the pixel classifier to obtain the pixel-level segmentation result corresponding to the detection point image; the pixel-level segmentation result is used to indicate the boundary of the pad and the filling abnormal area in the detection point image, and the area where the pin is located; the pixel classifier introduces prior knowledge in the construction process;

[0199] The discrimination module 330 is used to obtain defect discrimination information of the detection point according to the pixel-level segmentation result corresponding to the detection point image and the defect detection picture classifier, and the defect discrimination information includes the product recognition result.

[0200] Optionally, the device further comprises a model building module for acquiring a sample detection point image;

[0201] Manually annotate the sample detection point image to obtain annotated samples corresponding to the sample detection point image;

[0202] Generate pixel-level segmentation results corresponding to the sample detection point image according to the labeled sample corresponding to the sample detection point image;

[0203] Build a semantic segmentation network model;

[0204] Based on the sample detection point image and the pixel-level segmentation results corresponding to the sample detection point image, the semantic segmentation network model is trained to obtain a pixel classifier.

[0205] Optionally, when the defect type of the inspection point corresponding to the sample inspection point image is abnormal solder filling, the annotated samples include samples annotated with pins, samples annotated with pads, and samples annotated with abnormal filling areas;

[0206] When the defect type of the inspection point corresponding to the sample inspection point image is that the pin does not pass the board, the marked sample includes a sample of the marked pin.

[0207] Optionally, the semantic segmentation network model includes an encoding module, an embedding module, and a decoding module;

[0208] The input of the encoding module is the detection point image. The encoding module has n encoding outputs. An embedding module is set between each encoding output and the up-convolution module. n is a positive integer, 2 n Not larger than the size of the detection point image;

[0209] In the decoding module, the n coded outputs are up-convolved respectively; the i-th coded output is up-convolved i times, i = 1, 2, ..., n;

[0210] The output of the decoding module is the pixel-level segmentation result;

[0211] Among them, each embedding module includes two cascaded embedding blocks, and each embedding block includes a pixel convolution layer, a batch normalization layer, and a non-linear activation layer in sequence.

[0212] Optionally, the processing performed by the encoding module on the detection point image includes Max Pooling processing, Conv processing, and Bottleneck processing.

[0213] Optionally, the processing performed by the decoding module is up-convolution processing, Conv processing, Softmax processing, and Argmax processing in sequence.

[0214] Optionally, the processing performed by the decoding module is up-convolution processing, Conv processing, and Softmax processing in sequence.

[0215] Optionally, a discrimination module is used to extract manual features based on the pixel-level segmentation results corresponding to the detection point image and the meta-information of the detection point image, the manual features at least including aperture size, imaging algorithm category, number of pixels in the predicted pin area, outer perimeter of the convex hull area of ​​the predicted pin area, roundness of the predicted pin area, number of pixels in the boundary part of the predicted pad and the filling abnormal area, divergence angle of the predicted pad and the filling abnormal area, skewness of the grayscale distribution of image pixels, foreground ratio of the image, and pin normal extension feature;

[0216] Input the manual features into the defect detection image classifier to obtain the defect discrimination information of the detection point;

[0217] Among them, the pin normal expansion feature is the difference between the grayscale median value in the expanded area and the maximum grayscale value in the pin area after the pin is expanded by K pixels along the outer contour normal in the pixel-level segmentation result.

[0218] Optionally, the device further comprises a model building module;

[0219] A model building module is used to extract sample manual features according to the pixel-level segmentation results corresponding to the sample detection point image and the meta information of the sample detection point image;

[0220] Design a defect detection image classifier based on sample manual features and manual experience.

[0221] Optionally, the device further comprises a model building module;

[0222] A model building module is used to extract sample manual features according to the pixel-level segmentation results corresponding to the sample detection point image and the meta information of the sample detection point image;

[0223] Build a defect detection classification model;

[0224] The defect detection classification model is trained based on the sample manual features and the product recognition results of the sample inspection points to obtain the defect detection image classifier.

[0225] Optionally, the device further comprises a model building module;

[0226] A model building module is used to obtain a sample detection point image and a pixel-level segmentation result corresponding to the sample detection point image;

[0227] Build a defect detection classification model;

[0228] The defect detection classification model is trained based on the pixel-level segmentation results corresponding to the sample detection point images and the product recognition results of the sample detection points to obtain a defect detection image classifier.

[0229] It should be noted that: the PCB welding defect detection device provided in the above embodiment only uses the division of the above functional modules as an example when performing PCB welding defect detection. In actual applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the PCB welding defect detection device is divided into different functional modules to complete all or part of the functions described above. In addition, the PCB welding defect detection device provided in the above embodiment and the PCB welding defect detection method embodiment belong to the same concept, and the specific implementation process is detailed in the method embodiment, which will not be repeated here.

[0230] Please refer to Fig. 20 , which shows a structural block diagram of a PCB welding defect detection device provided by an exemplary embodiment of the present application. The terminal in the present application may include one or more of the following components: a processor 410 and a memory 420.

[0231] The processor 410 may include one or more processing cores. The processor 410 uses various interfaces and lines to connect various parts of the entire terminal, and executes various functions of the terminal and processes data by running or executing instructions, programs, code sets or instruction sets stored in the memory 420, and calling data stored in the memory 420. Optionally, the processor 410 can be implemented in at least one hardware form of digital signal processing (DSP), field-programmable gate array (FPGA), and programmable logic array (PLA). The processor 410 can integrate one or a combination of a central processing unit (CPU) and a modem. Among them, the CPU mainly processes the operating system and application programs; the modem is used to process wireless communications. It can be understood that the above-mentioned modem may not be integrated into the processor 410, but may be implemented separately through a chip.

[0232] Optionally, the processor 410 implements the PCB welding defect detection method provided by the above-mentioned various method embodiments when executing the program instructions in the memory 420.

[0233] The memory 420 may include a random access memory (RAM) or a read-only memory (ROM). Optionally, the memory 420 includes a non-transitory computer-readable storage medium. The memory 420 may be used to store instructions, programs, codes, code sets, or instruction sets. The memory 420 may include a program storage area and a data storage area, wherein the program storage area may store instructions for implementing an operating system, instructions for at least one function, instructions for implementing the above-mentioned various method embodiments, etc.; the data storage area may store data created according to the use of the terminal, etc.

[0234] It should be noted that the above-mentioned terminal is only schematic. In actual implementation, the terminal may also include fewer or more components. For example, the device also includes a touch screen, a communication component, a sensor component, etc. This embodiment will not limit them one by one here.

[0235] It should be noted that the device for executing steps 101 to 103 is the same device as the device for executing steps 201 to 205, or the device for executing steps 101 to 103 is a different device from the device for executing steps 201 to 205; the device for executing steps 101 to 103 is the same device as the device for executing steps 301 or steps 401 to 403 or steps 501 to 503, or the device for executing steps 101 to 103 is a different device from the device for executing steps 301 or steps 401 to 403 or steps 501 to 503; the embodiments of the present application are not limited to this.

[0236] Optionally, the present application also provides a computer-readable storage medium, in which a program is stored, and the program is loaded and executed by a processor to implement the PCB welding defect detection method of the above method embodiment.

[0237] Optionally, the present application also provides a computer product, which includes a computer-readable storage medium, in which a program is stored, and the program is loaded and executed by a processor to implement the PCB welding defect detection method of the above method embodiment.

[0238] Obviously, the above embodiments are merely examples for the purpose of clear explanation, and are not intended to limit the implementation methods. For those skilled in the art, other different forms of changes or modifications can be made based on the above description. It is not necessary and impossible to list all the implementation methods here. The obvious changes or modifications derived therefrom are still within the scope of protection created by this application.

Claims

1. A PCB welding defect detection method, It is characterized in that The method comprises: Acquire detection point image; The detection point image is input into a pixel classifier to obtain a pixel-level segmentation result corresponding to the detection point image; the pixel-level segmentation result is used to indicate the boundary of the pad and the abnormal filling area in the detection point image, and the area where the pin is located; the pixel classifier introduces prior knowledge during the construction process; Obtaining defect discrimination information of the detection point according to the pixel-level segmentation result corresponding to the detection point image and the defect detection picture classifier, wherein the defect discrimination information includes a product recognition result; The pixel classifier is trained by a semantic segmentation network model, and the semantic segmentation network model includes an encoding module, an embedding module, and a decoding module; The input of the encoding module is the detection point image. The encoding module has n encoding outputs. An embedding module is arranged between each encoding output and the decoding module. n is a positive integer. Not larger than the size of the detection point image; In the decoding module, the n coded outputs are respectively subjected to up-convolution processing; the i-th coded output is subjected to i-times of up-convolution, i=1,2,...,n; The output of the decoding module is a pixel-level segmentation result; Among them, each embedding module includes two cascaded embedding blocks, and each embedding block includes a pixel convolution layer, a batch normalization layer, and a non-linear activation layer in sequence.

2. The method according to claim 1, It is characterized in that Before inputting the detection point image into the pixel classifier, the method further comprises: Obtain sample detection point images; Manually annotating the sample detection point image to obtain an annotated sample corresponding to the sample detection point image; Generate a pixel-level segmentation result corresponding to the sample detection point image according to the labeled sample corresponding to the sample detection point image; Constructing the semantic segmentation network model; Based on the sample detection point image and the pixel-level segmentation result corresponding to the sample detection point image, the semantic segmentation network model is trained to obtain the pixel classifier.

3. The method according to claim 2, It is characterized in that When the defect type of the detection point corresponding to the sample detection point image is abnormal solder filling, the marked sample includes a sample of marked pins, a sample of marked pads, and a sample of marked filling abnormal area; When the defect type of the inspection point corresponding to the sample inspection point image is that the pin does not pass the board, the marked sample includes a sample of the marked pin.

4. The method according to claim 1, It is characterized in that The processing performed by the encoding module on the detection point image includes Max Pooling processing, Conv processing, and Bottleneck processing.

5. The method according to claim 1 or 4, It is characterized in that The processing performed by the decoding module is up-convolution processing, Conv processing, Softmax processing, and Argmax processing in sequence.

6. The method according to claim 1 or 4, It is characterized in that The processing performed by the decoding module is up-convolution processing, Conv processing, and Softmax processing in sequence.

7. The method according to claim 1, It is characterized in that The defect discrimination result of the detection point is obtained according to the pixel-level segmentation result corresponding to the detection point pattern and the defect detection picture classifier, including: Extracting manual features according to the pixel-level segmentation result corresponding to the detection point image and the meta-information of the detection point image, wherein the manual features at least include aperture size, imaging algorithm category, number of pixels in the predicted pin area, outer perimeter of the predicted convex hull area of ​​the pin area, roundness of the predicted pin area, number of pixels in the predicted pad and the filling abnormal area boundary, divergence angle of the predicted pad and the filling abnormal area, skewness of the grayscale distribution of the image pixels, foreground ratio of the image, and pin normal extension feature; Inputting the manual features into the defect detection image classifier to obtain defect discrimination information of the detection point; Among them, the pin normal expansion feature is the difference between the grayscale median value in the expanded area and the maximum grayscale value in the pin area after the pin is expanded by K pixels along the outer contour normal in the pixel-level segmentation result.

8. The method according to claim 7, It is characterized in that Before inputting the manual features into the defect detection image classifier to obtain the defect discrimination information of the detection point, the method further includes: Extracting sample manual features according to the pixel-level segmentation result corresponding to the sample detection point image and the meta information of the sample detection point image; The defect detection image classifier is designed based on the sample manual features and manual experience.

9. The method according to claim 7, It is characterized in that Before inputting the manual features into the defect detection image classifier to obtain the defect discrimination information of the detection point, the method further includes: Extracting sample manual features according to the pixel-level segmentation result corresponding to the sample detection point image and the meta information of the sample detection point image; Build a defect detection classification model; The defect detection classification model is trained based on the sample manual features and the product recognition results of the sample inspection points to obtain the defect detection image classifier.

10. The method according to claim 1, It is characterized in that Before obtaining defect discrimination information of the detection point according to the pixel-level segmentation result corresponding to the detection point image and the defect detection picture classifier, the method further includes: Obtaining a sample detection point image and a pixel-level segmentation result corresponding to the sample detection point image; Build a defect detection classification model; The defect detection classification model is trained based on the pixel-level segmentation results corresponding to the sample detection point images and the product recognition results of the sample detection points to obtain the defect detection image classifier.

11. A PCB welding defect detection device, It is characterized in that The device comprises: An image acquisition module is used to acquire images of detection points; A segmentation module is used to input the detection point image into a pixel classifier to obtain a pixel-level segmentation result corresponding to the detection point image; the pixel-level segmentation result is used to indicate the area where the pad and the filling abnormal area and the boundary of the pin are located in the detection point image; the pixel classifier introduces prior knowledge during the construction process; A discrimination module, used to obtain defect discrimination information of the detection point according to the pixel-level segmentation result corresponding to the detection point image and the defect detection picture classifier, wherein the defect discrimination information includes a product recognition result; The pixel classifier is trained by a semantic segmentation network model, and the semantic segmentation network model includes an encoding module, an embedding module, and a decoding module; The input of the encoding module is the detection point image. The encoding module has n encoding outputs. An embedding module is arranged between each encoding output and the decoding module. n is a positive integer. Not larger than the size of the detection point image; In the decoding module, the n coded outputs are respectively subjected to up-convolution processing; the i-th coded output is subjected to i-times of up-convolution, i=1,2,...,n; The output of the decoding module is a pixel-level segmentation result; Among them, each embedding module includes two cascaded embedding blocks, and each embedding block includes a pixel convolution layer, a batch normalization layer, and a non-linear activation layer in sequence.

12. The device according to claim 11, It is characterized in that The device also includes a model building module for acquiring sample detection point images; Manually annotating the sample detection point image to obtain an annotated sample corresponding to the sample detection point image; Generate a pixel-level segmentation result corresponding to the sample detection point image according to the labeled sample corresponding to the sample detection point image; Build a semantic segmentation network model; Based on the sample detection point image and the pixel-level segmentation result corresponding to the sample detection point image, the semantic segmentation network model is trained to obtain the pixel classifier.

13. The device according to claim 12, It is characterized in that When the defect type of the detection point corresponding to the sample detection point image is abnormal solder filling, the marked sample includes a sample of marked pins, a sample of marked pads, and a sample of marked filling abnormal area; When the defect type of the inspection point corresponding to the sample inspection point image is that the pin does not pass the board, the marked sample includes a sample of the marked pin.

14. The device according to claim 11, It is characterized in that The processing performed by the encoding module on the detection point image includes Max Pooling processing, Conv processing, and Bottleneck processing.

15. The device according to claim 11 or 14, It is characterized in that The processing performed by the decoding module is up-convolution processing, Conv processing, Softmax processing, and Argmax processing in sequence.

16. The device according to claim 11 or 14, It is characterized in that The processing performed by the decoding module is up-convolution processing, Conv processing, and Softmax processing in sequence.

17. The device according to claim 11, It is characterized in that The discrimination module is used to extract manual features according to the pixel-level segmentation result corresponding to the detection point image and the meta-information of the detection point image, wherein the manual features at least include aperture size, imaging algorithm category, number of pixels in the predicted pin area, outer perimeter of the predicted convex hull area of ​​the pin area, roundness of the predicted pin area, number of pixels in the predicted pad and filling abnormal area boundary, divergence angle of the predicted pad and filling abnormal area, skewness of image pixel grayscale distribution, foreground ratio of the image, and pin normal extension feature; Inputting the manual features into the defect detection image classifier to obtain defect discrimination information of the detection point; Among them, the pin normal expansion feature is the difference between the grayscale median value in the expanded area and the maximum grayscale value in the pin area after the pin is expanded by K pixels along the outer contour normal in the pixel-level segmentation result.

18. The device according to claim 17, It is characterized in that The device also includes a model building module; The model building module is used to extract sample manual features according to the pixel-level segmentation results corresponding to the sample detection point image and the meta information of the sample detection point image; The defect detection image classifier is designed based on the sample manual features and manual experience.

19. The device according to claim 17, It is characterized in that The device also includes a model building module; The model building module is used to extract sample manual features according to the pixel-level segmentation results corresponding to the sample detection point image and the meta information of the sample detection point image; Build a defect detection classification model; The defect detection classification model is trained based on the sample manual features and the product recognition results of the sample inspection points to obtain the defect detection image classifier.

20. The device according to claim 11, It is characterized in that The device also includes a model building module; The model building module is used to obtain a sample detection point image and a pixel-level segmentation result corresponding to the sample detection point image; Build a defect detection classification model; The defect detection classification model is trained based on the pixel-level segmentation results corresponding to the sample detection point images and the product recognition results of the sample detection points to obtain the defect detection image classifier.

21. An electronic device, It is characterized in that The electronic device comprises a processor and a memory; a program is stored in the memory, and the program is loaded and executed by the processor to implement the method according to any one of claims 1 to 10.

22. A computer-readable storage medium, It is characterized in that The storage medium stores a program, and the program is loaded and executed by a processor to implement the method according to any one of claims 1 to 10.