A Flexible Circuit Board Bonding AOI Detection Method, System and Computer Storage Medium
Through the combination of data acquisition and preprocessing, Yolov7 backbone and Attention-DPT attention mechanism, the problem of low efficiency and poor accuracy of flexible circuit board binding detection is solved, efficient and accurate defect detection is achieved, and the reliability and efficiency of the production process is improved.
Patent Information
- Application Number
- CN202410626310.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-20
- Publication Date
- 2025-08-05
- Estimated Expiration
- 2044-05-20
AI Technical Summary
The existing flexible circuit board binding AOI detection method has low detection efficiency, high miss detection rate and poor detection accuracy for different defects.
Defect detection is carried out through Yolo Head by using data acquisition and preprocessing, feature extraction based on Yolov7 backbone and Attention-DPT attention mechanism detection methods, including image denoising, enhancement, feature extraction, weighting and regression technologies.
Fast and accurate flexible circuit board binding inspection is achieved, reducing manual inspection workload, improving production efficiency and yield rate.
Smart Images

Figure CN118485638B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of flexible circuit board detection, and in particular to a flexible circuit board binding AOI detection method, system and computer storage medium. Background Art
[0002] With the continuous development of science and technology, display modules have been widely used in various fields. As an important component of display modules, the quality inspection of flexible circuit boards (FPCBs) is crucial to the stability and reliability of products. In the current high-tech manufacturing industry, automatic optical inspection (AOI) technology plays a vital role, especially in the manufacturing process of display module flexible circuit boards (FPCBs). Display modules are an indispensable component of products such as smartphones, tablets, wearable devices, and high-end TVs, and their performance is directly related to the display effect and reliability of the end product. As a bridge connecting various electronic components, the binding quality of flexible circuit boards directly affects the stability and lifespan of the entire display system. Therefore, efficient and accurate inspection of the binding quality of FPCBs has become a key step in the production process. Currently, automatic optical inspection (AOI) technology is widely used to inspect the binding quality of display module flexible circuit boards, but existing methods have some defects and shortcomings, such as low detection efficiency, high missed detection rate, and poor detection accuracy of different defects. Therefore, the present invention application aims to propose an AOI inspection method for flexible circuit board binding to address the problems existing in existing methods. Summary of the Invention
[0003] In response to the problems of the prior art, the present invention provides a flexible circuit board binding AOI detection method, system and computer storage medium. The method is cleverly designed and can quickly perform AOI detection on the flexible circuit board binding of the display module, while improving the detection accuracy. It can accurately and comprehensively detect defects and problems on the circuit board, providing reliable protection for the production process. At the same time, the method can also reduce the workload and error rate of manual inspection, helping to improve production efficiency and yield rate.
[0004] In order to solve the above technical problems, the present invention adopts the following technical solutions:
[0005] The present invention provides a flexible circuit board binding AOI detection method, which includes the following steps:
[0006] Step S10, data acquisition and preprocessing: photographing the circuit board to be inspected to obtain an image to be inspected, and performing data preprocessing on the image to be inspected; the data preprocessing includes image denoising and image enhancement;
[0007] Step S20, feature extraction based on Yolov7 backbone: the image data after data preprocessing is passed into the Yolov7 backbone network for image feature extraction, and a feature map in the image is extracted;
[0008] Step S30, Attention-DPT attention mechanism: feature weighting based on the feature map extracted by the Yolov7 backbone network;
[0009] Step S40: Output the defect category and confidence level: Input the weighted feature map into Yolo Head; In Yolo Head, the position of the prediction box is adjusted through regression and classification to match the position of the target object.
[0010] The image denoising is performed by wavelet transform. The wavelet transform matches the signal with the wavelet basis function through convolution operation to obtain frequency band coefficients of different scales. The formula of wavelet denoising is expressed as: Among them, X is the original image, W represents wavelet transform, T represents threshold processing, and W -1 represents the inverse wavelet transform, The denoised image.
[0011] The image enhancement is performed using histogram equalization, and its principle is expressed as follows:
[0012] new_image(x,y)=round((CDF(image(x,y))-CDF min )×(L-1)), where image(x,y) represents the pixel value of the original image, new_image(x,y) represents the pixel value of the equalized image, and CDF(image(x,y)) represents the cumulative probability corresponding to the pixel value of the original image. min is the minimum cumulative probability, and L is the total number of gray levels.
[0013] In step S20, the image input into the Yolov7 backbone network is passed layer by layer, and feature maps of different scales are extracted in each layer.
[0014] The step of performing feature weighting based on the feature map extracted by the Yolov7 backbone network in step S30 includes:
[0015] Step S31, feature input: input the extracted feature map into the Attention-DPT attention mechanism;
[0016] Step S32, pooling operation: Process the feature map through the average pooling layer and the maximum pooling layer to obtain two sets of deeper feature maps;
[0017] Step S33, feature splicing: combining the two adjusted feature maps into two new feature maps through feature splicing operation, thereby obtaining two feature maps with different hierarchical and scale features; Step S34, feature pyramid network convolution: utilizing the feature extraction capability of the feature pyramid network to further extract and fuse the two feature maps;
[0018] Step S35, dimensionality-increasing tensor product: using dimensionality-increasing tensor product to perform feature fusion and feature interaction on the feature maps obtained by convolution of the feature pyramid network; by expanding the channel dimensions of the two feature maps and then performing element-by-element multiplication, feature interaction and fusion are achieved;
[0019] Step S36, feature weighting: weight the fused feature map through the attention mechanism.
[0020] In step S40, the regression uses bounding box regression technology to fine-tune the defect prediction box by the center coordinates, width and height offsets of the prediction box to detect the target object; then, the softmax function is used to map the features in the prediction box to the probability distribution of different categories; finally, the category with the highest probability is selected as the prediction category according to the probability distribution.
[0021] The present invention also provides an AOI detection system using the flexible circuit board binding AOI detection method, which includes:
[0022] Data acquisition and preprocessing module: photographs the circuit board to be inspected to obtain the image to be inspected, and performs data preprocessing on the image to be inspected; data preprocessing includes image denoising and image enhancement;
[0023] Feature extraction module: The image data after data preprocessing is passed into the Yolov7 backbone network for image feature extraction, and the feature map in the image is extracted;
[0024] Feature weighting module: performs feature weighting based on the feature map extracted by the Yolov7 backbone network; output defect category and confidence module: inputs the weighted feature map into Yolo Head; in Yolo Head, the position of the prediction box is adjusted through regression and classification to match the position of the target object.
[0025] The present invention also provides a computer storage medium, which stores computer instructions. When the computer instructions are called, they are used to execute the flexible circuit board binding AOI detection method.
[0026] Beneficial effects of the present invention:
[0027] The present invention is cleverly designed. AOI data acquisition and preprocessing are key steps in achieving efficient, accurate, and reliable automated optical inspection. The key to data acquisition is selecting appropriate acquisition parameters, such as exposure time, frame rate, and image resolution, to ensure that the captured images are clear, detailed, and undistorted. After data acquisition is completed, the next step is data preprocessing. Data preprocessing includes image denoising and image enhancement; image denoising is to remove noise and interference in the image to improve the quality and clarity of the image; image enhancement is to make the image more vivid and easier to analyze by adjusting parameters such as image brightness, contrast and color; Yolov7 and Attention-DPT are fused to obtain an improved Yolov7 model - Yolov7-Attention-DPT, which greatly reduces the redundant features of the feature map after the Yolov7 backbone network, and has a great effect on accelerating the detection speed and improving the detection accuracy; the present invention can quickly perform AOI detection on the binding of flexible circuit boards of display modules, while improving the detection accuracy, and can accurately and comprehensively detect defects and problems on circuit boards, providing reliable protection for the production process. At the same time, this method can also reduce the workload and error rate of manual detection, and help improve production efficiency and yield rate. BRIEF DESCRIPTION OF THE DRAWINGS
[0028] Figure 1 The present invention is a flowchart of a flexible circuit board binding AOI detection method.
[0029] Figure 2 Schematic diagram of the principle of the Attention-DPT attention mechanism of the present invention. DETAILED DESCRIPTION
[0030] In order to facilitate understanding by those skilled in the art, the present invention will be further described below with reference to the embodiments and the accompanying drawings. The contents mentioned in the embodiments are not intended to limit the present invention. The present invention will be described in detail below with reference to the accompanying drawings.
[0031] Example 1
[0032] A flexible circuit board binding AOI detection method comprises the following steps:
[0033] Step S10, data acquisition and preprocessing: photographing the circuit board to be inspected to obtain an image to be inspected, and performing data preprocessing on the image to be inspected; the data preprocessing includes image denoising and image enhancement;
[0034] Step S20, feature extraction based on Yolov7 backbone: the image data after data preprocessing is passed into the Yolov7 backbone network for image feature extraction, and a feature map in the image is extracted;
[0035] Step S30, Attention-DPT attention mechanism: feature weighting based on the feature map extracted by the Yolov7 backbone network;
[0036] Step S40: Output the defect category and confidence level: Input the weighted feature map into Yolo Head; In Yolo Head, the position of the prediction box is adjusted through regression and classification to match the position of the target object.
[0037] Specifically, the embodiments of the present application are cleverly designed. AOI data acquisition and preprocessing are key steps in achieving efficient, accurate and reliable automatic optical inspection. The key to data acquisition is to select appropriate acquisition parameters, such as exposure time, frame rate and image resolution, to ensure that the acquired images are clear, rich in details and undistorted. After data acquisition is completed, the next stage is data preprocessing. Data preprocessing includes image denoising and image enhancement; image denoising is to remove noise and interference in the image to improve the quality and clarity of the image; image enhancement is to make the image more vivid and easier to analyze by adjusting parameters such as image brightness, contrast and color; Yolov7 and Attention-DPT are fused to obtain an improved Yolov7 model - Yolov7-Attention-DPT, which greatly reduces the redundant features of the feature map after the Yolov7 backbone network, and has a great effect on accelerating the detection speed and improving the detection accuracy; the embodiment of the present application can quickly perform AOI detection on the binding of the flexible circuit board of the display module, while improving the detection accuracy, and can accurately and comprehensively detect defects and problems on the circuit board, providing reliable protection for the production process. At the same time, this method can also reduce the workload and error rate of manual inspection, which helps to improve production efficiency and yield rate.
[0038] In the embodiment of the present application, the image denoising function is to remove noise and interference in the image to improve the quality and clarity of the image. The present invention selects wavelet transform to perform denoising on the image; wavelet transform is a multi-scale analysis method that decomposes the signal into frequency bands of different scales; wavelet transform matches the signal with the wavelet basis function through a convolution operation to obtain frequency band coefficients of different scales. The image denoising in the present application uses wavelet transform to perform denoising on the image; wavelet transform matches the signal with the wavelet basis function through a convolution operation to obtain frequency band coefficients of different scales; the formula of wavelet denoising is expressed as: Among them, X is the original image, W represents wavelet transform, T represents threshold processing, and W -1 represents the inverse wavelet transform, The denoised image.
[0039] In the embodiment of the present application, image enhancement is to adjust parameters such as brightness, contrast, and color of the image to make the image more vivid and easier to analyze; image segmentation is to divide the image into a region of interest and other regions for subsequent feature extraction and detection; the image enhancement in the embodiment of the present application uses histogram equalization to enhance the image, and its principle is expressed as follows:
[0040] new_image(x,y)=round((CDF(image(x,y))-CDF min )×(L-1)), where image(x,y) represents the pixel value of the original image, new_image(x,y) represents the pixel value of the equalized image, and CDF(image(x,y)) represents the cumulative probability corresponding to the pixel value of the original image. min is the minimum cumulative probability, and L is the total number of gray levels.
[0041] In the embodiment of the present application, in step S20, the image input into the Yolov7 backbone network is passed layer by layer, and feature maps of different scales are extracted in each layer. Specifically, after preprocessing the image data collected in real time, the preprocessed image data is then passed into the Yolov7 backbone network for basic feature extraction; the Yolov7 backbone network plays a key role in the embodiment of the present application, as it is responsible for extracting image features and performing efficient target detection; the image undergoes a series of operations such as convolution and pooling to extract feature information from the image; then, the input image is passed layer by layer, and features of different scales are extracted in each layer; these features have different semantic information, and features are gradually enhanced from low-level to high-level, and can capture target features at different levels.
[0042] In the embodiment of the present application, in step S30, the structure of the Attention-DPT attention mechanism is as follows: Figure 2 As shown in the figure, the main idea is to perform feature weighting based on the feature map extracted by the Yolov7 backbone network to highlight the useful defect features of the module flexible circuit board binding and reduce useless redundant defect features, thereby reducing the interference of useless features on detection accuracy and robustness; the steps of feature weighting based on the feature map extracted by the Yolov7 backbone network include:
[0043] Step S31, feature input: input the extracted feature map into the Attention-DPT attention mechanism;
[0044] Step S32, pooling operation: The feature map is processed by the average pooling layer and the maximum pooling layer to obtain two sets of deeper feature maps; at the same time, the number of channels of the two sets of feature maps is adjusted using the feature transposition operation to facilitate subsequent feature fusion.
[0045] Step S33, feature splicing: The two adjusted feature maps are combined into two new feature maps through feature splicing operation, and two feature maps with different levels and scale features are obtained; Step S34, feature pyramid network convolution: The feature extraction capability of the feature pyramid network (FPN) is used to further extract and fuse the two feature maps; FPN can effectively fuse features of different levels and scales to obtain a more representative feature representation.
[0046] Step S35, dimensionality-increasing tensor product: Use dimensionality-increasing tensor product to perform feature fusion and feature interaction on the feature map obtained by convolution of the feature pyramid network; expand the channel dimension of the two feature maps and then multiply them element by element to achieve feature interaction and fusion; this feature fusion and interaction method can make full use of feature information at different levels and scales to extract more representative feature representations; in this way, feature information at different levels and scales can interact with each other, complement each other's advantages, and maintain feature consistency and coherence during feature fusion and feature interaction, further improving the accuracy and robustness of detection.
[0047] Step S36: Feature Weighting: The fused feature map is weighted using the attention mechanism. The attention mechanism calculates the weight of each pixel based on features such as the pixel value and spatial position in the feature map, thereby determining the importance of the pixel in subsequent processing. The weighted feature map focuses more on useful defect features and reduces the interference of useless features.
[0048] In the embodiment of the present application, in the step S40, the regression uses the bounding box regression technology to fine-tune the prediction box of the defect by the offset of the center coordinates, width and height of the prediction box to detect the target object; then, the softmax function is used to map the features in the prediction box to the probability distribution of different categories; finally, the category with the highest probability is selected as the prediction category according to the probability distribution. Specifically, the weighted features are input into the Yolo Head, and in the Yolo Head, the position of the prediction box is adjusted by regression and classification to more accurately match the position of the target object; the regression uses the bounding box regression technology to fine-tune the prediction box of the defect by the offset of the center coordinates, width and height of the prediction box to more accurately detect the target object; then, the softmax function is used to map the features in the prediction box to the probability distribution of different categories; finally, the category with the highest probability is selected as the prediction category according to the probability distribution; through these steps, the improved Yolov7 can accurately locate and classify the detected target objects, thereby realizing the function of defect detection.
[0049] Example 2
[0050] Embodiment 2 of the present application provides an AOI detection system using the flexible circuit board binding AOI detection method, which includes:
[0051] Data acquisition and preprocessing module: photographs the circuit board to be inspected to obtain the image to be inspected, and performs data preprocessing on the image to be inspected; data preprocessing includes image denoising and image enhancement;
[0052] Feature extraction module: The image data after data preprocessing is passed into the Yolov7 backbone network for image feature extraction, and the feature map in the image is extracted;
[0053] Feature weighting module: performs feature weighting based on the feature map extracted by the Yolov7 backbone network; output defect category and confidence module: inputs the weighted feature map into Yolo Head; in Yolo Head, the position of the prediction box is adjusted through regression and classification to match the position of the target object.
[0054] Example 3
[0055] Embodiment 3 of the present application provides a computer storage medium, which stores computer instructions. When the computer instructions are called, they are used to execute the flexible circuit board binding AOI detection method.
[0056] The above description is only a preferred embodiment of the present invention and does not limit the present invention in any form. Although the present invention is disclosed as a preferred embodiment as above, it is not used to limit the present invention. Any technician familiar with this profession can make some changes or modifications to equivalent embodiments of equivalent changes by using the technical content disclosed above without departing from the scope of the technical solution of the present invention. However, any simple modifications, equivalent changes and modifications made to the above embodiments according to the technology of the present invention are all within the scope of the technical solution of the present invention without departing from the content of the technical solution of the present invention.
Claims
1. A flexible circuit board binding AOI detection method, characterized in that: The following steps are involved: Step S10, data acquisition and preprocessing: photographing the circuit board to be inspected to obtain an image to be inspected, and performing data preprocessing on the image to be inspected; Data preprocessing includes image denoising and image enhancement; Step S20, feature extraction based on Yolov7 backbone: the image data after data preprocessing is passed into the Yolov7 backbone network for image feature extraction, and a feature map in the image is extracted; Step S30, Attention-DPT attention mechanism: feature weighting based on the feature map extracted by the Yolov7 backbone network; Step S40: Output the defect category and confidence: Input the weighted feature map into Yolo Head; In Yolo Head, adjust the position of the prediction box through regression and classification to match the position of the target object.
2. The flexible circuit board binding AOI detection method according to claim 1, characterized in that: The image denoising uses wavelet transform to denoise the image; wavelet transform matches the signal with the wavelet basis function through convolution operation to obtain frequency band coefficients of different scales; the formula of wavelet denoising is expressed as: Among them, X is the original image, W represents wavelet transform, T represents threshold processing, and W -1 represents the inverse wavelet transform, The denoised image.
3. The flexible circuit board binding AOI detection method according to claim 1, characterized in that: The image enhancement uses histogram equalization to perform image enhancement on the image, and its principle is expressed as follows: new_image(x,y)=round((CDF(image(x,y))-CDF min )×(L-1)), where image(x,y) represents the pixel value of the original image, new_image(x,y) represents the pixel value of the equalized image, and CDF(image(x,y)) represents the cumulative probability corresponding to the pixel value of the original image. min is the minimum cumulative probability, and L is the total number of gray levels.
4. The flexible circuit board binding AOI inspection method according to claim 1, characterized in that: In step S20, the image input into the Yolov7 backbone network is passed layer by layer, and feature maps of different scales are extracted in each layer.
5. The flexible circuit board binding AOI detection method according to claim 1, characterized in that: The step of performing feature weighting based on the feature map extracted by the Yolov7 backbone network in step S30 includes: Step S31, feature input: input the extracted feature map into the Attention-DPT attention mechanism; Step S32, pooling operation: Process the feature map through the average pooling layer and the maximum pooling layer to obtain two sets of deeper feature maps; Step S33, feature splicing: combining the two adjusted feature maps into two new feature maps through a feature splicing operation, thereby obtaining two feature maps with different hierarchical and scale features; Step S34, feature pyramid network convolution: using the feature extraction capability of the feature pyramid network to further extract and fuse the two feature maps; Step S35, dimensionality-increasing tensor product: using dimensionality-increasing tensor product to perform feature fusion and feature interaction on the feature maps obtained by convolution of the feature pyramid network; by expanding the channel dimensions of the two feature maps and then performing element-by-element multiplication, feature interaction and fusion are achieved; Step S36, feature weighting: weight the fused feature map through the attention mechanism.
6. The flexible circuit board binding AOI detection method according to claim 1, characterized in that: In step S40, the bounding box regression technique is used for regression to fine-tune the defect prediction box by adjusting the center coordinates, width, and height offsets of the prediction box to detect the target object. Then, the softmax function is used to map the features within the prediction box to the probability distribution of different categories. Finally, the category with the highest probability is selected as the prediction category based on the probability distribution.
7. An AOI detection system using the AOI detection method according to any one of claims 1 to 6, characterized in that: include: Data acquisition and preprocessing module: photographs the circuit board to be inspected to obtain the image to be inspected, and performs data preprocessing on the image to be inspected; Data preprocessing includes image denoising and image enhancement; Feature extraction module: The image data after data preprocessing is passed into the Yolov7 backbone network for image feature extraction, and the feature map in the image is extracted; Feature weighting module: performs feature weighting based on the feature map extracted by Yolov7 backbone network; Output defect category and confidence module: The weighted feature map is input into Yolo Head; in Yolo Head, the position of the prediction box is adjusted through regression and classification to match the position of the target object.
8. A computer storage medium storing computer instructions, wherein the computer instructions, when called, are used to execute the flexible circuit board binding AOI detection method according to any one of claims 1 to 6.
Citation Information
Patent Citations
Printed circuit board defect detection method based on improved YOLOv5s
CN114820486A
PCB defect detection and identification method based on YOLO-SEE
CN117372339A