A Machine Vision-Based Real-Time Monitoring and Identification Method for PCB Board Sorting Quality
By training a deep learning model and calculating its evaluation value, the most suitable model is selected for PCB board sorting. This solves the problem of large differences in model performance under different environments and improves the accuracy and adaptability of sorting quality monitoring.
Patent Information
- Application Number
- CN202510685752.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-26
- Publication Date
- 2026-01-30
- Estimated Expiration
- 2045-05-26
AI Technical Summary
In existing technologies, deep learning models exhibit significant performance differences in different environments, making it difficult to adaptively select the appropriate model for PCB board sorting quality monitoring in various environments.
By training several deep learning models, the recognition accuracy is obtained, the out-of-range ratio, the out-of-range ratio, and the mean are calculated. Based on the evaluation values, the target objects are determined, and the most suitable model is selected for PCB board sorting.
It enables the evaluation and selection of models under different environments, provides the most suitable learning model for user scenarios, and improves the accuracy and adaptability of PCB board sorting quality monitoring.
Smart Images

Figure CN120599585B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of PCB board sorting and monitoring technology, specifically a real-time monitoring and identification method for PCB board sorting quality based on machine vision. Background Technology
[0002] Patent CN115739662A discloses an automatic PCB board sorting system and method, including a central processing system. One output of the central processing system is connected to a touch screen, and another output is connected to a main conveyor belt. An automatic feeding device is installed at one end of the main conveyor belt. The system includes the following operating steps: Step 1: The central processing system controls the automatic feeding device to feed PCB boards, placing them equidistantly on the main conveyor belt. The central processing system controls an infrared detector to identify and collect the dimensions of the PCB boards. The beneficial effects of this invention are: by setting up a PCB board sorting system for different sizes, PCB boards that do not meet the size requirements of the work order are sorted out; by setting up a PCB board sorting system for different models of the same size, PCB boards that do not meet the model requirements of the work order are sorted out; and by setting up a PCB board defect sorting system, defective PCB boards are sorted out.
[0003] For PCB board sorting, accurately controlling the sorting quality and supervising the sorting process using a suitable model is a challenge. Existing technologies employ many deep learning models to achieve this, some performing well and others only moderately. However, even the best-performing models exhibit different deviations when applied to different environments, and different models perform differently in different environments. Balancing or adaptively selecting a more suitable model is a difficult task. Based on this, a solution is proposed. Summary of the Invention
[0004] This invention aims to solve at least one of the technical problems existing in the prior art;
[0005] Therefore, this invention proposes a machine vision-based real-time monitoring and identification method for PCB board sorting quality, including:
[0006] Several deep learning models are trained to continuously identify the results of PCB board sorting over several days, and several recognition accuracy rates representing the objects identified by the deep learning models are obtained. Then, an evaluation value is calculated based on the out-of-range ratio (representing the dispersion of the several recognition accuracy rates), the poor-of-range ratio (representing the probability of low accuracy rates), and the mean of the recognition accuracy rates. Based on the evaluation value, the objects to be used are determined from the identified objects.
[0007] Furthermore, the training method for deep learning models is as follows:
[0008] Choose different deep learning models, including YOLOv5 and MobileNetV3;
[0009] Then, the deep learning model is trained to meet the specifications using data samples.
[0010] Furthermore, the specific training methods are as follows:
[0011] Obtain a specified number of data samples and divide them into training, validation, and test sets in an 8:1:1 ratio;
[0012] After labeling the defect areas and defect types, the model is fed into a deep learning model for training. After training, the parameters are adjusted using a validation set. Finally, the accuracy of the model is verified using a test set. If the accuracy does not meet the requirements, the model is retrained until it is usable.
[0013] Furthermore, the identification results of several different identification objects are sampled. The sampling method is to sample the identification results of different identification objects at the same frequency starting from the same time, and obtain the accuracy rate of the identification results based on the sampling results. The accuracy rate is obtained once a day for several consecutive days to obtain several accuracy rates.
[0014] Furthermore, the method for determining the deviation ratio is as follows:
[0015] The accuracy is labeled as Zi, i = 1, ..., n. The mean value P of Zi is automatically obtained. According to the filtering condition |Zi-P|≤X1, where X1 is a preset value, the number of Zi that does not meet the filtering condition is obtained. After dividing it by n, the out-of-error ratio is obtained.
[0016] Furthermore, the method for determining the inferiority ratio is as follows:
[0017] The number of P-Zi≥X1 is obtained, and the value obtained by dividing it by n is marked as the poorness ratio.
[0018] Furthermore, the evaluation value is obtained by adding the mean, the poorness ratio, and the betterness ratio together after assigning different weights to them.
[0019] Furthermore, the method for determining the object is as follows:
[0020] All identified objects are sorted from highest to lowest evaluation value, and the top two identified objects are then marked as the objects to be used.
[0021] Compared with the prior art, the beneficial effects of the present invention are:
[0022] This application trains several deep learning models to continuously identify the results of PCB board sorting over several days, obtaining several recognition accuracy rates representing the objects identified by the deep learning models. Then, it calculates an evaluation value based on the out-of-range ratio (representing the dispersion of the recognition accuracy rates), the poor-of-range ratio (representing the probability of low accuracy rates), and the mean of the recognition accuracy rates. Based on the evaluation value, it determines the objects to be used from the identified objects. This allows the application to make predictions on the evaluation of different models in the field and provide the most suitable learning model for the user scenario for discrimination. The invention is simple, effective, and easy to use. Attached Figure Description
[0023] Figure 1 A flowchart of the method provided by the present invention. Detailed Implementation
[0024] The technical solution of the present invention will be clearly and completely described below with reference to the embodiments. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0025] Please see Figure 1 This application provides a machine vision-based method for real-time monitoring and identification of PCB board sorting quality, including:
[0026] Step 1: Monitor the PCB board sorting quality using several deep learning models. The specific method is as follows:
[0027] A 5-megapixel industrial camera, paired with a ring-shaped multi-angle LED light source, is used to capture images of the PCB board surface.
[0028] Set different lighting conditions (500-3000 Lux); shoot from multiple angles (30-45° tilt); include common defect types: cold solder joints, component misalignment, copper foil breakage, scratches, solder bridging, and pinholes.
[0029] Defect identification using deep learning models can detect defects such as cold solder joints, component misalignment, and copper foil breakage; the deep learning models used here include YOLOv5 or MobileNetV3, etc.
[0030] The specific methods for using deep learning models are as follows:
[0031] First, prepare and label the dataset;
[0032] At least 10,000 labeled images were obtained as data samples, and then the data samples were divided into training set, validation set and test set in an 8:1:1 ratio.
[0033] Then use Label lmg or CVAT tools to annotate the defect areas and generate a YOLO format .txt file; when annotating, simultaneously annotate the defect type, such as cold solder joint, offset, and copper foil breakage, etc.
[0034] The labeled training set is fed into the deep learning model for training. After training, the parameters of the deep learning model are adjusted with the help of the validation set.
[0035] Finally, the accuracy of the deep learning model is verified using a test set. If the accuracy exceeds the preset value, the deep learning model is considered reasonable. Otherwise, data samples are collected again, and the deep learning model is trained until it is usable.
[0036] The model is used to deploy relevant equipment to identify problems after PCB board sorting;
[0037] Step 2: For ease of description later, all deep learning models are labeled as recognition objects. Using several recognition objects, the PCB production lines that are working simultaneously on different production lines are identified, and the recognition results are automatically obtained.
[0038] Step 3: Sampling inspection of the recognition results of several different recognition objects. The sampling method is to sample the recognition results of different recognition objects at the same frequency starting from the same time, and obtain the accuracy rate of the recognition results based on the sampling results. The accuracy rate is obtained once a day for several consecutive days to obtain several accuracy rates.
[0039] Step 4: Analyze the accuracy rates of several identified objects. The specific analysis method is as follows:
[0040] The accuracy of several randomly selected recognition objects;
[0041] The accuracy rate is labeled Zi, i = 1, ..., n, indicating that n accuracy rates were obtained by continuously collecting data for n days.
[0042] The mean value P of Zi is automatically obtained. According to the filtering condition |Zi-P|≤X1, where X1 is a preset value, the number of Zi that do not meet the filtering condition is obtained. After dividing it by n, the out-of-tolerance ratio is obtained.
[0043] At the same time, the number of P-Zi≥X1 is obtained, and the value obtained by dividing it by n is marked as the poorness ratio;
[0044] The evaluation value of the corresponding identified object is calculated according to the formula, which is as follows:
[0045] Evaluation value = 0.43 × P + 0.35 × Exceedance ratio + 0.22 × Poor ratio;
[0046] Obtain the evaluation value of the corresponding identified object;
[0047] Then, the same process is applied to all identified objects to obtain the evaluation values for all identified objects;
[0048] Step 5: Sort all the identified objects according to their evaluation scores from largest to smallest, and then mark the top two identified objects as the objects to be used;
[0049] Step 6: Arrange half of the PCB board sorting production line according to the target users, and monitor the process.
[0050] As a second embodiment of the present invention, this application also provides the following implementation method, specifically:
[0051] Step 1: Monitor the PCB board sorting quality using several deep learning models;
[0052] Step 2: For ease of description later, all deep learning models are labeled as recognition objects. Using several recognition objects, the PCB production lines that are working simultaneously on different production lines are identified, and the recognition results are automatically obtained.
[0053] Step 3: Sampling inspection of the recognition results of several different recognition objects. The sampling method is to sample the recognition results of different recognition objects at the same frequency starting from the same time, and obtain the accuracy rate of the recognition results based on the sampling results. The accuracy rate is obtained once a day for several consecutive days to obtain several accuracy rates.
[0054] Step 4: Analyze the accuracy rates of several identified objects. The specific analysis method is as follows:
[0055] The accuracy of several randomly selected recognition objects;
[0056] The accuracy rate is labeled Zi, i = 1, ..., n, indicating that n accuracy rates were obtained by continuously collecting data for n days.
[0057] The mean P of Zi is automatically obtained, and the deviation W of Zi is calculated using the formula:
[0058]
[0059] If W exceeds the preset value X2, it will be automatically sorted in descending order according to |Zi-P|, and the corresponding Zi will be selected in sequence and then deleted. After deletion, the W value of the remaining Zi will be calculated. If it still exceeds the preset value X2, the next Zi will be selected in sequence until the W value does not exceed X2.
[0060] Obtain the proportion of deleted Zi values out of all Zi values and mark it as the out-of-tolerance ratio;
[0061] Then, obtain the values of Zi that are less than P from the deleted Zi, divide them by n, and mark the resulting values as the poorness ratios.
[0062] The evaluation value of the corresponding identified object is calculated according to the formula, which is as follows:
[0063] Evaluation value = 0.43 × P + 0.35 × Exceedance ratio + 0.22 × Poor ratio;
[0064] Obtain the evaluation value of the corresponding identified object;
[0065] Then, the same process is applied to all identified objects to obtain the evaluation values for all identified objects;
[0066] Step 5: Sort all the identified objects according to their evaluation scores from largest to smallest, and then mark the top two identified objects as the objects to be used;
[0067] Step 6: Arrange half of the PCB board sorting production line according to the target users, and monitor it.
[0068] The above embodiments are only used to illustrate the technical methods of the present invention and are not intended to limit it. Although the present invention has been described in detail with reference to preferred embodiments, those skilled in the art should understand that modifications or equivalent substitutions can be made to the technical methods of the present invention without departing from the spirit and scope of the technical methods of the present invention.
Claims
1. A machine vision-based real-time monitoring and identification method for PCB sorting quality, characterized in that, The application comprises the following steps: Train several deep learning models to recognize the results of PCB board sorting for several days in succession, and obtain several recognition accuracies representing the recognition objects of the deep learning models, then calculate an evaluation value according to the super-difference ratio representing the discrete degree of the several recognition accuracies, the poor-difference ratio representing the probability of low accuracy, and the mean of the recognition accuracies, and determine the use object from the recognition objects according to the evaluation value; The super-difference ratio determination method is as follows: Mark the accuracy as Zi, i=1,...,n, automatically obtain the mean P of Zi, and obtain the number of Zi that does not meet the screening condition |Zi-P|≤X1, where X1 is a preset value, divide the number by n to obtain the super-difference ratio; The poor-difference ratio determination method is as follows: Obtain the number of P-Zi≥X1, divide the number by n to obtain the poor-difference ratio; The evaluation value is obtained by adding the mean, poor-difference ratio and super-difference ratio with different weights. 2.The machine vision-based real-time monitoring and identifying method for PCB board sorting quality according to claim 1, characterized in that, The training method of the deep learning model is as follows: Select different deep learning models, including YOLOv5 and MobileNetV3; Then train the deep learning model to the standard level with the help of data samples. 3.The real-time monitoring and identifying method of PCB board sorting quality based on machine vision according to claim 2, characterized in that, The specific training method is as follows: Obtain several data samples of a specified number, divide them into training set, validation set and test set according to the ratio of 8:1:1; After labeling the defect area and defect type, put them into the deep model for training, adjust the parameters with the help of the validation set after training, finally verify the accuracy of the model with the help of the test set, and retrain when the accuracy does not meet the requirements until the model is available. 4.The machine vision-based real-time PCB board sorting quality monitoring and identifying method according to claim 1, characterized in that, The recognition results of several different recognition objects are sampled, the sampling method is as follows: sample the recognition results of different recognition objects from the same time according to the same frequency, and obtain the accuracy of the recognition results according to the sampling results, the accuracy is obtained once a day for several days to obtain several accuracies. 5.The real-time monitoring and identifying method of PCB board sorting quality based on machine vision according to claim 1, characterized in that, The use object determination method is as follows: Sort all recognition objects in descending order of evaluation value, and mark the top two recognition objects as use objects.
Citation Information
Patent Citations
Automatic sorting system and method for PCBs
CN115739662A