Multi-layer PCB quality detection method
The quality detection model constructed by deep convolutional neural network solves the problems of low efficiency and poor accuracy of traditional detection methods, and realizes efficient and accurate automated detection of multi-layer PCB circuit boards, reducing detection costs.
Patent Information
- Application Number
- CN202411607902.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-12
- Publication Date
- 2025-02-18
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
The traditional PCB circuit board quality detection methods have problems such as low detection efficiency, high error detection rate and high cost, which are difficult to meet the needs of modern electronic equipment for efficient and accurate inspection.
A deep convolutional neural network is used to build a quality detection model. Through pre-processing, region segmentation and feature extraction of high-definition images, combined with the training of labeled images, the automatic identification and classification of multi-layer PCB circuit board defects are achieved.
It improves detection speed and accuracy, reduces the need and cost of manual detection, and is scalable, and can be continuously learned and optimized through new data.
Smart Images

Figure CN119477870A_ABST
Abstract
Description
Technical Field
[0001] The invention belongs to the technical field of circuit board detection, and in particular relates to a multi-layer PCB circuit board quality detection method. Background Art
[0002] With the development of electronic technology, multi-layer PCB circuit boards are increasingly used in electronic devices. Traditional PCB circuit board quality inspection methods mainly rely on manual visual inspection or simple automated equipment, which have problems such as low inspection efficiency, high false detection rate, and high cost.
[0003] In recent years, machine learning technology, especially neural network models, has made significant progress in the field of image recognition and processing, providing new possibilities for improving the automation and accuracy of PCB circuit board quality inspection. Summary of the invention
[0004] In order to solve the above technical problems, the present invention proposes a multi-layer PCB circuit board quality detection method to solve the problems existing in the above-mentioned prior art.
[0005] To achieve the above object, the present invention provides a multi-layer PCB circuit board quality detection method, comprising:
[0006] Get high-definition images of multi-layer PCB circuit boards;
[0007] Preprocessing the high-definition image to obtain a preprocessed image; identifying and marking defects in the preprocessed image to obtain a marked image;
[0008] Constructing a quality detection model of a deep convolutional neural network, extracting features from the preprocessed image using a region segmentation algorithm and a feature extraction algorithm of the quality detection model, and training the quality detection model using the annotated image to obtain a trained quality detection model;
[0009] The process of extracting features from the preprocessed image includes:
[0010] Based on a region segmentation algorithm, the preprocessed image is segmented into different hardware regions;
[0011] Based on the feature extraction algorithm, feature calculations are performed on the hardware areas respectively to obtain analysis results of several features;
[0012] The high-definition image to be inspected is input into the trained quality inspection model to obtain the quality inspection results of the multi-layer PCB circuit board.
[0013] Preferably, the process of preprocessing the high-definition image includes:
[0014] The noise of the high-definition image is removed by using a filtering algorithm, the contrast of the high-definition image is enhanced by using an image enhancement technique, and then the edge of the high-definition image is detected to obtain a preprocessed image.
[0015] Preferably, the quality detection model adopts a convolutional neural network, which includes: a convolutional layer for generating feature maps, a pooling layer for reducing image dimensions, a multi-convolutional layer for capturing complex features, and a fully connected layer for category output. The convolutional neural network adopts cross entropy loss, and the difference between the model prediction and the actual annotation is evaluated based on the cross entropy loss.
[0016] Preferably, the process of segmenting the preprocessed image into different hardware regions comprises:
[0017] dynamically adjusting an adaptive threshold according to local characteristics of the pre-processed image, and segmenting the pre-processed image into a foreground and a background based on the adaptive threshold to obtain a roughly distinguished image;
[0018] Based on an edge detection algorithm, the roughly differentiated image is refined to obtain image edge features;
[0019] The complex regions of the preprocessed image are processed by a region growing algorithm or a graph cut algorithm to obtain different hardware regions.
[0020] Preferably, the process of performing feature calculation on the hardware areas respectively includes:
[0021] Based on the end-to-end learning method of the convolutional neural network, feature extraction is performed on the hardware area to obtain a plurality of features;
[0022] Based on the feature selection algorithm, several features are evaluated for importance to obtain important features, wherein the important features include: texture features, shape features and color features, and the feature selection algorithm is a recursive feature elimination method;
[0023] The important features are analyzed by a support vector machine classifier to obtain analysis results.
[0024] Preferably, an optimization process of feature calculation is also included:
[0025] Based on the distance algorithm, the important features are normalized to obtain standardized features;
[0026] Mapping the standardized features to a low-dimensional space based on a random matrix to obtain a reduced-dimensional feature;
[0027] Based on cross-validation, the optimization results of the dimension reduction features are evaluated.
[0028] Preferably, the quality inspection result includes: defect type, defect location and severity.
[0029] Compared with the prior art, the present invention has the following advantages and technical effects:
[0030] The present invention provides a multi-layer PCB circuit board quality inspection method, comprising: acquiring a high-definition image of a multi-layer PCB circuit board; preprocessing the high-definition image to obtain a preprocessed image; identifying and marking defects in the preprocessed image to obtain a marked image; constructing a quality inspection model of a deep convolutional neural network, extracting features from the preprocessed image through a region segmentation algorithm and a feature extraction algorithm of the quality inspection model, training the quality inspection model through the marked image to obtain a trained quality inspection model; inputting the high-definition image to be inspected into the trained quality inspection model to obtain a quality inspection result of the multi-layer PCB circuit board.
[0031] The present invention uses a deep convolutional neural network to automate the detection process of high-definition images of multi-layer PCB circuit boards, which can greatly improve the detection speed; at the same time, the deep learning neural network model can more accurately identify and classify defects, and the neural network model can continuously learn and optimize through new data, which is scalable. In addition, the technical solution of the present invention can reduce the need for manual detection, thereby reducing the detection cost. BRIEF DESCRIPTION OF THE DRAWINGS
[0032] The drawings constituting a part of the present application are used to provide a further understanding of the present application. The illustrative embodiments and descriptions of the present application are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:
[0033] Figure 1 The figure is a flow chart of a method according to an embodiment of the present invention. DETAILED DESCRIPTION
[0034] It should be noted that, in the absence of conflict, the embodiments and features in the embodiments of the present application can be combined with each other. The present application will be described in detail below with reference to the accompanying drawings and in combination with the embodiments.
[0035] It should be noted that the steps shown in the flowcharts of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and that, although a logical order is shown in the flowcharts, in some cases, the steps shown or described can be executed in an order different from that shown here.
[0036] Embodiment 1
[0037] like Figure 1 As shown, this embodiment provides a multi-layer PCB circuit board quality detection method, including:
[0038] Get high-definition images of multi-layer PCB circuit boards;
[0039] Preprocessing the high-definition image to obtain a preprocessed image; identifying and marking defects in the preprocessed image to obtain a marked image;
[0040] Constructing a quality detection model of a deep convolutional neural network, extracting features from the preprocessed image using a region segmentation algorithm and a feature extraction algorithm of the quality detection model, and training the quality detection model using the annotated image to obtain a trained quality detection model;
[0041] The high-definition image to be inspected is input into the trained quality inspection model to obtain the quality inspection results of the multi-layer PCB circuit board.
[0042] The specific process includes the following steps:
[0043] S1. High-definition image acquisition
[0044] Use a high-precision industrial camera to photograph multi-layer PCB circuit boards in a constant lighting and dust-free environment to obtain high-definition images of at least 2000x2000 pixels.
[0045] S2. Image Preprocessing
[0046] Noise removal: Use Gaussian filter to smooth the HD image and remove image noise.
[0047] Contrast enhancement: The contrast of the image is enhanced through histogram equalization technology, making the details more obvious.
[0048] Edge detection: Use the Canny algorithm to detect edges on the enhanced image to highlight the edges of circuits and components on the PCB.
[0049] S3. Image Annotation
[0050] Experienced technicians will annotate the pre-processed images and clearly indicate the type (such as open circuit, short circuit, poor welding, etc.) and location of each defect.
[0051] S4. Building a quality inspection model
[0052] Network architecture: Design a deep convolutional neural network (CNN) containing multiple convolutional layers, pooling layers, and fully connected layers, and finally use the softmax activation function for category output.
[0053] Convolutional layers: Use multiple convolutional layers to automatically learn image features.
[0054] Pooling layer: Reduce the spatial dimension of the feature map through maximum pooling.
[0055] Fully connected layer: A fully connected layer is used at the end of the network to perform category prediction.
[0056] Loss function: The cross entropy loss function is used to evaluate the difference between the model prediction and the actual annotation.
[0057] S5. Model training
[0058] Using the labeled images as training data, the CNN model is trained using the stochastic gradient descent (SGD) algorithm until a predetermined accuracy or number of iterations is reached.
[0059] S6. Feature extraction and optimization
[0060] Region segmentation: Based on the edge features of the image, the Otsu method is used to perform adaptive threshold segmentation to obtain a rough distinction between foreground and background.
[0061] Refine segmentation: Apply the Canny algorithm to refine the edges of the segmentation results and enhance image features.
[0062] Complex region processing: For complex regions that are difficult to segment, use region growing or graph cut algorithms for finer segmentation.
[0063] Feature calculation: Use CNN to extract features from the segmented hardware area to obtain a series of features.
[0064] Feature selection: Recursive feature elimination (RFE) is used to evaluate the importance of features and screen out important features such as texture, shape and color.
[0065] Feature Normalization: Use min-max normalization to normalize important features.
[0066] Feature dimensionality reduction: Principal component analysis (PCA) is used to map normalized features to a low-dimensional space to reduce the amount of computation required for subsequent processing.
[0067] Model evaluation: Use cross-validation to evaluate the optimization results of dimension reduction features and adjust PCA parameters to achieve the best performance.
[0068] S7. Quality Inspection
[0069] The high-definition image to be inspected is input into the trained CNN model, which automatically performs region segmentation, feature extraction and defect recognition.
[0070] Output results: Model output includes defect type, location and severity, providing decision support for PCB quality control.
[0071] S8. Results Analysis
[0072] Analyze the test results of the model to determine the acceptability of defects and perform manual re-inspection as needed.
[0073] The above are only preferred specific implementations of the present application, but the protection scope of the present application is not limited thereto. Any changes or substitutions that can be easily thought of by a person skilled in the art within the technical scope disclosed in the present application should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.
Claims
1. A multi-layer PCB circuit board quality inspection method, characterized in that: The following steps are involved: Get high-definition images of multi-layer PCB circuit boards; Preprocessing the high-definition image to obtain a preprocessed image; Identifying and marking defects in the preprocessed image to obtain a marked image; Constructing a quality detection model of a deep convolutional neural network, extracting features from the preprocessed image using a region segmentation algorithm and a feature extraction algorithm of the quality detection model, and training the quality detection model using the annotated image to obtain a trained quality detection model; The process of extracting features from the preprocessed image includes: Based on a region segmentation algorithm, the preprocessed image is segmented into different hardware regions; Based on the feature extraction algorithm, feature calculations are performed on the hardware areas respectively to obtain analysis results of several features; The high-definition image to be inspected is input into the trained quality inspection model to obtain the quality inspection results of the multi-layer PCB circuit board.
2. The multi-layer PCB circuit board quality detection method according to claim 1, characterized in that: The process of preprocessing the high-definition image includes: The noise of the high-definition image is removed by using a filtering algorithm, the contrast of the high-definition image is enhanced by using an image enhancement technique, and then the edge of the high-definition image is detected to obtain a preprocessed image.
3. The multi-layer PCB circuit board quality detection method according to claim 1, characterized in that: The quality detection model adopts a convolutional neural network, which includes: a convolutional layer for generating feature maps, a pooling layer for reducing image dimensions, a multi-convolutional layer for capturing complex features, and a fully connected layer for category output. The convolutional neural network adopts cross entropy loss and evaluates the difference between model prediction and actual annotation based on the cross entropy loss.
4. The multi-layer PCB circuit board quality detection method according to claim 1, characterized in that: The process of segmenting the pre-processed image into different hardware regions includes: dynamically adjusting an adaptive threshold according to local characteristics of the pre-processed image, and segmenting the pre-processed image into a foreground and a background based on the adaptive threshold to obtain a roughly distinguished image; Based on an edge detection algorithm, the roughly differentiated image is refined to obtain image edge features; The complex regions of the preprocessed image are processed by a region growing algorithm or a graph cut algorithm to obtain different hardware regions.
5. The multi-layer PCB circuit board quality detection method according to claim 1, characterized in that: The process of performing feature calculation on the hardware areas respectively includes: Based on the end-to-end learning method of the convolutional neural network, feature extraction is performed on the hardware area to obtain a plurality of features; Based on the feature selection algorithm, several features are evaluated for importance to obtain important features, wherein the important features include: texture features, shape features and color features, and the feature selection algorithm is a recursive feature elimination method; The important features are analyzed by a support vector machine classifier to obtain analysis results.
6. The multi-layer PCB circuit board quality inspection method according to claim 5, characterized in that: It also includes the optimization process of feature calculation: Based on the distance algorithm, the important features are normalized to obtain standardized features; Mapping the standardized features to a low-dimensional space based on a random matrix to obtain a reduced-dimensional feature; Based on cross-validation, the optimization results of the dimension reduction features are evaluated.
7. The multi-layer PCB circuit board quality detection method according to claim 1, characterized in that: The quality inspection results include: defect type, defect location and severity.