An intelligent identification device and method based on AI algorithm
Through intelligent identification devices and methods based on AI algorithms, defects in PCB images are automatically identified, solving the problems of low detection efficiency and low accuracy in the prior art, and achieving efficient and accurate PCB defect detection.
Patent Information
- Application Number
- CN202411777672.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-05
- Publication Date
- 2025-04-01
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
The existing PCB defect detection methods have strong subjectivity, low accuracy, low detection efficiency and manual review, resulting in low detection efficiency and accuracy and high cost.
Using intelligent recognition devices and methods based on AI algorithms, PCB images are acquired through the image acquisition module, and feature recognition and classification recognition is performed using preprocessing modules and AI recognition modules, defect data is generated and defect classification is performed, and automated detection is realized.
It improves the detection efficiency of PCB boards, reduces labor costs, improves the accuracy of identification, reduces false alarms and missed alarms, and can detect multiple defects.
Smart Images

Figure CN119738409A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of PCB defect detection, and specifically relates to an intelligent recognition device and method based on an AI algorithm. Background Art
[0002] As an important component of electronic equipment, the quality of PCB directly affects the performance and reliability of the entire equipment. Therefore, defect detection of PCB is a key link to ensure the quality of electronic equipment.
[0003] The main methods of PCB defect detection usually include manual visual inspection: the operator observes the surface of the PCB with the naked eye or using tools such as a magnifying glass to check whether there are obvious defects such as scratches, oxidation, and irregular pads. This method has low cost and simple equipment, but this method is highly subjective, has low accuracy, low detection efficiency, and is difficult to analyze data sets. Instrument online detection methods are also commonly used: operators use simulation test experiments and electrical performance tests to check the open circuit, short circuit and other faults of circuit board welding and the functions of components. They also use boundary scanning technology to detect electronic components with excessive density on the PCB, and collectively detect the soldering points and connections of the circuit board. This method has a wide detection coverage, but this method is difficult to operate and takes a long time to operate. Functional testing methods are also commonly used: operators use special test equipment to fully test the functional modules of the circuit board on the production line to confirm the good or bad state of the circuit board. The advantage of this method is that it can fully test the function of the circuit board, but it cannot provide in-depth data such as improved electronic components and pin diagnosis. Different test equipment must be used according to different needs, which makes program writing difficult.
[0004] Chinese invention patent CN115239635A provides a PCB defect detection method, device, equipment, and medium. The detection method includes scanning a PCB circuit board to obtain a PCB image; using the detection model of an AOI device to perform AI recognition on the PCB image to obtain defect data including the corresponding positions of one or more identified defects; intercepting a local image as a PCB sub-image according to the defect data and sending it to a manual inspection workstation; performing manual recognition on each PCB sub-image to obtain a first manual marking result; comparing the first manual marking result and the AI marking result of each PCB sub-image, if they are consistent, using the first manual marking result or the AI marking result as the final detection result of the PCB sub-image, and the AI marking result is obtained by performing AI recognition on the PCB sub-image using an AI model; this solution uses manual review while using AI recognition, and the detection efficiency is low, which is not conducive to industrial production.
[0005] Therefore, the present invention provides an intelligent recognition device and method based on AI algorithm to solve the technical problems raised by the above background technology. Summary of the invention
[0006] In view of the problems raised by the above background technology, the purpose of the present invention is to provide an intelligent recognition device and method based on AI algorithm, which performs defect detection on PCB boards based on AI algorithm, thereby freeing operators, reducing labor costs, and improving detection efficiency and accuracy.
[0007] In order to achieve the above technical objectives, the technical solution adopted by the present invention is as follows:
[0008] An intelligent recognition device and method based on an AI algorithm include an equipment installation cabinet, a computer module, an image acquisition module and multiple PCB substrates, wherein the computer module is arranged at the bottom of the equipment installation cabinet, the image acquisition module is arranged in the middle of the equipment installation cabinet, and the PCB substrate is arranged relative to the image acquisition module. The computer module includes a preprocessing module, an AI recognition module and an early warning module, the image acquisition module is used to capture the image of the PCB substrate, the preprocessing module is used to preprocess the image acquired by the image acquisition module, the AI recognition module is used to perform feature recognition and classification recognition on the preprocessed image, and the early warning module issues an early warning after finding a defective PCB board image.
[0009] It is further defined that the image acquisition module uses multiple groups of cameras to capture images of the PCB board. With such a structural design, multiple groups of cameras work simultaneously, which helps to improve the detection efficiency.
[0010] It is further defined that it also includes a rotatable tray and a plurality of universal wheels, wherein the tray is arranged in the middle of the equipment installation cabinet, the tray is used to hold the PCB substrate, and the universal wheels are arranged at the bottom of the equipment installation cabinet. With such a structural design, the installation of universal wheels can facilitate the overall movement of the equipment, and the installation of a rotatable tray can facilitate the transfer of the PCB substrate.
[0011] It is further defined that the preprocessing includes denoising and contrast enhancement of the image collected by the image acquisition module. Such a structural design makes the PCB image clearer, thereby facilitating subsequent detection.
[0012] It is further defined that the AI recognition module includes a PCB detection model trained based on a deep learning algorithm.
[0013] An intelligent recognition method based on AI algorithm includes the following steps:
[0014] S1: The image acquisition module acquires an image of a PCB substrate and inputs the image into a trained PCB detection model of an AI recognition module;
[0015] S2: the preprocessing module preprocesses the PCB image described in S1, and inputs the preprocessed PCB image into the trained PCB detection model;
[0016] S3: The AI recognition module compares the preprocessed PCB image with the normal PCB image, extracts defects of the PCB image and generates defect data, and classifies the defect data, wherein the defect classification includes open circuit, short circuit, rat bite, burr and pinhole.
[0017] S4: Build a training data set based on the defect data in S3;
[0018] S5: Input the defect data of the training data set generated by S4 into the PCB detection model, and use the preset defect algorithm for training, so that the PCB detection model can detect defects based on normal PCB image recognition.
[0019] It is further defined that the image of the PCB substrate in S1 is an outline drawing of the PCB.
[0020] It is further defined that the defective algorithm in S5 is the YOLOv5 algorithm, the YOLOv8 algorithm or the YOLOv10 algorithm.
[0021] It is further defined that the defect data image in the training data set in S4 is obtained from a linear scanning CCD, and the image resolution of the defect data image is 48 pixels per 1 mm.
[0022] It is further defined that the image of the PCB substrate acquired by the image acquisition module is an original image, and the size of the original image is 16k×16k pixels.
[0023] Beneficial effects of the present invention: The present invention provides an intelligent recognition device and method based on an AI algorithm, comprising acquiring an image of a PCB substrate through an image acquisition module, and inputting the image into a trained PCB detection model of the AI recognition module, a preprocessing module preprocessing the PCB image, and inputting the preprocessed PCB image into the trained PCB detection model; the AI recognition module compares the preprocessed PCB image with a normal PCB image, and the AI recognition module extracts defects from the PCB image and generates defect data; then a training data set is constructed according to the defect data, the defect data of the generated training data set is input into the PCB detection model, and a preset defect algorithm is used for training, so that the PCB detection model can detect defects based on normal PCB image recognition.
[0024] Therefore, the intelligent recognition device and method based on AI algorithm detects PCB images, uses PCB detection model to perform automatic comprehensive detection on PCB images, and subdivides the types of PCB images with defects, so as to more comprehensively analyze the current status of PCB; in summary, this scheme can greatly improve the detection efficiency of PCB boards and reduce labor costs through automatic recognition; uses deep learning algorithm for feature extraction and classification recognition, which can improve the accuracy of recognition and reduce false alarms and missed alarms; and can realize the detection of various defects on PCB boards. BRIEF DESCRIPTION OF THE DRAWINGS
[0025] The present invention can be further illustrated by the non-limiting examples given in the accompanying drawings;
[0026] Figure 1 It is a front view of an embodiment of an intelligent recognition device and method based on an AI algorithm of the present invention;
[0027] Figure 2 It is a structural schematic diagram of an embodiment of an intelligent recognition device and method based on an AI algorithm of the present invention;
[0028] Figure 3 A side view of an embodiment of an intelligent recognition device and method based on an AI algorithm of the present invention;
[0029] Figure 4 This is an enlarged view of an embodiment of an intelligent recognition device and method based on an AI algorithm of the present invention;
[0030] Figure 5 A system module diagram of an embodiment of an intelligent recognition device and method based on an AI algorithm of the present invention;
[0031] Figure 6 The present invention is a flowchart of the method steps of an intelligent recognition device and method embodiment based on AI algorithm.
[0032] The symbols of the main components are explained as follows: computer module 1, image acquisition module 2, PCB substrate 3, tray 4, universal wheel 5, pre-processing module 6, AI recognition module 7, early warning module 8, equipment installation cabinet 9. DETAILED DESCRIPTION
[0033] In order to enable those skilled in the art to better understand the present invention, the technical solution of the present invention is further described below in conjunction with the accompanying drawings and embodiments. The technical solution in the embodiments of the present invention will be clearly and completely described below in conjunction with the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in the field without creative work are within the scope of protection of the present invention.
[0034] It should be noted that all directional indications in the embodiments of the present invention (such as up, down, left, right, front, back, etc.) are only used to explain the relative position relationship, movement status, etc. between the components under a certain specific posture (as shown in the accompanying drawings). If the specific posture changes, the directional indication will also change accordingly.
[0035] In addition, the descriptions of "first", "second", etc. in the present invention are only used for descriptive purposes and cannot be understood as indicating or implying their relative importance or implicitly indicating the number of the indicated technical features. Therefore, the features defined as "first" and "second" may explicitly or implicitly include at least one of the features. In addition, the technical solutions between the various embodiments can be combined with each other, but it must be based on the ability of ordinary technicians in the field to implement. When the combination of technical solutions is contradictory or cannot be implemented, it should be deemed that such a combination of technical solutions does not exist and is not within the scope of protection required by the present invention. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not used to limit the present invention.
[0036] Embodiment 1:
[0037] like Figure 1 As shown, an intelligent recognition device and method based on an AI algorithm of the present invention includes an equipment installation cabinet 9, a computer module 1, an image acquisition module 2 and a plurality of PCB substrates 3, wherein the computer module 1 is arranged at the bottom of the equipment installation cabinet 9, the image acquisition module 2 is arranged in the middle of the equipment installation cabinet 9, the PCB substrate 3 is arranged relative to the image acquisition module 2, the computer module 1 includes a preprocessing module 6, an AI recognition module 7 and an early warning module 8, the image acquisition module 2 is used to capture the image of the PCB substrate 3, the preprocessing module 6 is used to preprocess the image acquired by the image acquisition module 2, the AI recognition module 7 is used to perform feature recognition and classification recognition on the preprocessed image, and the early warning module 8 issues an early warning after finding a defective PCB board image.
[0038] In the application of this embodiment, the image acquisition module 2 uses multiple cameras to capture images of the PCB board. With such a structural design, multiple cameras work simultaneously, which helps to improve the detection efficiency. Specifically, the image acquisition module 2 uses a high-resolution camera and an infrared sensor, which can be adapted to obtain clear images under different lighting and environmental conditions.
[0039] In the application of this embodiment, a rotatable tray 4 and a plurality of universal wheels 5 are also included. The tray 4 is arranged in the middle of the equipment installation cabinet 9. The tray is used to hold the PCB substrate 3. The universal wheels 5 are arranged at the bottom of the equipment installation cabinet 9. With such a structural design, the installation of universal wheels can facilitate the overall movement of the equipment, and the installation of a rotatable tray 4 can facilitate the transfer of the PCB substrate 3.
[0040] In the application of this embodiment, the preprocessing includes denoising and contrast enhancement of the image collected by the image acquisition module 2. Such a structural design makes the PCB image clearer, thereby facilitating subsequent detection.
[0041] In the application of this embodiment, the AI recognition module 7 includes a PCB detection model trained based on a deep learning algorithm.
[0042] An intelligent recognition method based on AI algorithm includes the following steps:
[0043] S1: The image acquisition module 2 acquires an image of the PCB substrate 3, and inputs the image into the trained PCB detection model of the AI recognition module 7;
[0044] S2: the preprocessing module 6 preprocesses the PCB image described in S1, and inputs the preprocessed PCB image into the trained PCB detection model;
[0045] S3: The AI recognition module 7 compares the pre-processed PCB image with the normal PCB image, extracts defects from the PCB image and generates defect data, and classifies the defect data, wherein the defect classification includes open circuit, short circuit, rat bite, burr and pinhole.
[0046] S4: Build a training data set based on the defect data in S3;
[0047] S5: Input the defect data of the training data set generated by S4 into the PCB detection model, and use the preset defect algorithm for training, so that the PCB detection model can detect defects based on normal PCB image recognition.
[0048] In the application of this embodiment, the image of the PCB substrate 3 in S1 is an appearance diagram of the PCB.
[0049] In the application of this embodiment, the defect algorithm in S5 is the YOLOv5 algorithm, the YOLOv8 algorithm or the YOLOv10 algorithm.
[0050] Specifically, the above algorithms are combined with Python and PyQT5 to implement the UI interface, making it more convenient to display the functions. The system uses the Django framework as the backend, the front-end framework is Vue, and the database uses MySQL.
[0051] In the application of this embodiment, the defect data image in the training data set in S4 is obtained from a linear scanning CCD, and the image resolution of the defect data image is 48 pixels per 1 mm.
[0052] Specifically, the defect data of the training data set includes a label file in ml format, an image file in jpg format, and a txt file storing the original annotation information.
[0053] In the application of this embodiment, the image acquisition module 2 acquires the image of the PCB substrate 3 as an original image, and the size of the original image is 16k×16k pixels.
[0054] Specifically, this solution crops the original image into sub-images of size 640×640, for a total of 1500 images.
[0055] This embodiment takes a PCB image containing two defects as an example to specifically illustrate the defect detection process of this solution:
[0056] First, the image acquisition module 2 acquires an image of the PCB substrate 3, and inputs the image into the trained PCB detection model of the AI recognition module 7; the preprocessing module 6 preprocesses the PCB image, and inputs the preprocessed PCB image into the trained PCB detection model;
[0057] The AI recognition module 7 compares the pre-processed PCB image with the normal PCB image, extracts defects from the PCB image and generates defect data, and classifies the defect data, wherein the defect classification includes open circuit, short circuit, rat bite, burr and pinhole.
[0058] The specific process of comparing the pre-processed PCB image with the normal PCB image is as follows: first check whether the PCB has damaged, scratched, missing or loose components, then confirm that all components are correctly placed and soldered, check whether the solder joints are good, without cold solder joints, short circuits or open circuits, and then identify hidden defects such as pores, cracks or desoldering; finally identify other defects on the PCB, such as incorrect component placement, solder joint defects and routing errors.
[0059] In the first embodiment, two defects are identified in the PCB image, and the corresponding positions of the two defects are L1 and L2. Then, the corresponding images of the two defect corresponding positions are screenshot and named as img1 and img2; the AI recognition module 7 classifies img1 and img2 respectively, for example, img1 is a circuit breaker and img2 is a short circuit.
[0060] The defect data of img1 and img2 are input into the training data set. Finally, the defect data of the training data set is input into the PCB detection model and trained using the YOLOv5 algorithm, so that the PCB detection model can detect defects of img1 and img2 types based on normal PCB image recognition.
[0061] Embodiment two:
[0062] This embodiment takes a PCB image containing four defects as an example to specifically illustrate the defect detection process of this solution:
[0063] First, the image acquisition module 2 acquires an image of the PCB substrate 3, and inputs the image into the trained PCB detection model of the AI recognition module 7; the preprocessing module 6 preprocesses the PCB image, and inputs the preprocessed PCB image into the trained PCB detection model;
[0064] The AI recognition module 7 compares the pre-processed PCB image with the normal PCB image, extracts defects from the PCB image and generates defect data, and classifies the defect data, wherein the defect classification includes open circuit, short circuit, rat bite, burr and pinhole.
[0065] In the second embodiment, two defects are identified in the PCB image, and the corresponding positions of the two defects are L1 and L2. Then, the corresponding images of the corresponding positions of the two defects are screenshot and named as img3, img4, img5 and img6; the AI recognition module 7 classifies img3, img4, img5 and img6 respectively, for example, img3 is a circuit breaker, img4 is a short circuit, img5 is a rat bite and img6 is a burr.
[0066] The defect data of img3, img4, img5 and img6 are input into the training data set; finally, the defect data of the training data set is input into the PCB detection model, and the YOLOv5 algorithm is used for training, so that the PCB detection model can detect the defects of img3, img4, img5 and img6 based on normal PCB image recognition.
[0067] In summary, this solution can greatly improve the detection efficiency of PCB boards and reduce labor costs through automated identification. The use of deep learning algorithms for feature extraction and classification identification can improve the accuracy of identification and reduce false positives and negatives. It can also detect a variety of defects on PCB boards.
[0068] The above embodiments are merely illustrative of the principles and effects of the present invention, and are not intended to limit the present invention. Anyone familiar with the technology may modify or change the above embodiments without violating the spirit and scope of the present invention. Therefore, all equivalent modifications or changes made by those with ordinary knowledge in the technical field without departing from the spirit and technical ideas disclosed by the present invention should still be covered by the claims of the present invention.
Claims
1. An intelligent recognition device based on an AI algorithm, comprising an equipment installation cabinet (9), characterized in that: The device also comprises a computer module (1), an image acquisition module (2) and a plurality of PCB substrates (3); the computer module (1) is arranged at the bottom of an equipment installation cabinet (9); the image acquisition module (2) is arranged in the middle of the equipment installation cabinet (9); the PCB substrate (3) is arranged relative to the image acquisition module (2); the computer module (1) comprises a preprocessing module (6), an AI recognition module (7) and an early warning module (8); the image acquisition module (2) is used to capture an image of the PCB substrate (3); the preprocessing module (6) is used to preprocess the image acquired by the image acquisition module (2); the AI recognition module (7) is used to perform feature recognition and classification recognition on the preprocessed image; and the early warning module (8) issues an early warning after a defective PCB board image is found.
2. The intelligent recognition device based on AI algorithm according to claim 1, characterized in that: The image acquisition module (2) uses multiple groups of cameras to capture images of the PCB board.
3. The intelligent recognition device based on AI algorithm according to claim 1, characterized in that: It also includes a rotatable tray (4) and a plurality of universal wheels (5), wherein the tray (4) is arranged in the middle of the equipment installation cabinet (9), the tray is used to hold the PCB substrate (3), and the universal wheels (5) are arranged at the bottom of the equipment installation cabinet (9).
4. The intelligent recognition device based on AI algorithm according to claim 1, characterized in that: The preprocessing includes denoising and contrast enhancement of the image collected by the image collection module (2).
5. The intelligent recognition device based on AI algorithm according to claim 1, characterized in that: The AI recognition module (7) includes a PCB detection model trained based on a deep learning algorithm.
6. An intelligent recognition method based on AI algorithm, characterized in that: The steps include: S1: the image acquisition module (2) acquires an image of a PCB substrate (3), and inputs the image into a trained PCB detection model of an AI recognition module (7); S2: the preprocessing module (6) preprocesses the PCB image described in S1, and inputs the preprocessed PCB image into the trained PCB detection model; S3: The AI recognition module compares the preprocessed PCB image with the normal PCB image, extracts defects of the PCB image and generates defect data, and classifies the defect data, wherein the defect classification includes open circuit, short circuit, rat bite, burr and pinhole. S4: Build a training data set based on the defect data in S3; S5: Input the defect data of the training data set generated by S4 into the PCB detection model, and use the preset defect algorithm for training, so that the PCB detection model can detect defects based on normal PCB image recognition.
7. The intelligent recognition method based on AI algorithm according to claim 6, characterized in that: The image of the PCB substrate (3) in S1 is an outline drawing of the PCB.
8. The intelligent recognition method based on AI algorithm according to claim 6, characterized in that: The defective algorithm in S5 is the YOLOv5 algorithm, the YOLOv8 algorithm or the YOLOv10 algorithm.
9. The intelligent recognition method based on AI algorithm according to claim 6, characterized in that: The defect data images in the training data set in S4 are obtained from a linear scanning CCD, and the image resolution of the defect data images is 48 pixels per 1 mm.
10. The intelligent recognition method based on AI algorithm according to claim 6, characterized in that: The image acquisition module (2) acquires an image of the PCB substrate (3) as an original image, and the size of the original image is 16k×16k pixels.
Citation Information
Patent Citations
PCB defect detection method, device, equipment and medium
CN115239635A