Fast Recognition Method for PCB Welding Defects Based on YOLO

By constructing the target welding feature distribution map and combining the YOLO model, PCB welding defects are extracted and identified, and the problems of slow detection speed and low accuracy in traditional detection methods are solved, and efficient and real-time welding defect detection is achieved.

CN119919409BActive Publication Date: 2025-05-30XIAN JIEHANG ELECTRONICS SCI & TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510405235.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-04-02
Publication Date
2025-05-30
Estimated Expiration
2045-04-02

AI Technical Summary

Technical Problem

Traditional PCB welding defect detection methods have problems such as slow detection speed and low accuracy.

Method used

By obtaining PCB welding image data, the local texture complexity and edge gradient strength of feature points in the welding area are extracted, the initial welding feature distribution map is constructed, and the spatial correlation properties between feature points in the welding area are used for related connections to form the target welding feature distribution map. Then, the feature vector is calculated and the pre-constructed YOLO model is fine-tuned to obtain the target YOLO model for quickly identifying and positioning welding defects.

Benefits of technology

It realizes efficient and real-time PCB welding defect detection, significantly improves detection speed and accuracy, and can meet the real-time needs of industrial production.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119919409B_ABST
    Figure CN119919409B_ABST
Patent Text Reader

Abstract

This application relates to the technical field of PCB welding defect detection, and particularly to a fast identification method for PCB welding defects based on YOLO, which includes: obtaining PCB welding image data, extracting the local texture complexity and edge gradient intensity of welding area feature points, and constructing an initial welding feature distribution map; connecting the welding area feature points by using spatial association attributes to obtain a target welding feature distribution map; fine-tuning the initial YOLO model through feature vectors to obtain a target YOLO model; extracting the current welding area feature points and spatial association attributes in the PCB welding image to be detected, inputting them into the target YOLO model, obtaining the current feature vectors and target welding area feature points, and feeding them back to the user. This method can significantly improve the speed and accuracy of PCB welding defect detection.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of image processing and machine vision, and specifically relates to a fast recognition method for PCB welding defects based on YOLO. Background Art

[0002] In the field of electronic product manufacturing, the detection of printed circuit board (PCB) welding defects is a key link to ensure product quality. Traditional detection methods, such as manual visual inspection, although still widely used in some cases, have significant problems such as slow detection speed and low accuracy, and it is difficult to meet the needs of large-scale production. With the continuous progress of artificial intelligence technology, especially the wide application of deep learning algorithms in the field of image recognition, a fast recognition method for PCB welding defects based on YOLO (You Only Look Once) has emerged. The YOLO algorithm shows great potential in object detection tasks with its high efficiency and accuracy. This method realizes the automatic recognition and positioning of PCB welding defects by training a deep neural network model, greatly improving the detection efficiency and accuracy. However, some existing defect detection methods based on deep learning still have problems such as complex models, high computational resource requirements, and poor real-time performance in practical applications. Therefore, developing a fast recognition method for PCB welding defects based on the YOLO algorithm can not only overcome the deficiencies of traditional methods but also achieve efficient and real-time defect detection while ensuring high accuracy, which has important practical significance and application value. Summary of the Invention

[0003] The present invention provides a fast recognition method, system, and computer-readable storage medium for PCB welding defects based on YOLO, and its main purpose is to solve the problems of slow detection speed and low accuracy existing in traditional PCB welding defect detection methods.

[0004] To achieve the above object, a rapid identification method for PCB welding defects based on YOLO provided by the present invention includes: acquiring PCB welding image data, sequentially extracting feature points of the welding area in the PCB welding image data, and identifying the local texture complexity and edge gradient intensity of the feature points of the welding area, where the feature points of the welding area are the center or boundary of the solder joint; determining the feature positions of the feature points of the welding area in a pre-constructed welding feature distribution map according to the local texture complexity and edge gradient intensity to obtain an initial welding feature distribution map; acquiring the spatial association attributes between the feature points of the welding area in the PCB welding image data, and using the spatial association attributes to perform relevant connection on the feature points of the welding area in the initial welding feature distribution map to obtain a target welding feature distribution map; acquiring the feature vectors between two feature points of the welding area in the target welding feature distribution map, and fine-tuning a pre-constructed initial YOLO model according to the feature vectors, the feature points of the welding area, and the spatial association attributes to obtain a target YOLO model; acquiring a PCB welding image to be detected, and determining whether there are feature points of the welding area in the PCB welding image; if there are no feature points of the welding area in the PCB welding image, acquiring a pre-welding image set containing the PCB welding image, and extracting current feature points of the welding area in the pre-welding image set; if there are feature points of the welding area in the PCB welding image, extracting current feature points of the welding area in the PCB welding image; extracting the current spatial association attributes of the current feature points of the welding area in the PCB welding image, inputting the current feature points of the welding area and the current spatial association attributes into the target YOLO model to obtain a current feature vector; acquiring the current feature positions of the current feature points of the welding area, indexing target feature points of the welding area in the target welding feature distribution map according to the current feature positions and the current feature vector, and feeding back the target feature points of the welding area to the user.

[0005] Optionally, the step of determining the feature positions of the feature points of the welding area in a pre-constructed welding feature distribution map according to the local texture complexity and edge gradient intensity to obtain an initial welding feature distribution map includes: using the local texture complexity as the horizontal coordinate points in the welding feature distribution map; using the edge gradient intensity as the vertical coordinate points in the welding feature distribution map; determining the feature positions of the feature points of the welding area in the welding feature distribution map according to the horizontal coordinate points and the vertical coordinate points; and calibrating the feature positions of all the feature points of the welding area in the welding feature distribution map to obtain the initial welding feature distribution map.

[0006] Optionally, obtaining the spatial association attributes between the feature points in the welding area of the PCB welding image data, and using the spatial association attributes to perform relevant connection on the feature points in the welding area of the initial welding feature distribution map to obtain a target welding feature distribution map, includes: obtaining an associated welding area feature point set associated with the welding area feature points; sequentially extracting associated welding area feature points from the associated welding area feature point set, and identifying the spatial association attributes between the welding area feature points and the associated welding area feature points; using the spatial association attributes to perform relevant connection on the welding area feature points and the associated welding area feature points to obtain the target welding feature distribution map.

[0007] Optionally, obtaining the feature vector between two welding area feature points in the target welding feature distribution map includes: obtaining the feature positions of two welding area feature points that are relevantly connected in the target welding feature distribution map; using the feature positions to calculate the feature vector between the two welding area feature points according to a pre-constructed feature vector calculation formula.

[0008] Optionally, the feature vector calculation formula is as follows:

[0009] , where represents the feature vector from the welding area feature point to the welding area feature point, represents the feature position of the welding area feature point, represents the feature position of the associated welding area feature point, represents the horizontal unit vector, represents the vertical unit vector.

[0010] Optionally, determining whether there are welding area feature points in the PCB welding image includes: removing a preset background noise and interference area from the PCB welding image to obtain an initial welding area candidate set; determining whether there are welding area feature points in the initial welding area candidate set; if there are welding area feature points in the initial welding area candidate set, it is determined that there are welding area feature points in the PCB welding image; if there are no welding area feature points in the initial welding area candidate set, it is determined that there are no welding area feature points in the PCB welding image.

[0011] Optionally, obtaining a pre-welding image set including the PCB welding image and extracting current welding area feature points from the pre-welding image set includes: extracting a first pre-welding image of the PCB welding image from the pre-welding image set; determining whether there are welding area feature points in the first pre-welding image; if there are no welding area feature points in the first pre-welding image, then reversely extract pre-welding images from the pre-welding image set until there are welding area feature points in the pre-welding image, and use the welding area feature points as the current welding area feature points; if there are welding area feature points in the first pre-welding image, then extract current welding area feature points from the first pre-welding image.

[0012] Optionally, indexing target welding area feature points in the target welding feature distribution map according to the current feature position and the current feature vector includes: using the current feature position as the vector starting point of the current feature vector to obtain an indexed feature vector; identifying the vector end point of the indexed feature vector and identifying the welding area feature points with the same feature position as the vector end point; using the welding area feature points with the same feature position as the vector end point as the target welding area feature points.

[0013] Optionally, when extracting the current spatial association attribute of the current welding area feature points in the PCB welding image, the method further includes: determining whether there is a current spatial association attribute matching the current welding area feature points in the PCB welding image; if there is no current spatial association attribute matching the current welding area feature points in the PCB welding image, then continue to extract current welding area feature points from the pre-welding image set until current welding area feature points matching the current spatial association attribute are obtained, and extract the current spatial association attribute of the current welding area feature points in the PCB welding image; if there is a current spatial association attribute matching the current welding area feature points in the PCB welding image, then extract the current spatial association attribute of the current welding area feature points in the PCB welding image.

[0014] To solve the above problems, the present invention also provides a rapid identification system for PCB welding defects based on YOLO. The system includes: an initial welding feature distribution map construction module, which is used to obtain PCB welding image data, sequentially extract welding area feature points in the PCB welding image data, identify the local texture complexity and edge gradient intensity of the welding area feature points, where the welding area feature points are the solder joint centers or solder joint boundaries; determine the feature positions of the welding area feature points in a pre-constructed welding feature distribution map according to the local texture complexity and edge gradient intensity to obtain an initial welding feature distribution map; a target welding feature distribution map construction module, which is used to obtain the spatial association attributes between the welding area feature points in the PCB welding image data, and use the spatial association attributes to connect the welding area feature points in the initial welding feature distribution map to obtain a target welding feature distribution map; a feature vector association relationship establishment module, which is used to obtain the feature vectors between two welding area feature points in the target welding feature distribution map, and fine-tune a pre-constructed initial YOLO model according to the feature vectors, welding area feature points and spatial association attributes to obtain a target YOLO model; a current welding area feature point extraction module, which is used to obtain a PCB welding image to be detected, and determine whether there are welding area feature points in the PCB welding image; if there are no welding area feature points in the PCB welding image, obtain a pre-welding image set containing the PCB welding image, and extract current welding area feature points in the pre-welding image set; if there are welding area feature points in the PCB welding image, extract current welding area feature points in the PCB welding image; a target welding area feature point feedback module, which is used to extract the current spatial association attributes of the current welding area feature points in the PCB welding image, input the current welding area feature points and the current spatial association attributes into the target YOLO model to obtain a current feature vector; obtain the current feature position of the current welding area feature points, index the target welding area feature points in the target welding feature distribution map according to the current feature position and the current feature vector, and feedback the target welding area feature points to the user.

[0015] To solve the above problems, the present invention also provides an electronic device. The electronic device includes: at least one processor; and a memory communicatively connected to the at least one processor; wherein, the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to implement the above-mentioned rapid identification method for PCB welding defects based on YOLO. To solve the above problems, the present invention also provides a computer-readable storage medium, in which at least one instruction is stored, and the at least one instruction is executed by a processor in an electronic device to implement the above-mentioned rapid identification method for PCB welding defects based on YOLO.

[0016] Compared with the background art, the traditional PCB welding defect detection method has the problems of slow detection speed and low accuracy. In the process of extracting the feature points of the target welding area in the embodiments of the present invention, it is necessary to first construct a target welding feature distribution map, so as to achieve the purpose of indexing the feature points of the target welding area according to the current feature position and the current feature vector in the target welding feature distribution map. The current feature position refers to the feature points of the welding area in the PCB welding image to be detected. When constructing the target welding feature distribution map, first identify the local texture complexity and edge gradient intensity of the welding area feature points, and then use the local texture complexity and edge gradient intensity to determine the feature position of the welding area feature points in the target welding feature distribution map. Through the feature position relationship between two welding area feature points in the target welding feature distribution map, calculate the feature vector and fine-tune the pre-constructed initial YOLO model according to the feature vector, the welding area feature points and the spatial association attributes to obtain the target YOLO model. By establishing the feature vector, the indexing efficiency of the feature points of the target welding area is greatly simplified. At this time, the current welding area feature points and the corresponding current spatial association attributes can be extracted from the PCB welding image to be detected or the pre-welding image set. According to the current welding area feature points and the corresponding current spatial association attributes, determine the current feature position and the current feature vector, and finally index the feature points of the target welding area according to the current feature position and the current feature vector in the target welding feature distribution map and feedback them to the user. Therefore, the fast PCB welding defect recognition method, system, electronic device and computer-readable storage medium based on YOLO proposed by the present invention can solve the problems of slow detection speed and low accuracy of the traditional PCB welding defect detection method. Description of the Drawings

[0017] Figure 1 It is a schematic flowchart of the fast PCB welding defect recognition method based on YOLO provided by the embodiments of the present invention, showing the overall steps from obtaining PCB welding image data to feedback of the feature points of the target welding area.

[0018] Figure 2 It is a schematic diagram of the construction process of the initial welding feature distribution map and the target welding feature distribution map in the embodiments of the present invention, and details the application of local texture complexity, edge gradient intensity and spatial association attributes in the feature distribution map.

[0019] Figure 3 It is a schematic diagram of the module structure of the fast PCB welding defect recognition system based on YOLO provided by the embodiments of the present invention, including an initial welding feature distribution map construction module, a target welding feature distribution map construction module, a feature vector association relationship establishment module, a current welding area feature point extraction module and a target welding area feature point feedback module. Specific Embodiments

[0020] It should be understood that the specific embodiments described herein are merely for explaining the present invention and are not used to limit the present invention.

[0021] The present invention provides a method, system and computer-readable storage medium for rapid identification of PCB welding defects based on YOLO. The core lies in realizing efficient detection of PCB welding defects by constructing a target welding feature distribution map and combining it with the YOLO model. The following will be described in detail the specific embodiments of the present invention in conjunction with the Figures 1 to 3 accompanying drawings and specific embodiments. In practical applications, first, it is necessary to obtain PCB welding image data, which usually comes from high-resolution cameras or scanning devices on industrial production lines. As Figure 1 shown, the first step of this process is to extract the feature points of the welding area and identify the local texture complexity and edge gradient intensity of these feature points. The local texture complexity reflects the detailed information on the surface of the solder joint, while the edge gradient intensity is used to characterize the change of the solder joint boundary. For the convenience of subsequent processing, the local texture complexity is used as the horizontal coordinate point in the welding feature distribution map, and the edge gradient intensity is used as the vertical coordinate point. According to these two parameters, the specific position of each welding area feature point in the welding feature distribution map can be determined. For example, assume that the local texture complexity of a certain welding area feature point is 0.75 and the edge gradient intensity is 0.6, then its position in the welding feature distribution map is (0.75, 0.6). After the positions of all welding area feature points are calibrated, the initial welding feature distribution map can be generated.

[0022] Next, it is necessary to further construct the target welding feature distribution map. The key to this process lies in analyzing the spatial correlation attributes between the welding area feature points. As Figure 2 shown, first, obtain the set of associated welding area feature points associated with a certain welding area feature point. These associated feature points are usually solder joints that are adjacent to the current feature point in the physical position or have a certain logical relationship. Subsequently, each associated feature point is sequentially extracted from the set of associated welding area feature points, and their spatial correlation attributes with the current feature point are calculated. The spatial correlation attributes can be defined in various ways, such as the Euclidean distance, direction angle, or relative position relationship between two points, etc. Using these spatial correlation attributes, the welding area feature points in the initial welding feature distribution map can be connected relatedly to form the target welding feature distribution map. This connection can not only reflect the geometric relationship between the solder joints but also provide a basis for subsequent feature vector calculation.

[0023] Based on the target welding feature distribution map, further calculate the feature vector between two welding area feature points. As Figure 2As shown, the calculation formula of the feature vector is

[0024] , where and respectively represent the feature points of the welding area and the feature positions associated with the feature points of the welding area, and are the horizontal and vertical unit vectors respectively. For example: if the feature positions of two feature points of the welding area are (0.75, 0.6) and (0.85, 0.7) respectively, then the feature vector between them is In this way, the relative position relationship between the feature points of the welding area can be quantified, providing an important basis for subsequent model fine-tuning.

[0025] After calculating the feature vector, it is necessary to fine-tune the pre-constructed initial YOLO model to obtain the target YOLO model. The initial YOLO model is a deep learning-based object detection algorithm, which is characterized by being able to simultaneously predict the category and position of the target in a single forward propagation. In the present invention, the input of the initial YOLO model includes the feature points of the welding area, the feature vector, and the spatial association attributes. By training on these input data, the model can better adapt to the PCB welding defect detection task. During the fine-tuning process, the backpropagation algorithm is used to optimize the model parameters until the performance of the model on the validation set reaches the expected level. The finally obtained target YOLO model has a higher detection speed and accuracy, and can meet the real-time requirements in industrial production.

[0026] In the actual detection stage, it is first necessary to obtain the PCB welding image to be detected and determine whether there are feature points of the welding area. As Figure 1 shown, this process includes removing background noise and interference areas to obtain the initial welding area candidate set. Background noise may come from uneven illumination or device jitter during the image acquisition process, while interference areas may be other non-welding components on the PCB board. Through image preprocessing techniques, such as Gaussian filtering, morphological operations, etc., these interference factors can be effectively removed. Subsequently, the initial welding area candidate set is analyzed. If there are feature points of the welding area in it, it is determined that the PCB welding image contains feature points of the welding area; otherwise, it is determined that there are no feature points of the welding area.

[0027] If there are no feature points of the welding area in the PCB welding image to be detected, it is necessary to extract the current feature points of the welding area from the pre-posed welding image set. The pre-posed welding image set refers to a series of images collected before the current image, and these images are usually arranged in chronological order. As Figure 1As shown, firstly, the first pre-welding image in the pre-welding image set is extracted, and it is determined whether there is a welding area feature point in it. If there is no welding area feature point in the first pre-welding image, the pre-welding images are extracted in reverse order until an image containing a welding area feature point is found, and the image is used as the current welding area feature point. If there is already a welding area feature point in the first pre-welding image, the feature point is directly extracted as the current welding area feature point.

[0028] For PCB welding images containing welding area feature points, it is necessary to further extract the current spatial correlation attributes of the current welding area feature points. Figure 1 As shown in the figure, this process includes determining whether the current welding area feature point has a matching spatial correlation attribute. If there is no matching spatial correlation attribute in the current image, the current welding area feature point is continuously extracted from the previous welding image set until a matching attribute is found. If there is already a matching spatial correlation attribute in the current image, the attribute is directly extracted. Subsequently, the current welding area feature point and its spatial correlation attribute are input into the target YOLO model to obtain the current feature vector. The calculation method of the current feature vector is consistent with the aforementioned feature vector calculation formula.

[0029] After obtaining the current feature vector, it is necessary to index the feature points of the target welding area in the target welding feature distribution map according to the current feature position and the current feature vector. Figure 1 As shown in the figure, this process includes taking the current feature position as the vector starting point of the current feature vector to obtain the index feature vector. Subsequently, the vector end point of the index feature vector is identified, and the welding area feature point with the same feature position as the vector end point is searched in the target welding feature distribution map. Finally, the feature point is fed back to the user as the target welding area feature point. For example, if the current feature position is (0.75, 0.6) and the current feature vector is Then the vector end point of the index feature vector is (0.85, 0.7). In the target welding feature distribution map, find the welding area feature point with the feature position of (0.85, 0.7) and use it as the target welding area feature point.

[0030] In order to implement the above method, the present invention also provides a PCB welding defect rapid identification system based on YOLO. Figure 3As shown in the figure, the system includes multiple functional modules: The initial welding feature distribution map construction module is responsible for extracting the feature points of the welding area and generating the initial welding feature distribution map; the target welding feature distribution map construction module is responsible for analyzing the spatial association attributes between the feature points of the welding area and generating the target welding feature distribution map; the feature vector association relationship establishment module is responsible for calculating the feature vectors and fine-tuning the initial YOLO model; the current welding area feature point extraction module is responsible for judging whether there are feature points in the welding area in the image to be detected and extracting the current welding area feature points; the target welding area feature point feedback module is responsible for indexing the target welding area feature points according to the current feature position and feature vectors and feeding them back to the user. These modules work together to jointly achieve the rapid identification of PCB welding defects.

[0031] In addition, the present invention also provides an electronic device and a computer-readable storage medium. The electronic device includes at least one processor and a memory communicatively connected thereto. The memory stores instructions executable by the processor, and these instructions are used to implement the above-mentioned rapid identification method for PCB welding defects based on YOLO. The computer-readable storage medium also stores at least one instruction, and when these instructions are executed by the processor in the electronic device, the same functions can be achieved. In this way, the technical solution of the present invention can be flexibly deployed on various hardware platforms to meet the requirements of different application scenarios.

[0032] In summary, the present invention significantly improves the speed and accuracy of PCB welding defect detection by constructing the target welding feature distribution map and combining it with the YOLO model. In practical applications, this method can quickly locate the feature points of the welding area and identify potential defects, providing strong technical support for industrial production.

Claims

1. A YOLO-based PCB welding defect rapid identification method, characterized in that: The method includes: acquiring PCB welding image data, sequentially extracting welding area feature points from the PCB welding image data, identifying local texture complexity and edge gradient strength of the welding area feature points, wherein the welding area feature points are welding point centers or welding point boundaries; determining feature positions of the welding area feature points in a pre-constructed welding feature distribution map according to the local texture complexity and edge gradient strength, and obtaining an initial welding feature distribution map; acquiring spatial correlation attributes between welding area feature points in the PCB welding image data, and correlating and connecting the welding area feature points in the initial welding feature distribution map using the spatial correlation attributes to obtain a target welding feature distribution map; acquiring a feature vector between two welding area feature points in the target welding feature distribution map, and fine-tuning a pre-constructed initial YOLO model according to the feature vector, welding area feature points and spatial correlation attributes to obtain a target YOLO model; the step of acquiring a feature vector between two welding area feature points in the target welding feature distribution map includes: acquiring feature positions of two welding area feature points that are correlatively connected in the target welding feature distribution map; and calculating a feature vector between the two welding area feature points according to a pre-constructed feature vector calculation formula using the feature positions; the feature vector calculation formula is as follows: ,in, Represents the feature vector from the feature point of the welding area to the feature point of the welding area, Indicates the characteristic position of the characteristic points in the welding area, Indicates the characteristic position of the characteristic points of the associated welding area, represents the transverse unit vector, Represents a longitudinal unit vector; obtains a PCB welding image to be detected, and determines whether there is a welding area feature point in the PCB welding image; extracts the current spatial correlation attribute of the current welding area feature point in the PCB welding image, and inputs the current welding area feature point and the current spatial correlation attribute into the target YOLO model to obtain a current feature vector; obtains the current feature position of the current welding area feature point, and indexes the target welding area feature point in the target welding feature distribution map according to the current feature position and the current feature vector, and feeds back the target welding area feature point to the user.

2. The YOLO-based PCB welding defect rapid identification method according to claim 1, characterized in that: The method of determining the characteristic position of the welding area feature point in a pre-constructed welding feature distribution map according to the local texture complexity and the edge gradient strength to obtain an initial welding feature distribution map includes: taking the local texture complexity as a horizontal coordinate point in the welding feature distribution map; taking the edge gradient strength as a vertical coordinate point in the welding feature distribution map; determining the characteristic position of the welding area feature point in the welding feature distribution map according to the horizontal coordinate point and the vertical coordinate point; and calibrating the characteristic positions of all welding area feature points in the welding feature distribution map to obtain the initial welding feature distribution map.

3. The YOLO-based PCB welding defect rapid identification method as claimed in claim 2, characterized in that: The method of acquiring spatial correlation attributes between welding area feature points in the PCB welding image data, and correlating and connecting the welding area feature points in the initial welding feature distribution map using the spatial correlation attributes to obtain a target welding feature distribution map includes: acquiring an associated welding area feature point set associated with the welding area feature points; sequentially extracting associated welding area feature points from the associated welding area feature point set, and identifying spatial correlation attributes between the welding area feature points and the associated welding area feature points; and correlating and connecting the welding area feature points with the associated welding area feature points using the spatial correlation attributes to obtain the target welding feature distribution map.

4. The YOLO-based PCB welding defect rapid identification method according to claim 1, characterized in that: The determining whether there is a welding area feature point in the PCB welding image includes: if there is no welding area feature point in the PCB welding image, obtaining a previous welding image set including the PCB welding image, and extracting a current welding area feature point in the previous welding image set; if there is a welding area feature point in the PCB welding image, extracting the current welding area feature point in the PCB welding image; removing a preset background noise and interference area in the PCB welding image to obtain an initial welding area candidate set; determining whether there is a welding area feature point in the initial welding area candidate set; if there is a welding area feature point in the initial welding area candidate set, determining that there is a welding area feature point in the PCB welding image; if there is no welding area feature point in the initial welding area candidate set, determining that there is no welding area feature point in the PCB welding image.

5. The YOLO-based PCB welding defect rapid identification method as claimed in claim 4, characterized in that: The step of acquiring a pre-welding image set including the PCB welding image and extracting a current welding area feature point from the pre-welding image set includes: extracting a first pre-welding image of the PCB welding image from the pre-welding image set; judging whether there is a welding area feature point in the first pre-welding image; if there is no welding area feature point in the first pre-welding image, extracting pre-welding images from the pre-welding image set in reverse order until there is a welding area feature point in the pre-welding image, and using the welding area feature point as the current welding area feature point; if there is a welding area feature point in the first pre-welding image, extracting the current welding area feature point in the first pre-welding image.

6. The YOLO-based PCB welding defect rapid identification method according to claim 1, characterized in that: The method of indexing a target welding area feature point in the target welding feature distribution map according to the current feature position and the current feature vector includes: taking the current feature position as the vector starting point of the current feature vector to obtain an index feature vector; identifying the vector end point of the index feature vector, identifying a welding area feature point whose feature position is the same as the vector end point; and taking the welding area feature point whose feature position is the same as the vector end point as the target welding area feature point.

7. The YOLO-based PCB welding defect rapid identification method according to claim 4, characterized in that: The method further comprises: determining whether there is a current spatial correlation attribute matching the current welding area feature point in the PCB welding image; if there is no current spatial correlation attribute matching the current welding area feature point in the PCB welding image, continuing to extract the current welding area feature point in the previous welding image set until a current welding area feature point matching the current spatial correlation attribute is obtained, and extracting the current spatial correlation attribute of the current welding area feature point in the PCB welding image; if there is a current spatial correlation attribute matching the current welding area feature point in the PCB welding image, extracting the current spatial correlation attribute of the current welding area feature point in the PCB welding image.

8. A YOLO-based PCB welding defect rapid identification system, characterized in that: The system comprises: an initial welding feature distribution map construction module, which is used to obtain PCB welding image data, sequentially extract welding area feature points from the PCB welding image data, identify local texture complexity and edge gradient strength of the welding area feature points, wherein the welding area feature points are welding point centers or welding point boundaries; determine feature positions of the welding area feature points in a pre-constructed welding feature distribution map according to the local texture complexity and edge gradient strength, and obtain an initial welding feature distribution map; a target welding feature distribution map construction module, which is used to obtain spatial correlation attributes between welding area feature points in the PCB welding image data, and use the spatial correlation attributes to correlate the welding area feature points in the initial welding feature distribution map to obtain a target welding feature distribution map; a feature vector correlation relationship establishment module, which is used to obtain a feature vector between two welding area feature points in the target welding feature distribution map, and micro-connect the pre-constructed initial YOLO model according to the feature vector, welding area feature points and spatial correlation attributes. to obtain a target YOLO model; a current welding area feature point extraction module, used to obtain a PCB welding image to be detected, and determine whether there is a welding area feature point in the PCB welding image; if there is no welding area feature point in the PCB welding image, a pre-welding image set containing the PCB welding image is obtained, and the current welding area feature point is extracted from the pre-welding image set; if there is a welding area feature point in the PCB welding image, the current welding area feature point is extracted from the PCB welding image; a target welding area feature point feedback module, used to extract the current spatial correlation attribute of the current welding area feature point in the PCB welding image, input the current welding area feature point and the current spatial correlation attribute into the target YOLO model, and obtain a current feature vector; obtain the current feature position of the current welding area feature point, index the target welding area feature point in the target welding feature distribution map according to the current feature position and the current feature vector, and feed back the target welding area feature point to the user.

Citation Information

Patent Citations

  • PCB surface defect detection method and device based on YOLOv3 algorithm

    CN112669275A

  • PCB welding defect detection method based on deep learning

    CN115100393A