Server PCB defect detection system based on machine vision
By dividing the server PCB into multiple detection areas, data is collected in parallel, combined with historical database and consistency proofreading, the server PCB detection time is solved, and efficient and reliable defect detection is achieved.
Patent Information
- Application Number
- CN202510675033.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-23
- Publication Date
- 2025-08-01
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
In the prior art, server PCB defect detection has problems such as long detection time, low detection accuracy, susceptible to environmental factors and lack of review mechanisms.
Using a server PCB defect detection system based on machine vision, the PCB is divided into multiple detection areas, each station is equipped with a machine vision detection unit to collect data in parallel, set up overlapping areas of adjacent stations, and construct a historical database for feature comparison and consistency verification. The defect is identified using Euclidean distance and cosine similarity scores, and the overlapping area results are collected for consistency verification.
It greatly shortens detection time, improves detection efficiency and accuracy, reduces interference from environmental factors, improves the reliability and credibility of detection results, keenly judges the faults of the detection unit and triggers early warnings, and enhances the ability to identify unknown defects.
Smart Images

Figure CN120404788A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of PCB detection, and particularly to a server PCB defect detection system based on machine vision. Background Art
[0002] As a core component of electronic devices, the server PCB (Printed Circuit Board) defect detection is crucial for product quality and reliability. PCB board detection refers to a series of inspections and tests on the Printed Circuit Board (PCB) to ensure it meets the design specifications and quality standards. The PCB is one of the core components of modern electronic devices, used to support and connect various electronic components such as resistors, capacitors, integrated circuits, etc. Therefore, the quality of the PCB directly affects the reliability and performance of the final product.
[0003] Currently, in the prior art, the machine vision-based PCB defect detection technology has been widely applied. However, considering the characteristics of large size and many detection areas of server PCBs, the system needs to move the PCB or the detection device multiple times, resulting in a long detection time. Moreover, positioning errors are easily introduced during the movement process, affecting the detection accuracy. At the same time, during the machine vision detection process of server PCBs, a single detection method is usually adopted. Due to the complex detection environment of server PCBs, the machine vision device is easily affected by factors such as environmental light changes, device vibrations, and electromagnetic interference. Single detection is difficult to ensure the accuracy of the results. At the same time, single detection lacks a review mechanism. Once an error occurs, it will directly lead to unqualified products flowing into the next production link.
[0004] Therefore, a server PCB defect detection system based on machine vision is proposed to solve the above problems. Summary of the Invention
[0005] The main purpose of the present invention is to provide a server PCB defect detection system based on machine vision to solve the problems mentioned in the above background.
[0006] To achieve the above purpose, the technical solution adopted by the present invention is: a server PCB defect detection system based on machine vision, the system includes a layout module, a construction module, a defect detection module, and a proofreading module; The layout module unit divides the server PCB into N detection areas, and each station is equipped with a machine vision detection unit to collect data in parallel, and overlapping areas are set between adjacent stations; The construction module collects historical PCB defect and PCB normal sample features through a data collector and constructs a historical database through MySQL; The defect detection module is used to receive the parallelly acquired data, extract features for defect identification and judgment, and determine the defect category by comparing the extracted features with those in the feature historical database. If an unknown defect or a known defect is identified, it enters the verification module. The verification module is used to perform consistency verification on the detection results of the overlapping areas of unknown defects or known defects. If there is an inconsistency, it means that the machine vision detection unit has a fault. If the verification is consistent and the defect is identified as an unknown defect, the unknown defect sample is marked and stored in the historical database, and an alarm is triggered to notify professionals for handling. If it is a known defect, the defect result is directly output.
[0007] Preferably, the layout module includes a division unit and a machine vision detection unit. The division unit is used to divide the PCB into N detection areas, and an overlapping area is set between adjacent workstations. The machine vision detection unit includes a high-resolution camera for acquiring images of the PCB, a light source system for providing uniform illumination, and an embedded edge device for preprocessing the acquired images.
[0008] Preferably, the defect detection module includes a feature extraction unit, a defect identification unit, and a defect classification unit. The feature extraction unit is used to receive the parallelly acquired data and simultaneously extract features from the parallelly acquired data using CNN. The features include edge features, shape features, and texture features.
[0009] Preferably, the defect identification unit performs PCB defect identification based on the features extracted by the feature extraction unit and the features of normal PCB samples in the historical database. The steps are as follows: (1) Calculate the Euclidean distance between the current feature vector and the normal sample feature vector. The calculation formula is as follows: ; Where, represents the Euclidean distance between the current feature vector and the normal sample feature vector, represents the number of feature dimensions represents the currently extracted feature value, represents the corresponding feature value of the normal sample; (2) Set a distance threshold , when is greater than or equal to , it is determined that there is a defect and it enters the defect classification unit. When is less than , it is determined that there is no defect and the PCB is normal.
[0010] Preferably, the defect classification unit identifies PCB defects based on the features extracted by the feature extraction unit and the PCB defect sample features in the historical database. The steps are as follows: Step 1: Calculate the cosine similarity between the extracted features and the PCB defect sample features in the historical database. The calculation formula is as follows: ; Where, represents the cosine similarity, represents the weight of the th feature, represents the features extracted based on the feature extraction unit, represents the PCB defect sample features in the historical database; Step 2: Calculate the confidence score. The calculation formula is as follows: ; Where, represents the confidence score that the current PCB belongs to the th type of defect, represents the cosine similarity, represents the maximum value in calculating the cosine similarity in Step 1; Step 3: Select the defect with the highest confidence score as the known defect category of the current PCB, and set the confidence threshold . When is less than , then label the current PCB defect as an unknown defect. After the PCB defect category is identified, enter the proofreading module.
[0011] Preferably, the proofreading module includes a collection unit, an overlapping unit, a proofreading unit, and a processing unit.
[0012] Preferably, the collection unit is used to receive the detection results of the overlapping areas of PCB unknown defects or known defects at different stations.
[0013] Preferably, the detection results include the defect category and the position information of the defect on the PCB.
[0014] Preferably, the overlapping unit is used to calculate the overlapping degree of the areas corresponding to the two detection results; let the coordinate range of area 1 be , and the coordinate range of area 2 be ; If it satisfies and , and at the same time and , then it means the two areas overlap.
[0015] Preferably, the calibration unit performs consistency calibration on the detection results of the overlapping areas of the two regions. If the detection results of the overlapping areas of the two regions are the same, such as both being known defects, it is determined that the PCB is abnormal, and an abnormal result is output. If the detection results of the overlapping areas of the two regions are the same, such as both being unknown defects, it is determined that the PCB is abnormal, an abnormal result is output, the unknown defect samples are marked and stored in the historical database, and an alarm is triggered to notify professionals for handling and update the historical database. If the detection results of the overlapping areas of the two regions are different, such as one being a known defect and the other being an unknown defect or both being known defects but with different known defect categories, it is determined that the machine vision detection unit has a fault, the early warning mechanism is triggered, and relevant personnel are notified for inspection and repair.
[0016] The present invention has the following beneficial effects: 1. In the present invention, the layout module divides the PCB into multiple detection regions, and the machine vision detection units at each station collect data in parallel, changing the traditional detection method that requires moving the PCB or equipment multiple times, greatly shortening the detection time, significantly improving the detection efficiency, and setting overlapping regions between adjacent stations to provide a data verification basis for the subsequent calibration module, which can effectively reduce the interference of environmental factors on the detection results and improve the detection accuracy. In the defect detection module, by extracting the PCB feature information and comparing it with the feature of the normal sample in the historical database at the same time, the Euclidean distance is used to calculate and judge whether there is a defect. The defect classification unit can accurately classify the known defect categories by calculating the cosine similarity and confidence score, and make a reasonable identification of the unknown defect at the same time, improving the reliability of the detection results.
[0017] 2. In the present invention, the collection unit collects the detection results of the overlapping areas at different stations, and the calibration unit performs consistency calibration accordingly. If the results are the same, whether they are known defects or unknown defects, the abnormal state of the PCB can be determined, avoiding wrong conclusions caused by misjudgment of a single detection unit and improving the credibility of the detection results. And when the detection results of the overlapping areas are different, such as there are differences in the defect category or status determination, it can keenly judge that the machine vision detection unit has a fault and trigger an early warning. And for the case where the defect is determined to be unknown, after determining the abnormality of the PCB, the unknown defect samples will be marked and stored in the historical database, and an alarm will be triggered to notify professionals, promoting the continuous optimization of the system, enhancing the ability to identify various defects, and better adapting to complex and diverse detection requirements. Description of the Drawings
[0018] Figure 1 It is a flowchart of the server PCB defect detection system based on machine vision of the present invention. Figure 2This is the framework diagram of the calibration unit of the server PCB defect detection system based on machine vision of the present invention. Specific embodiments
[0019] Next, the technical solutions in the embodiments of the present invention will be clearly and completely described in conjunction with the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of the present invention.
[0020] Embodiment 1: Please refer to Figure 1 and Figure 2 , the present invention provides a technical solution: a server PCB defect detection system based on machine vision, the system includes a layout module, a construction module, a defect detection module, and a calibration module; The layout module unit divides the server PCB into N detection areas, and each station is equipped with a machine vision detection unit to collect data in parallel, and overlapping areas are set between adjacent stations; The construction module collects historical PCB defect and PCB normal sample features through a data collector and constructs a historical database through MySQL; The defect detection module is used to receive the data collected in parallel, extract features, and perform defect identification and judgment, and judge the defect category by comparing the extracted features with the features in the historical database. If an unknown defect or a known defect is identified, it will enter the calibration module; The calibration module is used to perform consistency verification on the detection results of the overlapping areas of unknown defects or known defects. If there is inconsistency, it means that the machine vision detection unit has a fault. If the verification is consistent and the defect is identified as an unknown defect, the unknown defect sample will be marked and stored in the historical database, and an alarm will be triggered to notify professionals for processing. If it is a known defect, the defect result will be directly output.
[0021] The layout module includes a division unit and a machine vision detection unit; The division unit is used to divide the PCB into N detection areas, and overlapping areas are set between adjacent stations; The machine vision detection unit includes a high-resolution camera for obtaining images of the PCB, a light source system for providing uniform illumination, and an embedded edge device for preprocessing the collected images.
[0022] The defect detection module includes a feature extraction unit, a defect identification unit, and a defect classification unit; The feature extraction unit is used to receive the data collected in parallel, and at the same time uses CNN to extract features from the data collected in parallel. The features include edge features, shape features, and texture features.
[0023] The defect recognition unit performs PCB defect recognition based on the features extracted by the feature extraction unit and the PCB normal sample features in the historical database. The steps are as follows: (1) Calculate the Euclidean distance between the current feature vector and the normal sample feature vector. The calculation formula is as follows: ; Where, represents the Euclidean distance between the current feature vector and the normal sample feature vector, represents the number of feature dimensions, represents the currently extracted feature value, represents the corresponding feature value of the normal sample; (2) Set the distance threshold , when is greater than or equal to , it is determined that there is a defect and it enters the defect classification unit. When is less than , it is determined that there is no defect and the PCB is normal.
[0024] The defect classification unit performs PCB defect recognition based on the features extracted by the feature extraction unit and the PCB defect sample features in the historical database. The steps are as follows: Step 1: Calculate the cosine similarity between the extracted features and the PCB defect sample features in the historical database. The calculation formula is as follows: ; Where, represents the cosine similarity, represents the weight of the th feature, represents the features extracted based on the feature extraction unit, represents the PCB defect sample features in the historical database; Step 2: Perform confidence score calculation. The calculation formula is as follows: Specifically, Experts with profound professional knowledge and rich practical experience in the field of server PCB defect detection subjectively assign weights to each feature based on their understanding and judgment of the importance of various features in defect recognition.
[0025] Step 2: Perform confidence score calculation. The calculation formula is as follows: ; Where, represents the confidence score that the current PCB belongs to the th type of defect, represents the cosine similarity, Represents the maximum value in calculating the cosine similarity in Step 1; Step 3: Select the defect with the highest confidence score as the current known defect category of the PCB, and at the same time set a confidence threshold , when is less than , then label the current PCB defect as an unknown defect. After the PCB defect category is identified, enter the proofreading module.
[0026] In this embodiment, the layout module divides the PCB into multiple detection areas, and the machine vision detection units at each station collect data in parallel, changing the traditional detection method that requires the PCB or equipment to be moved multiple times, greatly shortening the detection time, significantly improving the detection efficiency, and setting overlapping areas between adjacent stations, providing a data verification basis for the subsequent proofreading module, effectively reducing the interference of environmental factors on the detection results, and improving the detection accuracy. In the defect detection module, by extracting the PCB feature information and comparing it with the feature of the normal sample in the historical database at the same time, the Euclidean distance is used to calculate and judge whether there is a defect. The defect classification unit can accurately classify the known defect category and reasonably identify the unknown defect by calculating the cosine similarity and the confidence score, and comparing the extracted features with the features of the historical defect samples in detail, improving the reliability of the detection results.
[0027] Embodiment 2: Please refer to Figure 1 and Figure 2 , the present invention provides a technical solution: based on Embodiment 1, the proofreading module includes a collection unit, an overlapping unit, a proofreading unit, and a processing unit.
[0028] The collection unit is used to receive the detection results of the unknown defects or known defect overlapping areas of the PCB at different stations.
[0029] The detection results include the defect category and the position information of the defect on the PCB.
[0030] The overlapping unit is used to calculate the overlapping degree of the two areas corresponding to the two detection results; let the coordinate range of area 1 be , and the coordinate range of area 2 be ; If it satisfies and , and at the same time and , then it represents that the two areas overlap.
[0031] The proofreading unit performs consistency proofreading on the detection results of the overlapping areas of the two areas. If the detection results of the overlapping areas of the two areas are the same, such as both being known defects, then it is determined that the PCB has an abnormality and an abnormal result is output; If the detection results of the overlapping regions of the two regions are the same, such as both being unknown defects, it is determined that the PCB is abnormal, an abnormal result is output, the unknown defect samples are marked and stored in the historical database, and an alarm is triggered to notify professionals to handle it and update the historical database; If the detection results of the overlapping regions of the two regions are different, such as one being a known defect, one being an unknown defect, or both being known defects but with different known defect categories, it is determined that the machine vision detection unit has failed, the early warning mechanism is triggered, and relevant personnel are notified for inspection and repair.
[0032] In this embodiment, the collection unit collects the detection results of the overlapping regions at different workstations, and the verification unit performs consistency verification based on this. If the results are the same, whether it is a known defect or an unknown defect, the abnormal state of the PCB can be determined, avoiding incorrect conclusions caused by misjudgment of a single detection unit, improving the credibility of the detection results. And when the detection results of the overlapping regions are different, such as there are differences in defect categories or status judgments, it can keenly determine that the machine vision detection unit has failed and trigger an early warning. And for the case where the defect is determined to be unknown, after determining the abnormality of the PCB, the unknown defect samples will be marked and stored in the historical database, and at the same time, an alarm will be triggered to notify professionals, promoting the continuous optimization of the system, enhancing the ability to identify various defects, and better adapting to complex and diverse detection requirements.
[0033] In the present invention, for the server PCB defect detection system based on machine vision, the layout module divides the PCB into multiple detection regions, and the machine vision detection units at each workstation collect data in parallel, changing the traditional detection method that requires the PCB or equipment to be moved multiple times, greatly shortening the detection time and significantly improving the detection efficiency. And the overlapping regions set between adjacent workstations provide a key data verification basis for the subsequent verification module. For example, in actual detection, environmental factors such as light changes, slight vibrations, and electromagnetic interference are very likely to affect the detection results. Through the data comparison of the overlapping regions, the error interference caused by environmental factors can be effectively eliminated, greatly improving the detection accuracy. In the defect detection module, by extracting the PCB feature information and comparing it with the feature of the normal sample in the historical database at the same time, the Euclidean distance is used to calculate and determine whether there is a defect. The defect classification unit carefully compares the extracted features with the features of the historical defect samples by calculating the cosine similarity and confidence score, can accurately classify the known defect categories, and at the same time make a reasonable identification of the unknown defects, improving the reliability of the detection results; The collection unit collects the detection results of the overlapping area at different workstations, and the calibration unit performs consistency calibration accordingly. If the results are the same, whether it is a known defect or an unknown defect, the abnormal state of the PCB can be determined, avoiding wrong conclusions caused by misjudgment of a single detection unit, improving the credibility of the detection results. And when the detection results of the overlapping area are different, such as differences in defect categories or status judgments, it can keenly judge that the machine vision detection unit has failed and trigger an alarm. In addition, for the case of an unknown defect, after determining the abnormality of the PCB, the unknown defect sample will be marked and stored in the historical database, and an alarm will be triggered to notify professionals, promoting the continuous optimization of the system, enhancing the ability to identify various defects, and better adapting to complex and diverse detection requirements.
[0034] It should be noted that in this article, relational terms such as first and second are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any actual relationship or order between these entities or operations. Moreover, the term "comprising", "including" or any other variant thereof is intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements not only includes those elements, but also includes other elements not expressly listed, or also includes elements inherent to such process, method, article or device.
[0035] Although the embodiments of the present invention have been shown and described, for those of ordinary skill in the art, it can be understood that various changes, modifications, substitutions and variations can be made to these embodiments without departing from the principles and spirit of the present invention. The scope of protection claimed by the present invention is defined by the appended claims and their equivalents.
Claims
1. A server PCB defect detection system based on machine vision, characterized in that, The system includes a layout module, a construction module, a defect detection module, and a proofreading module; The layout module unit divides the server PCB into N detection areas, and each station is equipped with a machine vision detection unit to collect data in parallel, and overlapping areas are set between adjacent stations; The construction module collects historical PCB defect and PCB normal sample features through a data collector and constructs a historical database through MySQL; The defect detection module is used to receive the data collected in parallel, extract features for defect identification and judgment, and judge the defect category by comparing the extracted features with the features in the historical database. If an unknown defect or a known defect is identified, it enters the proofreading module; The proofreading module is used to perform consistency verification on the detection results of the overlapping areas of unknown defects or known defects. If there is inconsistency, it means that the machine vision detection unit has a fault. If the verification is consistent and the defect is identified as an unknown defect, the unknown defect sample is marked and stored in the historical database, and an alarm is triggered to notify professionals for processing. If it is a known defect, the defect result is directly output.
2. The server PCB defect detection system based on machine vision according to claim 1, characterized in that, The layout module includes a division unit and a machine vision detection unit; The division unit is used to divide the PCB into N detection areas, and overlapping areas are set between adjacent stations; The machine vision detection unit includes a high-resolution camera for obtaining images of the PCB, a light source system for providing uniform illumination, and an embedded edge device for preprocessing the collected images.
3. The server PCB defect detection system based on machine vision according to claim 1, characterized in that, The defect detection module includes a feature extraction unit, a defect identification unit, and a defect classification unit; The feature extraction unit is used to receive the data collected in parallel, and at the same time uses CNN to extract features from the data collected in parallel. The features include edge features, shape features, and texture features.
4. The server PCB defect detection system based on machine vision according to claim 3, characterized in that, The defect identification unit performs PCB defect identification based on the features extracted by the feature extraction unit and the PCB normal sample features in the historical database. The steps are as follows: (1) Calculate the Euclidean distance between the current feature vector and the normal sample feature vector. The calculation formula is as follows: ; Among them, represents the Euclidean distance between the current feature vector and the feature vector of the normal sample, represents the number of feature dimensions, represents the currently extracted eigenvalue, represents the corresponding eigenvalue of the normal sample; (2)Set the distance threshold When is greater than or equal to , it is determined that there is a defect and it enters the defect classification unit. When is less than , it is determined that there is no defect and the PCB is normal.
5. The server PCB defect detection system based on machine vision according to claim 3, characterized in that, The defect classification unit performs PCB defect identification based on the features extracted by the feature extraction unit and the PCB defect sample features in the historical database. The steps are as follows: Step 1: Calculate the cosine similarity between the extracted features and the PCB defect sample features in the historical database. The calculation formula is as follows: ; Among them, represents the cosine similarity, represents the weight of the th feature, represents the features of PCB defect samples in the historical database; Step 2: Perform confidence score calculation. The calculation formula is as follows: ; Among them, represents the confidence score that the current PCB belongs to the type of defect, represents the cosine similarity, represents the maximum value in the calculation of the cosine similarity in the first step; Step 3: Select the defect with the highest confidence score as the current known defect category of the PCB, and at the same time set a confidence threshold , when is less than , then label the current PCB defect as an unknown defect. After the PCB defect category is identified, enter the proofreading module.
6. The server PCB defect detection system based on machine vision according to claim 1, wherein The proofreading module includes a collection unit, an overlapping unit, a proofreading unit, and a processing unit.
7. The server PCB defect detection system based on machine vision according to claim 6, characterized in that, The collection unit is used to receive the detection results of the overlapping areas of PCB unknown defects or known defects at different stations.
8. The server PCB defect detection system based on machine vision according to claim 7, characterized in that, The detection results include the defect category and the location information of the defect on the PCB.
9. The server PCB defect detection system based on machine vision according to claim 6, characterized in that The overlapping unit is used to calculate the overlapping degree of the regions corresponding to two detection results. Let the coordinate range of Region 1 be , and the coordinate range of Region 2 be ; If the following conditions are met and , and at the same time and , it means that the two regions overlap.
10. The server PCB defect detection system based on machine vision according to claim 6, wherein, The proofreading unit performs consistency proofreading on the detection results of the overlapping areas of the two regions. If the detection results of the overlapping areas of the two regions are the same, such as when they are both known defects, it is determined that the PCB is abnormal and an abnormal result is output; If the detection results of the overlapping regions of the two regions are the same, such as both being unknown defects, it is determined that there is an abnormality in the PCB, the abnormal result is output, the unknown defect samples are marked and stored in the historical database, and an alarm is triggered to notify the professional personnel for handling and update the historical database; If the detection results of the overlapping regions of the two regions are different, such as one being a known defect, one being an unknown defect, or both being known defects but with different known defect categories, it is determined that the machine vision detection unit has a fault, the early warning mechanism is triggered, and relevant personnel are notified for inspection and repair.
Citation Information
Patent Citations
PCB surface defect detection method and apparatus based on rapid geometric alignment
CN108765416A
PCB defect automatic detection system based on machine vision
CN112604998A
Small-size curved surface component global defect fine quantitative identification method
CN114549449A
Surface defect detection method and system, electronic equipment and storage medium
CN115063357A
Inspection defect identification system and method and computer program storage medium
CN117011262A