Universal PCB gold finger defect detection method, system, equipment and medium

By applying artificial intelligence-based image segmentation and object detection algorithms in PCB gold finger defect detection, the shortcomings of traditional technologies in detection efficiency, robustness and versatility are solved, and efficient and accurate gold finger defect detection is achieved.

CN119131015BActive Publication Date: 2025-04-04SUZHOU HEXIN TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411590601.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-11-08
Publication Date
2025-04-04
Estimated Expiration
2044-11-08

AI Technical Summary

Technical Problem

Traditional machine vision technology has problems such as inefficiency, poor robustness and poor versatility in PCB gold finger defect detection, making it difficult to accurately identify complex and changeable gold finger defects, resulting in a high error detection rate.

Method used

Using an image segmentation algorithm and object detection algorithm based on artificial intelligence, efficient and accurate gold finger detection is achieved through steps such as image acquisition, gold hand designation bits, image cropping, local part cutting, multi-graphic defect detection and result fusion judgment.

Benefits of technology

It improves the versatility and robustness of detection, can be adapted to various types of gold fingers, significantly improves the detection rate of small defects and reduces the false detection rate.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119131015B_ABST
    Figure CN119131015B_ABST
Patent Text Reader

Abstract

The invention discloses a universal PCB gold finger defect detection method, system, device and medium. The method comprises the following steps: calling an image segmentation algorithm based on artificial intelligence to locate a gold finger area in a PCB surface image; calculating the position data of the gold finger area based on a positioning result graph, and cutting the gold finger image according to the position data; dividing the gold finger image into a plurality of local images according to a segmentation parameter; calling a target detection algorithm based on artificial intelligence to perform defect detection on each local image respectively, and obtaining a plurality of local detection results corresponding to the plurality of local images respectively; performing defect restoration and overlapping area comparison on the plurality of local detection results, and outputting a final recognition result according to the defect restoration result and the overlapping area comparison result; the invention can use a segmentation algorithm based on artificial intelligence to efficiently and accurately locate the detection area of ​​the PCB gold finger, improves the versatility, and can adapt to various types of gold fingers.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of industrial machine vision detection technology. Specifically, the present invention is applied to the field of PCB gold finger defect detection, and in particular to a universal PCB gold finger defect detection method, system, equipment and medium. Background Art

[0002] Printed Circuit Board (PCB) is an indispensable component in modern electronic devices, carrying the task of electrical connection and signal transmission between electronic components. Among them, Gold Finger, as a gold-plated column structure at the edge of the PCB connection, plays a key role in connecting the auxiliary PCB to the computer motherboard or other digital communication devices. This design is not only widely used in computer hardware, but also common in consumer electronic products such as smartphones and smart watches, which realize high-speed and stable digital signal communication through Gold Finger.

[0003] In the production process of PCB, the quality of the gold finger part is directly related to the reliability and durability of the entire circuit board. Therefore, strict defect detection of gold fingers is an important part of ensuring product quality. Common defect types include scratches, dents, short circuits, oxidation, etc. These defects may cause poor electrical connections, signal transmission errors and even equipment failures.

[0004] In traditional solutions, gold finger defect detection mainly relies on manual quality inspection combined with traditional machine vision algorithms. However, manual quality inspection is inefficient and difficult to meet the needs of large-scale production. At the same time, traditional machine vision algorithms have limitations in detection accuracy and robustness. It is often difficult to accurately identify complex and changeable gold finger defects, resulting in a high false detection rate.

[0005] In addition, there are many types of gold fingers, and parameters such as shapes, sizes, and gold plating thickness vary, which further increases the complexity of detection. Traditional machine vision algorithms need to design different detection algorithms for different categories of gold fingers, which lack versatility and lead to low detection efficiency. Even in the same category of gold fingers, due to slight differences in the production process, it may be necessary to adjust the algorithm parameters to adapt to different detection needs. For example, when locating the gold finger part, it is necessary to design specific mark recognition algorithms, which are often sensitive to noise data and easily affected by image quality. In the defect detection stage, it is also necessary to design different detection algorithms for different defect categories, which not only increases the complexity of the algorithm, but also reduces the versatility and flexibility of the system.

[0006] In summary, traditional machine vision technology has problems such as low efficiency, poor robustness, and low versatility in PCB gold finger defect detection. Summary of the invention

[0007] The object of the present invention is to provide a universal PCB gold finger defect detection method, system, device and medium, thereby solving all or one of the above-mentioned problems existing in the prior art.

[0008] In order to solve the above technical problems, the specific technical solutions of the present invention are as follows:

[0009] On the one hand, the present invention provides a universal PCB gold finger defect detection method, comprising the following steps:

[0010] Image acquisition steps:

[0011] Acquire a first surface image of the PCB to be tested;

[0012] Goldfinger positioning steps:

[0013] Calling an artificial intelligence-based image segmentation algorithm to locate the golden finger area in the first surface image to obtain a positioning result map;

[0014] Image cropping steps:

[0015] Calculate the position data of the golden finger area based on the positioning result image, and cut the golden finger image according to the position data;

[0016] Image local segmentation steps:

[0017] Setting segmentation parameters, and segmenting the golden finger image into a plurality of partial images according to the segmentation parameters;

[0018] Multi-image defect detection steps:

[0019] Calling an artificial intelligence-based target detection algorithm to perform defect detection on each of the local images, respectively, to obtain a number of local detection results corresponding to the local images:

[0020] Multi-result fusion judgment steps:

[0021] Defect restoration and overlapping area comparison are performed on the plurality of local detection results, and a final recognition result is output according to the defect restoration result and the overlapping area comparison result.

[0022] As an improved solution, the image segmentation algorithm includes: an encoding module, an attention module and a decoding module;

[0023] The gold finger positioning step further includes:

[0024] Calling the encoding module to extract image semantic features of different levels of the first surface image;

[0025] Calling the attention module to extract features of the first surface image and calculate weight distribution of each part of the first surface image;

[0026] Calling the decoding module to perform feature size expansion on the first surface image, and merging a result of the feature size expansion with a result of the attention module to obtain a new feature layer;

[0027] Semantic features are extracted from the new feature layer, and the positioning result map is output.

[0028] As an improved solution, the image cropping step further includes:

[0029] Perform edge processing on the positioning result graph, calculate the minimum circumscribed distance of the golden finger area in the positioning result graph, and generate the position data of the golden finger area;

[0030] The positioning result image is cropped according to the position data to obtain the golden finger image.

[0031] As an improved solution, the segmentation parameters include: width, height, horizontal overlap ratio and vertical overlap ratio;

[0032] The step of dividing the golden finger image into a plurality of partial images according to the segmentation parameters comprises:

[0033] Taking the upper left corner of the golden finger image as the starting point, dividing the golden finger image into a plurality of horizontal areas by the width as the unit, and dividing the golden finger image into a plurality of vertical areas by the height as the unit, to obtain a plurality of first areas;

[0034] An overlapping area is set on the golden finger image according to the horizontal overlapping ratio and the vertical overlapping ratio, and a plurality of the first areas are set as a plurality of the partial images.

[0035] As an improved solution, the calling of the artificial intelligence-based target detection algorithm performs defect detection on each of the local images respectively, and obtains a number of local detection results corresponding to the local images respectively, including:

[0036] Calling the target detection algorithm to extract basic semantic information from each of the local images;

[0037] Calling the target detection algorithm to extract defect features in each of the local images;

[0038] Extracting defect location information according to the defect features and classifying the defects into categories to obtain defect location data for each of the local images;

[0039] The plurality of defect position data are respectively used as the plurality of local detection results.

[0040] As an improved solution, the defect restoration and overlapping area comparison of the plurality of local detection results include:

[0041] Traversing each of the local detection results;

[0042] According to the original position of each of the partial images in the golden finger image, restoring the corresponding partial detection result to the golden finger image;

[0043] For the local detection results in the overlapping area, it is determined whether to merge the defect targets according to the ratio of the overlapping area to the defect target with the smallest area.

[0044] As an improved solution, outputting the final recognition result according to the defect restoration result and the overlapping area comparison result includes:

[0045] For two defect targets to be merged, the maximum circumscribed rectangle of the two defect targets is calculated as the new defect target range;

[0046] Restoring the new defect target range to the golden finger image;

[0047] In response to restoring the local detection results of each of the local images to the golden finger image, a restored golden finger image is obtained;

[0048] The restored golden finger image is used as the final recognition result.

[0049] On the other hand, the present invention also provides a universal PCB gold finger defect detection system, comprising:

[0050] The image acquisition module is used to: acquire a first surface image of the PCB to be tested;

[0051] The golden finger positioning module is used to: call an artificial intelligence-based image segmentation algorithm to locate the golden finger area in the first surface image to obtain a positioning result map;

[0052] An image cropping module, used to: calculate the position data of the golden finger area based on the positioning result image, and crop the golden finger image according to the position data;

[0053] The image local segmentation module is used to: set segmentation parameters, and segment the golden finger image into a number of local images according to the segmentation parameters;

[0054] The multi-image defect detection module is used to: call the target detection algorithm based on artificial intelligence to perform defect detection on each of the local images, and obtain a number of local detection results corresponding to the local images respectively:

[0055] The multi-result fusion judgment module is used to: perform defect restoration and overlap area comparison on a number of the local detection results, and output a final recognition result based on the defect restoration results and the overlap area comparison results.

[0056] On the other hand, the present invention also provides a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the steps of the universal PCB gold finger defect detection method are implemented.

[0057] On the other hand, the present invention further provides a computer device, comprising a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other via the communication bus; wherein:

[0058] The memory is used to store computer programs;

[0059] The processor is used to execute the steps of the universal PCB gold finger defect detection method by running the program stored in the memory.

[0060] The beneficial effects of the technical solution of the present invention are:

[0061] 1. The universal PCB gold finger defect detection method described in the present invention can realize the efficient and accurate positioning of the detection area of ​​the PCB gold finger by using the segmentation algorithm based on artificial intelligence. Compared with the traditional Mark positioning method, the universality is improved and it can adapt to various types of gold fingers. In addition, the strategy of large image segmentation and result merging is adopted to effectively cope with the detection requirements of gold fingers of different sizes and significantly improve the detection rate of small defects. More importantly, combined with the target detection algorithm based on artificial intelligence, it can simultaneously identify and classify various types of defects, thereby enhancing the robustness of detection.

[0062] 2. The universal PCB gold finger defect detection system described in the present invention can realize the universal PCB gold finger defect detection method described in the present invention through the mutual cooperation of system modules.

[0063] 3. The computer-readable storage medium described in the present invention can realize the cooperation of the guiding system module, thereby realizing the universal PCB gold finger defect detection method described in the present invention, and the computer-readable storage medium described in the present invention also effectively improves the operability of the universal PCB gold finger defect detection method.

[0064] 4. The computer device described in the present invention can store and execute the computer-readable storage medium, thereby realizing the universal PCB gold finger defect detection method described in the present invention. BRIEF DESCRIPTION OF THE DRAWINGS

[0065] In order to more clearly illustrate the specific implementation methods of the present invention 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 invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0066] Figure 1 It is a schematic flow chart of the universal PCB gold finger defect detection method described in Example 1 of the present invention;

[0067] Figure 2 It is a logic flow diagram of the universal PCB gold finger defect detection method described in Example 1 of the present invention;

[0068] Figure 3 It is a schematic diagram of the architecture of the image segmentation algorithm in the universal PCB gold finger defect detection method described in Example 1 of the present invention;

[0069] Figure 4 It is a schematic diagram of the area division of the image local segmentation in the universal PCB gold finger defect detection method described in Example 1 of the present invention;

[0070] Figure 5 It is a schematic diagram of the architecture of the target detection algorithm in the universal PCB gold finger defect detection method described in Example 1 of the present invention;

[0071] Figure 6 It is a schematic diagram of the defect target overlapping area in the universal PCB gold finger defect detection method described in Example 1 of the present invention;

[0072] Figure 7 It is a schematic diagram of the architecture of the universal PCB gold finger defect detection system described in Example 2 of the present invention;

[0073] Figure 8 is a schematic diagram of the structure of the computer device described in Example 4 of the present invention;

[0074] The symbols in the accompanying drawings are explained as follows:

[0075] 1501, processor; 1502, communication interface; 1503, memory; 1504, communication bus. DETAILED DESCRIPTION

[0076] The preferred embodiments of the present invention are described in detail below in conjunction with the accompanying drawings so that the advantages and features of the present invention can be more easily understood by those skilled in the art, thereby making a clearer and more definite definition of the protection scope of the present invention.

[0077] In the description of the present invention, it should be noted that the embodiments described in the present invention are only part of the embodiments of the present invention, rather than all of the embodiments; based on the embodiments in the present invention, all other embodiments obtained by ordinary technicians in the field without making creative work are within the scope of protection of the present invention.

[0078] The terms "first", "second", etc. in the specification and claims of this article and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of this article described here can be implemented in an order other than those illustrated or described here. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, device, product or equipment that includes a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or equipment. Example 1

[0079] This embodiment provides a universal PCB gold finger defect detection method, such as Figure 1 to Figure 6 As shown, the following steps are included:

[0080] S100, image acquisition steps:

[0081] In this step, in response to the material tray being conveyed to the designated position by the conveyor belt, the camera is controlled to take a picture of the surface of the circuit board to be inspected, and the collected image Image1 is obtained.

[0082] S200, Gold Finger Positioning Steps:

[0083] In this step, an artificial intelligence-based image segmentation algorithm is used to accurately locate the gold finger area in the image Image1, and solve the problems of large posture changes, inconsistent width and tilt of the gold finger in Image1, as follows:

[0084] Furthermore, the image segmentation algorithm of the present method is mainly composed of an encoding module, an attention module and a decoding module; the encoding module is mainly composed of a convolutional layer (Conv), a batch normalization layer (BN) and an activation layer (LeakyRelu); the attention module is mainly composed of a convolutional layer (Conv), a batch normalization layer (BN), an activation layer (LeakyRelu), and a weight calculation layer (Weight); the decoding module is mainly composed of an upsampling layer (Upsampling), a merging layer (Combine), a convolutional layer (Conv), a batch normalization layer (BN) and an activation layer (LeakyRelu);

[0085] Furthermore, the operation logic of the image segmentation algorithm includes: in the encoding stage, the image semantic features of Image1 at different levels are extracted through three consecutive encoding modules; when passing through the attention module, the image features are extracted through the convolution layer, batch normalization layer and activation layer, and the weight distribution of each part of the image is calculated through the weight calculation layer (the gold finger part has both gold-plated columns and background, and the weight calculation is used to increase the weight of the gold-plated column area and reduce the weight of the background part, thereby reducing the impact of background changes on the detection results and improving the detection accuracy); in the decoding stage, the feature size is expanded to be consistent with the size of the attention module result through the upsampling layer, and the result of the previous layer is merged with the result of the attention module through the merging layer to obtain a new feature layer, and the semantic features are further extracted through the convolution layer, batch normalization layer and activation layer, and the final output segmentation result map is consistent with the size of the input image;

[0086] Furthermore, the position ROI1 of the golden finger region in the image Image1 can be determined through the image segmentation algorithm.

[0087] S300, image cropping steps:

[0088] In this step, the position ROI1 of the cheating area is calculated according to the result image output in the previous step, and the cheating area image is cropped according to the position ROI1 to obtain the cheating image Image2, as follows:

[0089] Furthermore, edge processing is performed on the result image output by the image segmentation algorithm, the minimum circumscribed distance of the golden finger area is calculated, and ROI1 (i.e., position data) of the area where the golden finger is located is generated; ROI1 is used to crop Image1 to obtain the image Image2 of the corresponding area.

[0090] S400, image local segmentation step:

[0091] In this step, a certain width, height and overlap ratio are preset; Image2 is divided into multiple local small images ImageParts according to the preset width, height and overlap ratio, so as to be compatible with gold fingers of different sizes and improve the detection rate of small defects, as follows:

[0092] Further, set the width (W), height (H), horizontal overlap ratio (RW) and vertical overlap ratio (RH); according to Figure 4 The method takes the upper left corner of Image2 as the starting point, and divides the image step by step according to the preset W, H, RW and RH; wherein, taking the upper left corner of the golden finger image as the starting point, the golden finger image is divided into several horizontal divisions in units of the width, and the golden finger image is divided into several vertical divisions in units of the height to obtain several preliminary small images; according to the horizontal overlapping ratio and the vertical overlapping ratio, an overlapping area is set on the golden finger image, and several preliminary small images are set as several partial images (i.e., m ij );

[0093] Furthermore, when the width and height of Image2 cannot be divided evenly, the last row or column of images is cropped starting from the rightmost or bottommost boundary according to the set W and H, and the overlap ratio is ignored;

[0094] Furthermore, after the above cropping, the obtained local small image is defined as m ij , i=1,2,...; j=1,2,....

[0095] S500, multi-image defect detection steps:

[0096] In this step, an artificial intelligence-based target detection algorithm is used to perform defect detection on each of the above local images, and accurately identify the location and category of each defect, as follows:

[0097] Furthermore, the target detection algorithm,is composed of a feature extraction module (Backbone) and a target detection,module (CM);

[0098] Furthermore, a general feature extraction module (Backbone) pre-trained on the ImageNet dataset is used to extract basic semantic information from each local image.

[0099] Furthermore, a specific target detection module (CM) is used to further extract relevant features of defects in each local image; the target detection module (CM) is composed of a convolution layer (Conv) and a maximum pooling layer (Maxpool); optionally, two or more target detection modules are cascaded to perform defect feature recognition, thereby further extracting defect location information;

[0100] Furthermore, the fully connected layer (Fc) is finally used to classify the defect categories and determine the location of the defects.

[0101] S600, multi-result fusion judgment step:

[0102] In this step, the detection results of each local image in the previous step are summarized, and the results in the overlapping area are merged to prevent a single defect from having multiple recognition results. The final recognition result is then output, as follows:

[0103] Furthermore, the detection results of each local small image are traversed, and according to the original position of each small image in Image2, the coordinates of the defect target detected in the image are restored to Image2;

[0104] Furthermore, for the defect recognition results in the overlapping area, determine whether they need to be merged; first set the overlap threshold, and then calculate the ratio of the overlapping area to the defect target with the smallest area (Intersection Over Small, IOS); Figure 5 As shown in the figure, the area of ​​defect target A is Area(A), the area of ​​defect target B is Area(B), and the overlapping area of ​​the two defect targets is Area(C). The calculation formula of IOS is as follows:

[0105] IOS=Area(C) / min(Area(A),Area(B));

[0106] The ratio is calculated according to this formula and compared with the overlap threshold. When the ratio reaches the overlap threshold, it is determined that the two defect targets need to be merged.

[0107] Furthermore, for the two defective targets that need to be merged, the maximum enclosing rectangle of the two defective targets is calculated as the new defective target range, and the defects are restored to Image2;

[0108] Furthermore, after completing the above defect restoration operation for each local image, the final restored Image2 is output as the final defect detection result.

[0109] It should be noted that the above examples are only for explaining the present invention and cannot limit the protection scope of the present invention. Example 2

[0110] This embodiment is based on the same inventive concept as the universal PCB gold finger defect detection method described in Embodiment 1, and provides a universal PCB gold finger defect detection system, such as Figure 7 As shown, including:

[0111] The image acquisition module is used to: acquire a first surface image of the PCB to be tested;

[0112] The golden finger positioning module is used to: call an artificial intelligence-based image segmentation algorithm to locate the golden finger area in the first surface image to obtain a positioning result map;

[0113] Specifically, the image segmentation algorithm includes: an encoding module, an attention module and a decoding module;

[0114] Specifically, the golden finger positioning module calls the encoding module to extract image semantic features of different levels of the first surface image; calls the attention module to extract the features of the first surface image, and calculates the weight distribution of each part of the first surface image; calls the decoding module to expand the feature size of the first surface image, and merges the result of the feature size expansion with the result of the attention module to obtain a new feature layer; extracts semantic features from the new feature layer, and outputs the positioning result map.

[0115] An image cropping module, used to: calculate the position data of the golden finger area based on the positioning result image, and crop the golden finger image according to the position data;

[0116] Specifically, the image cropping module includes: an edge processing unit and a cropping processing unit;

[0117] An edge processing unit is used to perform edge processing on the positioning result map, calculate the minimum circumscribed distance of the golden finger area in the positioning result map, and generate the position data of the golden finger area;

[0118] A cropping processing unit is used to crop the positioning result image according to the position data to obtain the golden finger image.

[0119] The image local segmentation module is used to: set segmentation parameters, and segment the golden finger image into a number of local images according to the segmentation parameters;

[0120] Specifically, the segmentation parameters include: width, height, horizontal overlap ratio and vertical overlap ratio;

[0121] Specifically, the local image segmentation module includes: an image segmentation unit and an overlapping area setting unit;

[0122] An image segmentation unit, used for taking the upper left corner of the golden finger image as a starting point, performing a plurality of horizontal divisions on the golden finger image in units of the width, and performing a plurality of vertical divisions on the golden finger image in units of the height, to obtain a plurality of first areas;

[0123] The overlapping area setting unit is used to set an overlapping area on the golden finger image according to the horizontal overlapping ratio and the vertical overlapping ratio, and set a plurality of the first areas as a plurality of the partial images.

[0124] The multi-image defect detection module is used to: call the target detection algorithm based on artificial intelligence to perform defect detection on each of the local images, and obtain a number of local detection results corresponding to the local images respectively:

[0125] Specifically, the multi-image defect detection module calls the target detection algorithm to extract basic semantic information in each of the local images; calls the target detection algorithm to extract defect features in each of the local images; extracts defect location information based on the defect features and classifies the defects into categories to obtain defect location data for each of the local images; and uses several of the defect location data as several local detection results.

[0126] A multi-result fusion judgment module is used to: perform defect restoration and overlap area comparison on a plurality of the local detection results, and output a final recognition result according to the defect restoration results and the overlap area comparison results;

[0127] Specifically, the multi-result fusion judgment module includes: a result traversal unit, a result restoration unit, an overlap judgment unit, a target merging unit and a result output unit;

[0128] A result traversal unit, used for traversing each of the local detection results;

[0129] A result restoration unit, used for restoring the corresponding local detection result to the golden finger image according to the original position of each local image in the golden finger image;

[0130] An overlap judgment unit, used for judging whether to merge defect targets based on the ratio of the overlap area to the defect target with the smallest area for the local detection results in the overlap area;

[0131] A target merging unit, used for calculating the maximum circumscribed rectangle of two defect targets to be merged as a new defect target range, and restoring the new defect target range to the golden finger image;

[0132] The result output unit is used for obtaining a restored golden finger image in response to restoring the local detection result of each of the local images to the golden finger image, and using the restored golden finger image as the final recognition result. Example 3

[0133] This embodiment provides a computer-readable storage medium, including:

[0134] The storage medium is used to store computer software instructions used to implement the generalized PCB gold finger defect detection method described in the above-mentioned embodiment 1, which includes a program for executing the above-mentioned generalized PCB gold finger defect detection method; specifically, the executable program can be built into the generalized PCB gold finger defect detection system described in embodiment 2, so that the generalized PCB gold finger defect detection system can implement the generalized PCB gold finger defect detection method described in embodiment 1 by executing the built-in executable program.

[0135] In addition, the computer-readable storage medium of this embodiment may adopt any combination of one or more computer-readable storage media, wherein the computer-readable storage medium includes electrical, optical, electromagnetic, infrared or semiconductor systems, devices or components, or any combination thereof. Example 4

[0136] This embodiment provides an electronic device, such as Figure 8 As shown, the electronic device may include: a processor 1501 , a communication interface 1502 , a memory 1503 and a communication bus 1504 , wherein the processor 1501 , the communication interface 1502 , and the memory 1503 communicate with each other via the communication bus 1504 .

[0137] Memory 1503, used for storing computer programs;

[0138] The processor 1501 is used to implement the steps of the universal PCB gold finger defect detection method described in the above embodiment 1 when executing the computer program stored in the memory 1503.

[0139] As an embodiment of the present invention, the communication bus mentioned in the above terminal can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus. The communication bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 8 Only one thick line is used in the diagram, but this does not mean that there is only one bus or only one type of bus.

[0140] As an implementation mode of the present invention, the communication interface is used for communication between the above-mentioned terminal and other devices.

[0141] As an embodiment of the present invention, the memory may include a random access memory (RAM) or a non-volatile memory, such as at least one disk memory. Optionally, the memory may also be at least one storage device located away from the aforementioned processor.

[0142] As an embodiment of the present invention, the above-mentioned processor can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components.

[0143] Different from the prior art, the present application discloses a universal PCB gold finger defect detection method, system, device and medium, which can efficiently and accurately locate the detection area of ​​PCB gold fingers by using an artificial intelligence-based segmentation algorithm. Compared with the traditional Mark positioning method, the versatility is improved and it can adapt to various types of gold fingers. In addition, the strategy of large image segmentation and result merging is adopted to effectively cope with the detection needs of gold fingers of different sizes and significantly improve the detection rate of small defects. More importantly, combined with the artificial intelligence-based target detection algorithm, it can simultaneously identify and classify various types of defects, thereby enhancing the robustness of detection.

[0144] It should be understood that in the various embodiments of this document, the size of the serial numbers of the above-mentioned processes does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of this document.

[0145] It should also be understood that in the embodiments of this article, the term "and / or" is only a description of the association relationship of the associated objects, indicating that three relationships may exist. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. In addition, the character " / " in this article generally indicates that the associated objects before and after are in an "or" relationship.

[0146] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in terms of function in the above description. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this article.

[0147] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.

[0148] In the several embodiments provided herein, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic, for example, the division of the units is only a logical function division, and there may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interfaces, devices or units, or can be electrical, mechanical or other forms of connection.

[0149] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the embodiments of this article.

[0150] In addition, each functional unit in each embodiment of this invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above integrated unit may be implemented in the form of hardware or in the form of software functional unit.

[0151] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this article is essentially or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions to enable a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of this article. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk and other media that can store program codes.

[0152] The above descriptions are merely embodiments of the present invention and are not intended to limit the patent scope of the present invention. Any equivalent structure or equivalent process transformation made using the contents of the present invention specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present invention.

Claims

1. A universal PCB gold finger defect detection method, characterized in that: The following steps are involved: Image acquisition steps: Acquire a first surface image of the PCB to be tested; Goldfinger positioning steps: Calling an artificial intelligence-based image segmentation algorithm to locate the golden finger area in the first surface image to obtain a positioning result map; The golden finger positioning step further includes: calling the encoding module to extract image semantic features of different levels of the first surface image; calling the attention module to extract features of the first surface image and calculate the weight distribution of each part of the first surface image; calling the decoding module to expand the feature size of the first surface image, and merge the result of the feature size expansion with the result of the attention module to obtain a new feature layer; extracting semantic features from the new feature layer, and outputting a positioning result map; Image cropping steps: Calculate the position data of the gold finger area based on the positioning result image, and cut the gold finger image according to the position data; Image local segmentation steps: Set segmentation parameters and divide the gold finger image into several partial images according to the segmentation parameters; Multi-image defect detection steps: Calling an artificial intelligence-based target detection algorithm to perform defect detection on each local image, and obtaining a number of local detection results corresponding to the local images respectively: the multi-image defect detection step further includes: calling the target detection algorithm to extract basic semantic information in each local image; calling the target detection algorithm to extract defect features in each local image; extracting defect location information according to the defect features and classifying the defects into categories, and obtaining defect location data for each local image; using the several defect location data as several local detection results respectively; Multi-result fusion judgment steps: Defect restoration and overlapping area comparison are performed on several local detection results, and the final recognition result is output based on the results of defect restoration and overlapping area comparison.

2. The universal PCB gold finger defect detection method according to claim 1, characterized in that: The image cropping step further comprises: Perform edge processing on the positioning result graph, calculate the minimum circumscribed distance of the golden finger area in the positioning result graph, and generate the position data of the golden finger area; The positioning result image is cropped according to the position data to obtain the golden finger image.

3. The universal PCB gold finger defect detection method according to claim 1, characterized in that: The segmentation parameters include: width, height, horizontal overlap ratio and vertical overlap ratio; The step of dividing the golden finger image into a plurality of partial images according to the segmentation parameters comprises: Taking the upper left corner of the golden finger image as the starting point, dividing the golden finger image into a plurality of horizontal areas by the width as the unit, and dividing the golden finger image into a plurality of vertical areas by the height as the unit, to obtain a plurality of first areas; An overlapping area is set on the golden finger image according to the horizontal overlapping ratio and the vertical overlapping ratio, and a plurality of the first areas are set as a plurality of the partial images.

4. The universal PCB gold finger defect detection method according to claim 1 is characterized in that: The defect restoration and overlapping area comparison of the plurality of local detection results include: Traversing each of the local detection results; According to the original position of each of the partial images in the golden finger image, restoring the corresponding partial detection result to the golden finger image; For the local detection results in the overlapping area, it is determined whether to merge the defect targets according to the ratio of the overlapping area to the defect target with the smallest area.

5. The universal PCB gold finger defect detection method according to claim 1, characterized in that: Outputting a final recognition result according to the defect restoration result and the overlapping area comparison result includes: For two defect targets to be merged, the maximum circumscribed rectangle of the two defect targets is calculated as the new defect target range; Restoring the new defect target range to the golden finger image; In response to restoring the local detection results of each of the local images to the golden finger image, a restored golden finger image is obtained; The restored golden finger image is used as the final recognition result.

6. A universal PCB gold finger defect detection system, characterized in that: include: The image acquisition module is used to: acquire a first surface image of the PCB to be tested; The golden finger positioning module is used to call an artificial intelligence-based image segmentation algorithm to locate the golden finger area in the first surface image to obtain a positioning result map; the golden finger positioning module is further used to call the encoding module to extract image semantic features of different levels of the first surface image; Calling the attention module to extract features of the first surface image and calculate the weight distribution of each part of the first surface image; calling the decoding module to expand the feature size of the first surface image, merging the result of the feature size expansion with the result of the attention module to obtain a new feature layer; extracting semantic features from the new feature layer and outputting a positioning result map; The image cropping module is used to calculate the position data of the golden finger area based on the positioning result image, and crop the golden finger image according to the position data; The local image segmentation module is used to: set segmentation parameters and segment the golden finger image into several local images according to the segmentation parameters; The multi-image defect detection module is used to: call the target detection algorithm based on artificial intelligence to perform defect detection on each local image respectively, and obtain a number of local detection results corresponding to the local images respectively; the multi-image defect detection module is further used to: call the target detection algorithm to extract the basic semantic information in each local image; call the target detection algorithm to extract the defect features in each local image; extract the defect part information according to the defect features and classify the defects into categories to obtain the defect location data for each local image; use the several defect location data as several local detection results respectively; The multi-result fusion judgment module is used to: perform defect restoration and overlap area comparison on a number of local detection results, and output the final recognition result based on the defect restoration results and the overlap area comparison results.

7. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the universal PCB gold finger defect detection method described in any one of claims 1 to 5 are implemented.

8. A computer device, characterized in that: It includes a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other through the communication bus; wherein: The memory is used to store computer programs; The processor is used to execute the steps of the universal PCB gold finger defect detection method described in any one of claims 1 to 5 by running the program stored in the memory.

Citation Information

Patent Citations

  • Circuit board golden finger area defect detection method, system and device and medium

    CN114862817A

  • System and method for processing bevel edge of golden finger

    CN117132576A