CN113256623A - FPC defect detection method based on improved MASK RCNN - Google Patents

FPC defect detection method based on improved MASK RCNN Download PDF

Info

Publication number
CN113256623A
CN113256623A CN202110723382.0A CN202110723382A CN113256623A CN 113256623 A CN113256623 A CN 113256623A CN 202110723382 A CN202110723382 A CN 202110723382A CN 113256623 A CN113256623 A CN 113256623A
Authority
CN
China
Prior art keywords
fpc
defect
image
model
defect detection
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202110723382.0A
Other languages
Chinese (zh)
Other versions
CN113256623B (en
Inventor
邓承志
吴朝明
罗林杰
汪胜前
徐晨光
孙小惟
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Nanchang Institute of Technology
Original Assignee
Nanchang Institute of Technology
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Nanchang Institute of Technology filed Critical Nanchang Institute of Technology
Priority to CN202110723382.0A priority Critical patent/CN113256623B/en
Publication of CN113256623A publication Critical patent/CN113256623A/en
Application granted granted Critical
Publication of CN113256623B publication Critical patent/CN113256623B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/0002Inspection of images, e.g. flaw detection
    • G06T7/0004Industrial image inspection
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/24Classification techniques
    • G06F18/241Classification techniques relating to the classification model, e.g. parametric or non-parametric approaches
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/045Combinations of networks
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/08Learning methods
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/20Image preprocessing
    • G06V10/25Determination of region of interest [ROI] or a volume of interest [VOI]
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/10Image acquisition modality
    • G06T2207/10004Still image; Photographic image
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/20Special algorithmic details
    • G06T2207/20021Dividing image into blocks, subimages or windows
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/20Special algorithmic details
    • G06T2207/20081Training; Learning
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/20Special algorithmic details
    • G06T2207/20084Artificial neural networks [ANN]
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/20Special algorithmic details
    • G06T2207/20112Image segmentation details
    • G06T2207/20132Image cropping
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/30Subject of image; Context of image processing
    • G06T2207/30108Industrial image inspection
    • G06T2207/30141Printed circuit board [PCB]

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Data Mining & Analysis (AREA)
  • Evolutionary Computation (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Artificial Intelligence (AREA)
  • General Engineering & Computer Science (AREA)
  • Computing Systems (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Molecular Biology (AREA)
  • Computational Linguistics (AREA)
  • Biophysics (AREA)
  • Biomedical Technology (AREA)
  • Mathematical Physics (AREA)
  • Software Systems (AREA)
  • Health & Medical Sciences (AREA)
  • General Health & Medical Sciences (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • Evolutionary Biology (AREA)
  • Multimedia (AREA)
  • Quality & Reliability (AREA)
  • Image Analysis (AREA)
  • Image Processing (AREA)

Abstract

本发明公开了一种基于改进MASK RCNN的FPC缺陷检测方法,步骤如下:S1.ROI处理和图像裁剪,采集目标检测图像,对FPC原始图像数据预处理,裁剪成适合网络输入的小图像;S2.对预处理后的图像进行数据增强处理,扩大模型训练的数据集;S3.人工标注;S4.确定特征图block横向堆叠次数N,针对FPC缺陷检测的种类和数量,确定特征图block横向堆叠次数N;S5.模型训练,将标注好的图像数据集送进改进MAKS RCNN网络模型进行训练;S6.对训练好的FPC缺陷检测模型进行性能评估;S7.参数优化微调,结合S6的评估结果,对模型进行进一步的优化。本发明实现了FPC缺陷的自动检测,且通过掩膜分割图像缺陷可得到缺陷大小,方便工作人员复判,大幅度降低了企业检测成本。

Figure 202110723382

The invention discloses an FPC defect detection method based on an improved MASK RCNN. The steps are as follows: S1. ROI processing and image cropping, collecting target detection images, preprocessing FPC original image data, and cropping into small images suitable for network input; S2. . Perform data enhancement processing on the preprocessed images to expand the data set for model training; S3. Manual annotation; S4. Determine the number of horizontal stacking of feature map blocks N, and determine the horizontal stacking of feature map blocks according to the type and number of FPC defect detection Number of times N; S5. Model training, send the marked image data set to the improved MAKS RCNN network model for training; S6. Perform performance evaluation on the trained FPC defect detection model; S7. Parameter optimization and fine-tuning, combined with the evaluation results of S6 , to further optimize the model. The invention realizes the automatic detection of FPC defects, and the size of the defects can be obtained by dividing the image defects by the mask, which is convenient for staff to re-judgment and greatly reduces the detection cost of enterprises.

Figure 202110723382

Description

FPC defect detection method based on improved MASK RCNN
Technical Field
The invention relates to the technical field of flexible circuit board defect detection and image segmentation, in particular to an FPC defect detection method based on improved MASK RCNN.
Background
The flexible Printed Circuit board is called as fpc (flexible Printed Circuit board) for short, and has the characteristics of thin thickness, light weight, and free bending and folding. Compared with the traditional circuit board, the FPC occupies less space, can greatly reduce the packaging size and weight so as to meet the requirements of high integration and mobility of electronic products, can realize the three-dimensional space wiring of the circuit, enhances the reliability of the products and reduces the assembly cost. Because the FPC material is special, has high integration level and complex process, the manufacturing process is easily affected by factors such as equipment, personnel, environment and the like to generate defects.
The MASK RCNN network is an example segmentation model based on RCNN network improvement, and can accurately segment pixels corresponding to an object while detecting the object. The feature extraction of the MASK RCNN mainly comprises a residual error network and a feature pyramid network, the extracted feature graph is sent to an RPN network to screen candidate frames, and finally target detection and segmentation are finished by a classification branch, a detection branch and a MASK branch; however, compared with the PCB, the FPC has the defect characteristics of more image types, more quantity, random positions, less characteristic information, small defects and the like; the traditional image processing method is difficult to realize accurate detection and segmentation of such FPC defect images, and the MASK RCNN network model is also difficult to accurately detect, classify and segment FPC defects, so that an improved MASK RCNN-based FPC defect detection method is urgently needed to solve the problems.
Disclosure of Invention
The invention aims to overcome the defects of the prior art, and provides an FPC defect detection method based on an improved MASK RCNN, which realizes automatic detection, classification and segmentation of main defects of an FPC, saves the labor cost of enterprises, and greatly improves the defect detection efficiency.
The technical scheme of the invention is as follows:
the method comprises the following steps:
s1, ROI processing and image cutting, wherein a field target detection image is collected, and the data of an FPC original image is preprocessed, wherein the preprocessing comprises ROI processing and image cutting;
s2, performing data enhancement processing on the preprocessed image;
s3, manual marking, namely performing manual marking on the image data after the enhancement processing, and then dividing a data set;
s4, determining the transverse stacking times N of the feature map blocks, wherein the transverse stacking times N of the feature map blocks are determined according to the types and the quantity of FPC defects to be identified;
s5, model training, namely sending the marked image data into an improved MASK RCNN network model for training to obtain an FPC defect detection model;
s6, performing performance evaluation on the trained FPC defect detection model;
and S7, optimizing and fine-tuning parameters, and further optimizing and fine-tuning the FPC defect detection model by combining the evaluation result of S6.
Further, S5 specifically includes the following steps:
s51: setting the pixel area of the RPN network anchor to 82,162,322,642,2562The aspect ratio of the anchors is set to be {3:4, 1:1, 3:1}, and the step size of the anchors is set to be 4;
s52: extracting network extraction features by using EfficientNet as a backbone feature;
s53: combining the bottom layer characteristic graph and the high layer characteristic graph semantic information to create a characteristic graph block from left to right from bottom to top;
s54: the threshold value for judging defects by the model is set to G, and if the model output score is smaller than the threshold value G, the defect is judged to be not present, and if the score is larger than the threshold value G, the defect is judged to be present.
Furthermore, the specific method of ROI processing is to cut out a portion to be detected, i.e., an ROI (region of interest) image, from the original high-resolution FPC image, and cut out the ROI image into K pieces, where the K pieces of cut-out image have a maximum resolution of 1024 × 1024 and a minimum resolution of 256 × 256, and K selects a value from the natural number set {2, 3, 4} according to the original high-resolution FPC image.
Further, the data enhancement processing method adopts image rotation, image mirroring, image contrast adjustment, image translation and random deletion to increase the training data set.
Furthermore, the manual labeling adopts a Labelme labeling tool, the real position of the defect is labeled on the data set, and the labeled data set is divided into a training set and a verification set according to the proportion of 4 to 1.
Furthermore, the number of times of transverse stacking of the feature map blocks is N times, and N selects a numerical value in the natural number set {3, 4, 5, 6} according to the FPC defect type.
Further, the specific implementation steps of the feature map block are as follows: performing 1 × 1 convolution operation on 5 feature maps C1, C2, C3, C4 and C5 generated by the trunk feature extraction network to generate C1_0, C2_0, C3_0, C4_0 and C5_0, performing upsampling on the last four feature maps C2_0, C3_0, C4_0 and C5_0 to generate C2_1, C3_1, C4_1 and C5_1, performing element-by-element addition and fusion with the previous feature map to generate C1_2, C2_2, C3_2 and C4_2, and performing element-by-element addition on the C2_2, C3_2 and C4_2 generated by the trunk feature extraction network and the C2, C3 and C4 feature maps generated by the trunk feature extraction network, wherein the steps are stacking feature maps N times; finally, performing 3-by-3 convolution on C1_2 from bottom to top to generate a valid feature map P1; after the maximum pooling operation of P1, adding C2_2 element by element, and performing 3-by-3 convolution to generate an effective characteristic map P2; performing 3 × 3 convolution and maximum pooling on the effective feature map P2, adding the effective feature map P2 to C3_2 element by element, and performing 3 × 3 convolution to generate an effective feature map P3; performing 3 × 3 convolution and maximum pooling on the effective feature map P3, adding the effective feature map P3 to C4_2 element by element, and performing 3 × 3 convolution to generate an effective feature map P4; c5_2 is convolved 3 x3 with P4 and maximally pooled, and then added pixel by pixel, and further convolved 3 x3 to generate the active signature P5.
Further, when the number of times N of transverse stacking and the number N of FPC defect types is more than or equal to 1 and less than or equal to 9, taking N as 3; when the number N of the FPC defect types is more than or equal to 10 and less than or equal to 14, N is 4; when the number N of the FPC defect types is more than or equal to 15 and less than or equal to 20, taking N as 5; when the FPC defect type N exceeds 20, taking N as 6;
further, according to the characteristics of FPC defect, the pixel area of RPN network anchor is set to be 82,162,322,642,2562The aspect ratio of the anchors is set to be {3:4, 1:1, 3:1}, and the step size of the anchors is set to be 4;
further, the performance evaluation of the trained FPC defect detection model is mainly divided into three categories, namely defect positioning, defect classification and defect segmentation; for defect positioning and defect classification, calculating the average precision mAP as an evaluation index; for defect segmentation, calculating the ratio of a defect segmentation pixel to a defect actual pixel as an evaluation index; and if the mAP of the model is more than or equal to 90% and the ratio of correctly dividing the pixels is more than or equal to 60%, determining that the model can accurately detect and divide the defects of the FPC, otherwise, optimizing and finely adjusting the model.
Further, further optimization and fine tuning of the FPC defect detection model are mainly achieved by increasing the number of training samples, adjusting the transverse stacking times N of the feature map blocks, and modifying the learning rate and the iteration times.
Compared with the prior art, the invention has the following remarkable advantages:
(1) the invention enhances the detection capability of the network model for small targets and targets with single characteristics;
(2) the invention realizes the automatic detection, classification and segmentation of FPC defects;
(3) the invention solves the problem that the traditional algorithm can only detect specific defects, and saves labor cost;
(4) the segmented defect image is covered by a mask with random colors, so that field workers can conveniently judge the defect image, and the number of the defect pixels can be obtained through the number of the mask pixels.
Drawings
FIG. 1 is a flowchart illustrating an FPC defect detection method based on modified MASK RCNN according to the present embodiment;
fig. 2 is a block network structure of a feature map of the present example.
Detailed Description
The objects, technical solutions and advantages of the present invention will be further described with reference to the accompanying drawings. It should be understood that the embodiments described herein are not intended to be construed as merely illustrative of the present invention and not limitative of the scope thereof.
As shown in fig. 1, a FPC defect detection method based on improved MASK RCNN includes the following steps:
step 1, ROI processing and image cutting, wherein a target detection image of an industrial field is acquired, and FPC original image data is preprocessed, wherein the preprocessing comprises the ROI processing and the image cutting.
And 2, performing data enhancement processing on the preprocessed image, wherein the data enhancement processing adopts a traditional image processing method: image rotation, image mirroring, image contrast adjustment, image translation and random deletion, and the data set is enlarged through data enhancement processing, so that the robustness of the model is improved.
And 3, manually labeling the FPC image data after the enhancement processing, wherein Labelme software is used for labeling the FPC image data set in the embodiment, and recording the real pixel point coordinates of the defects in the data set. Dividing a training set and a verification set into data sets according to the proportion of 4 to 1, wherein image data of the training set is used for training a model, image data of the verification set is used for verifying the detection capability of the model, and the model continuously adjusts network parameters according to the verification effect through a large amount of training.
Step 4, determining the transverse stacking times N of feature block, please refer to fig. 2, where fig. 2 is a network structure of the feature block of the present example, where a plus sign (+) in the figure indicates element-by-element addition, a dashed box indicates the feature block, and for the types and number of FPC defects to be identified, determining the transverse stacking times N of the feature block, where N is equal to or greater than 1 and equal to or less than 9, and where N is 3; when the number N of the defect types is more than or equal to 10 and less than or equal to 14, taking N as 4; when the number N of the defect types is more than or equal to 15 and less than or equal to 20, taking N as 5; when the number N of defect types exceeds 20, taking N as 6; the specific implementation steps of the feature map block are as follows: performing 1 × 1 convolution operation on 5 feature maps C1, C2, C3, C4 and C5 generated by the trunk feature extraction network to generate C1_0, C2_0, C3_0, C4_0 and C5_0, performing upsampling on the last four feature maps C2_0, C3_0, C4_0 and C5_0 to generate C2_1, C3_1, C4_1 and C5_1, performing element-by-element addition and fusion with the previous feature map to generate C1_2, C2_2, C3_2 and C4_2, and performing element-by-element addition on the C2_2, C3_2 and C4_2 generated by the trunk feature extraction network and the C2, C3 and C4 feature maps generated by the trunk feature extraction network, wherein the steps are stacking feature maps N times; finally, performing 3-by-3 convolution on C1_2 from bottom to top to generate a valid feature map P1; after the maximum pooling operation of P1, adding C2_2 element by element, and performing 3-by-3 convolution to generate an effective characteristic map P2; performing 3 × 3 convolution and maximum pooling on the effective feature map P2, adding the effective feature map P2 to C3_2 element by element, and performing 3 × 3 convolution to generate an effective feature map P3; performing 3 × 3 convolution and maximum pooling on the effective feature map P3, adding the effective feature map P3 to C4_2 element by element, and performing 3 × 3 convolution to generate an effective feature map P4; c5_2 is convolved 3 x3 with P4 and maximally pooled, and then added pixel by pixel, and further convolved 3 x3 to generate the active signature P5.
Step 5, model training, namely setting the pixel area of the RPN network anchor as 82,162,322,642,2562Setting the width-to-height ratio of the anchors as {3:4, 1:1, 3:1}, setting the step length of the anchors as 4, setting the threshold value of the defects judged by the model as G, judging whether the defects exist if the output score of the model is smaller than the threshold value G, judging whether the defects exist if the output score of the model is larger than the threshold value G, sending the marked FPC image data into an improved MASK RCNN network model for training, and training an FPC defect detection model.
Step 6, performing performance evaluation on the trained FPC defect detection model, wherein the model evaluation is mainly divided into three categories of defect positioning, defect classification and defect segmentation; for defect positioning and defect classification, calculating the average precision mAP as an evaluation index; for defect segmentation, calculating the ratio of a defect segmentation pixel to a defect actual pixel as an evaluation index; and testing the FPC image by using the trained FPC detection model, if the mAP of the model is more than or equal to 90% and the ratio of correctly dividing pixels is more than or equal to 60%, determining that the model can accurately detect and divide the defects of the FPC, and otherwise, optimizing and finely adjusting the model.
And 7, optimizing and fine-tuning parameters, further optimizing and fine-tuning the FPC defect detection model by combining the evaluation result of the step 6, and mainly realizing the optimization and fine-tuning by increasing the number of training samples, adjusting the transverse stacking times N of the feature diagram blocks, modifying the learning rate and the iteration times.
Examples
In the embodiment, the method for detecting the FPC defect based on the improved MASK RCNN comprises the steps of firstly preprocessing an acquired original FPC image, then performing data enhancement on the preprocessed image to enlarge the data volume of the FPC image, then manually marking the enhanced image data, dividing a marked data set into a training set and a verification set according to the proportion of 4: 1, then sending the divided data set into a model for training, finally evaluating the trained model, and judging whether the model meets the FPC detection requirement. The method comprises the following specific steps:
step 1: and ROI processing and image cutting, namely acquiring a target detection image of an industrial field, and preprocessing the data of the FPC original image, including ROI processing and image cutting.
Step 2: and performing data enhancement processing on the preprocessed image, wherein the data enhancement processing adopts a traditional image processing method: image rotation, image mirroring, image contrast adjustment, image translation and random deletion, and the data set is expanded to 3 times of the original data set through data enhancement processing.
And step 3: and manual labeling, namely performing manual labeling on the FPC image data after the enhancement processing, and labeling the FPC image data set by using Labelme software in the embodiment and recording the coordinates of the real pixel points of the defects in the data set. Dividing a training set and a verification set into data sets according to the proportion of 4 to 1, wherein image data of the training set is used for training a model, image data of the verification set is used for verifying the detection capability of the model, and the model continuously adjusts network parameters according to the verification effect through a large amount of training.
And 4, step 4: determining the transverse stacking times N of the feature map block, and determining the transverse stacking times N of the feature map block aiming at the types and the number of FPC (flexible printed circuit) defects to be identified, wherein the number N of the types of the FPC data defects collected in the embodiment is 3, the value of N is within the range that N is not less than 1 and not more than 9, and the transverse stacking times N are 3;
and 5: model training, the pixel area of the RPN network anchor is set as 82,162,322,642,2562The aspect ratio of the anchors is set to be {3:4, 1:1, 3:1}, and the step size of the anchors is set to be 4; and setting a threshold value of the model for judging the defects to be 0.7, judging that the defects do not exist if the output score of the model is less than the threshold value of 0.7, judging that the defects exist if the output score of the model is greater than the threshold value of 0.7, and sending the marked FPC image data into an improved MASK RCNN network model for training to obtain an FPC defect detection model.
Step 6: performing performance evaluation on the trained FPC defect detection model, wherein the model evaluation mainly comprises three types of defect positioning, defect classification and defect segmentation; for defect positioning and defect classification, calculating the average precision mAP as an evaluation index; for defect segmentation, calculating the ratio of a defect segmentation pixel to a defect actual pixel as an evaluation index; and testing the FPC image by using the trained FPC detection model, if the mAP of the model is more than or equal to 90% and the ratio of correctly dividing pixels is more than or equal to 60%, determining that the model can accurately detect and divide the defects of the FPC, and otherwise, optimizing and finely adjusting the model.
And 7: and (4) optimizing and fine-tuning parameters, further optimizing and fine-tuning the FPC defect detection model by combining the evaluation result of the step (6), and mainly realizing the optimization and fine-tuning by increasing the number of training samples, adjusting the transverse stacking times N of the feature diagram block, modifying the learning rate and the iteration times.
This example uses a pytorech deep learning framework with experimental computer hardware configured to: AMD Ryzen 93900X 12 core 24 thread processor, GeForce RTX3090 graphics card, 32G operation memory, 500G NVME solid state disk; the experimental software environment is 64-bit Windows 10 professional edition, Pycharm integrated development environment, CUDA version is 11.1, CUDNN version is 8.0.4.30, and the final result is shown in Table 1.
TABLE 1 results of the experiments
Figure 106091DEST_PATH_IMAGE002
As can be seen from table 1, after training, the average accuracy maps of the defect detection of the 2 types of FPC images ((the first type of FPC image (FPC 1) and the second type of FPC image (FPC 2)) are all over 90%, the correct segmented pixel ratio of the FPC1 is 72.3%, the FPC2 data set is small, the correct segmented pixel ratio is 63.6%, and the average detection time of a single image is over 23 milliseconds.
Although embodiments of the present invention have been shown and described, it will be appreciated by those skilled in the art that changes, modifications, substitutions and alterations can be made in these embodiments without departing from the principles and spirit of the invention, the scope of which is defined in the appended claims and their equivalents.

Claims (9)

1. An FPC defect detection method based on improved MASK RCNN is characterized by comprising the following steps:
s1, ROI processing and image cutting, wherein a field target detection image is collected, and the data of an FPC original image is preprocessed, wherein the preprocessing comprises ROI processing and image cutting;
s2, performing data enhancement processing on the preprocessed image;
s3, manual marking, namely performing manual marking on the image data after the enhancement processing, and then dividing a data set;
s4, determining the transverse stacking times N of the feature map blocks, wherein the transverse stacking times N of the feature map blocks are determined according to the types and the quantity of FPC defects to be identified;
s5, model training, namely sending the marked image data into an improved MASK RCNN network model for training to obtain an FPC defect detection model;
s6, performing performance evaluation on the trained FPC defect detection model;
and S7, optimizing and fine-tuning parameters, and further optimizing and fine-tuning the FPC defect detection model by combining the evaluation result of S6.
2. The method for FPC defect detection based on modified MASK RCNN according to claim 1, wherein: the specific method of ROI processing is that a part needing to be detected, namely an ROI image, is cut out of an original high-resolution FPC image, then the ROI image is cut out into K parts, the maximum resolution of the K parts of cut images is 1024 x 1024, the minimum resolution is 256 x 256, and K selects a numerical value in a natural number set {2, 3, 4} according to the original high-resolution FPC image.
3. The method for FPC defect detection based on modified MASK RCNN according to claim 1, wherein: the data enhancement processing method adopts image rotation, image mirroring, image contrast adjustment, image translation and random deletion to increase a training data set.
4. The method for FPC defect detection based on modified MASK RCNN according to claim 1, wherein: and the manual marking adopts a Labelme marking tool, the real position of the defect is marked on the data set, and the marked data set is divided into a training set and a verification set according to the proportion of 4 to 1.
5. The method for FPC defect detection based on modified MASK RCNN according to claim 1, wherein: the number of times of transverse stacking of the feature graphs is N times, N selects a numerical value in a natural number set {3, 4, 5, 6} according to the FPC defect types, and when the number N of the FPC defect types is more than or equal to 1 and less than or equal to 9, N is 3; when the number N of the defect types is more than or equal to 10 and less than or equal to 14, taking N as 4; when the number N of the defect types is more than or equal to 15 and less than or equal to 20, taking N as 5; when the number N of defect types exceeds 20, N is 6.
6. The method according to claim 1, wherein the step S5 specifically comprises the following steps:
s51: setting the pixel area of the RPN network anchor to 82,162,322,642,2562The aspect ratio of the anchors is set to be {3:4, 1:1, 3:1}, and the step size of the anchors is set to be 4;
s52: extracting network extraction features by using EfficientNet as a backbone feature;
s53: combining the bottom layer characteristic graph and the high layer characteristic graph semantic information to create a characteristic graph block from left to right from bottom to top;
s54: the threshold value for judging defects by the model is set to G, and if the model output score is smaller than the threshold value G, the defect is judged to be not present, and if the score is larger than the threshold value G, the defect is judged to be present.
7. The method according to claim 6, wherein the method comprises the following steps: the specific method of S53 is as follows: performing 1 × 1 convolution operation on 5 feature maps C1, C2, C3, C4 and C5 generated by the trunk feature extraction network to generate C1_0, C2_0, C3_0, C4_0 and C5_0, performing upsampling on the last four feature maps C2_0, C3_0, C4_0 and C5_0 to generate C2_1, C3_1, C4_1 and C5_1, performing element-by-element addition and fusion with the previous feature map to generate C1_2, C2_2, C3_2 and C4_2, and performing element-by-element addition on the C2_2, C3_2 and C4_2 generated by the trunk feature extraction network and the C2, C3 and C4 feature maps generated by the trunk feature extraction network, wherein the steps are stacking feature maps N times; finally, performing 3-by-3 convolution on C1_2 from bottom to top to generate a valid feature map P1; after the maximum pooling operation of P1, adding C2_2 element by element, and performing 3-by-3 convolution to generate an effective characteristic map P2; performing 3 × 3 convolution and maximum pooling on the effective feature map P2, adding the effective feature map P2 to C3_2 element by element, and performing 3 × 3 convolution to generate an effective feature map P3; performing 3 × 3 convolution and maximum pooling on the effective feature map P3, adding the effective feature map P3 to C4_2 element by element, and performing 3 × 3 convolution to generate an effective feature map P4; c5_2 is convolved 3 x3 with P4 and maximally pooled, and then added pixel by pixel, and further convolved 3 x3 to generate the active signature P5.
8. The method for FPC defect detection based on modified MASK RCNN according to claim 1, wherein: the performance evaluation of the trained FPC defect detection model is mainly divided into three categories of defect positioning, defect classification and defect segmentation; for defect positioning and defect classification, calculating the average precision mAP as an evaluation index; for defect segmentation, calculating the ratio of a defect segmentation pixel to a defect actual pixel as an evaluation index; and if the mAP of the model is more than or equal to 90% and the ratio of correctly dividing the pixels is more than or equal to 60%, determining that the model can accurately detect and divide the defects of the FPC, otherwise, optimizing and finely adjusting the model.
9. The method for FPC defect detection based on modified MASK RCNN according to claim 1, wherein: the further optimization and fine tuning of the FPC defect detection model are mainly realized by increasing the number of training samples, adjusting the transverse stacking times N of block of the feature diagram, and modifying the learning rate and the iteration times.
CN202110723382.0A 2021-06-29 2021-06-29 FPC defect detection method based on improved MASK RCNN Expired - Fee Related CN113256623B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110723382.0A CN113256623B (en) 2021-06-29 2021-06-29 FPC defect detection method based on improved MASK RCNN

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110723382.0A CN113256623B (en) 2021-06-29 2021-06-29 FPC defect detection method based on improved MASK RCNN

Publications (2)

Publication Number Publication Date
CN113256623A true CN113256623A (en) 2021-08-13
CN113256623B CN113256623B (en) 2021-10-26

Family

ID=77189989

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110723382.0A Expired - Fee Related CN113256623B (en) 2021-06-29 2021-06-29 FPC defect detection method based on improved MASK RCNN

Country Status (1)

Country Link
CN (1) CN113256623B (en)

Cited By (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113793343A (en) * 2021-08-23 2021-12-14 南昌航空大学 Defect positioning and segmentation method, system, terminal and storage medium based on image
CN114140385A (en) * 2021-10-26 2022-03-04 杭州涿溪脑与智能研究所 Printed circuit board defect detection method and system based on deep learning
CN114187613A (en) * 2021-12-13 2022-03-15 深圳龙岗智能视听研究院 Crowd counting method based on multi-branch deep neural network and mixed density map
CN114419081A (en) * 2022-03-28 2022-04-29 南昌工程学院 Image semantic segmentation method and system and readable storage medium
CN114462558A (en) * 2022-04-13 2022-05-10 南昌工程学院 Data-augmented supervised learning image defect classification method and system
CN115147643A (en) * 2022-06-09 2022-10-04 南昌工程学院 FPC defect classification method based on CNN and TRANSFORMER
CN115511820A (en) * 2022-09-21 2022-12-23 苏州科德软体电路板有限公司 A flexible circuit board defect detection model training method and defect detection method
CN116883371A (en) * 2023-07-19 2023-10-13 苏州威达智科技股份有限公司 Flexible printed circuit board appearance defect detection method
CN116883824A (en) * 2023-07-26 2023-10-13 自然资源部第一海洋研究所 Marine plankton image in-situ classification system and method
CN117218121A (en) * 2023-11-08 2023-12-12 北京航空航天大学江西研究院 Casting DR image defect identification method
CN117830287A (en) * 2024-01-15 2024-04-05 苏州旗开得电子科技有限公司 A circuit board online detection re-judgment algorithm
CN119048496A (en) * 2024-10-30 2024-11-29 南昌工程学院 PCB defect detection method, system, equipment and storage medium
CN119300248A (en) * 2024-12-11 2025-01-10 深圳市邦正精密机械股份有限公司 A FPC board anti-re-bonding detection method based on target detection

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110110798A (en) * 2019-05-13 2019-08-09 广东工业大学 A kind of weld joint recognition method based on Mask-RCNN network
CN110163207A (en) * 2019-05-20 2019-08-23 福建船政交通职业学院 One kind is based on Mask-RCNN ship target localization method and storage equipment
WO2020007118A1 (en) * 2018-07-02 2020-01-09 北京百度网讯科技有限公司 Display screen peripheral circuit detection method and device, electronic equipment and storage medium
CN110853015A (en) * 2019-11-12 2020-02-28 中国计量大学 Aluminum profile defect detection method based on improved Faster-RCNN
CN110992318A (en) * 2019-11-19 2020-04-10 上海交通大学 Special metal flaw detection system based on deep learning
CN111862025A (en) * 2020-07-14 2020-10-30 中国船舶重工集团公司第七一六研究所 PCB defect automatic detection method based on deep learning
US20200394413A1 (en) * 2019-06-17 2020-12-17 The Regents of the University of California, Oakland, CA Athlete style recognition system and method
CN112991267A (en) * 2021-02-08 2021-06-18 上海工程技术大学 Strip steel surface defect detection method based on improved efficientNet-RCNN

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2020007118A1 (en) * 2018-07-02 2020-01-09 北京百度网讯科技有限公司 Display screen peripheral circuit detection method and device, electronic equipment and storage medium
CN110110798A (en) * 2019-05-13 2019-08-09 广东工业大学 A kind of weld joint recognition method based on Mask-RCNN network
CN110163207A (en) * 2019-05-20 2019-08-23 福建船政交通职业学院 One kind is based on Mask-RCNN ship target localization method and storage equipment
US20200394413A1 (en) * 2019-06-17 2020-12-17 The Regents of the University of California, Oakland, CA Athlete style recognition system and method
CN110853015A (en) * 2019-11-12 2020-02-28 中国计量大学 Aluminum profile defect detection method based on improved Faster-RCNN
CN110992318A (en) * 2019-11-19 2020-04-10 上海交通大学 Special metal flaw detection system based on deep learning
CN111862025A (en) * 2020-07-14 2020-10-30 中国船舶重工集团公司第七一六研究所 PCB defect automatic detection method based on deep learning
CN112991267A (en) * 2021-02-08 2021-06-18 上海工程技术大学 Strip steel surface defect detection method based on improved efficientNet-RCNN

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
JIE SHI ET AL.: ""Target Detection Based on Improved Mask Rcnn in Service Robot"", 《PROCEEDINGS OF THE 38TH CHINESE CONTROL CONFERENCE》 *
林宗沛: ""基于改进Faster--RCNN的高密度柔性电路基板缺陷检测研究"", 《中国优秀硕士学位论文全文数据库 信息科技辑》 *
浦东 等: ""基于轻量级Mask RCNN的均压环歪斜检测"", 《电力信息与通信技术》 *

Cited By (18)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113793343B (en) * 2021-08-23 2023-06-06 南昌航空大学 Method, system, terminal and storage medium for image-based defect location and segmentation
CN113793343A (en) * 2021-08-23 2021-12-14 南昌航空大学 Defect positioning and segmentation method, system, terminal and storage medium based on image
CN114140385A (en) * 2021-10-26 2022-03-04 杭州涿溪脑与智能研究所 Printed circuit board defect detection method and system based on deep learning
CN114187613A (en) * 2021-12-13 2022-03-15 深圳龙岗智能视听研究院 Crowd counting method based on multi-branch deep neural network and mixed density map
CN114419081A (en) * 2022-03-28 2022-04-29 南昌工程学院 Image semantic segmentation method and system and readable storage medium
CN114462558A (en) * 2022-04-13 2022-05-10 南昌工程学院 Data-augmented supervised learning image defect classification method and system
CN115147643B (en) * 2022-06-09 2025-10-21 南昌工程学院 A FPC defect classification method based on CNN and TRANSFORMER
CN115147643A (en) * 2022-06-09 2022-10-04 南昌工程学院 FPC defect classification method based on CNN and TRANSFORMER
CN115511820A (en) * 2022-09-21 2022-12-23 苏州科德软体电路板有限公司 A flexible circuit board defect detection model training method and defect detection method
CN116883371A (en) * 2023-07-19 2023-10-13 苏州威达智科技股份有限公司 Flexible printed circuit board appearance defect detection method
CN116883371B (en) * 2023-07-19 2025-10-03 苏州威达智科技股份有限公司 A method for detecting appearance defects of flexible printed circuit boards
CN116883824A (en) * 2023-07-26 2023-10-13 自然资源部第一海洋研究所 Marine plankton image in-situ classification system and method
CN117218121A (en) * 2023-11-08 2023-12-12 北京航空航天大学江西研究院 Casting DR image defect identification method
CN117830287A (en) * 2024-01-15 2024-04-05 苏州旗开得电子科技有限公司 A circuit board online detection re-judgment algorithm
CN119048496A (en) * 2024-10-30 2024-11-29 南昌工程学院 PCB defect detection method, system, equipment and storage medium
CN119048496B (en) * 2024-10-30 2025-02-18 南昌工程学院 PCB defect detection method, system, equipment and storage medium
CN119300248A (en) * 2024-12-11 2025-01-10 深圳市邦正精密机械股份有限公司 A FPC board anti-re-bonding detection method based on target detection
CN119300248B (en) * 2024-12-11 2025-06-03 深圳市邦正精密机械股份有限公司 FPC board anti-re-lamination detection method based on target detection

Also Published As

Publication number Publication date
CN113256623B (en) 2021-10-26

Similar Documents

Publication Publication Date Title
CN113256623B (en) FPC defect detection method based on improved MASK RCNN
CN113205511B (en) Electronic component batch information detection method and system based on deep neural network
CN109615611B (en) A detection method for self-explosion defects of insulators based on inspection images
CN113222913B (en) Circuit board defect detection positioning method, device and storage medium
JP7170605B2 (en) Defect inspection device, defect inspection method, and program
CN108921152B (en) English character segmentation method and device based on object detection network
CN117351288A (en) PCB defect detection method based on improved YOLO v5 algorithm
CN110458019B (en) Water surface target detection method for eliminating reflection interference under scarce cognitive sample condition
CN112396582B (en) Mask RCNN-based equalizing ring skew detection method
CN118823427A (en) A manhole cover hidden danger detection system based on YOLOV8 improved algorithm
CN113392930A (en) Traffic sign target detection method based on multi-level divide-and-conquer network
CN117934548A (en) An anti-occlusion target tracking algorithm based on correlation filter Staple algorithm
CN114677670A (en) A method for automatic identification and location of ID card tampering
CN119169472A (en) A green orange detection method and computer device based on self-supervised contrastive learning
CN119380099A (en) A microelectronic device surface defect detection method based on improved YOLOv9
CN112966757A (en) Method and device for expanding training sample, storage medium and equipment
CN119784756B (en) Visual recognition method and system for appearance defects of circuit board based on improved YOLO algorithm
CN111369508A (en) Defect detection method and system for metal three-dimensional lattice structure
CN119027416B (en) Die cutter defect inspection method, device, medium and equipment
CN119107532B (en) YOLOv8 model-based PCB defect identification method
CN121074500A (en) PCB bare board defect detection method and system based on improved YOLOv neural network
CN120707531A (en) A PCB surface defect detection method and system based on improved YOLOv8
CN120298859A (en) A method and system for recognizing small target contours in occluded scenes
CN117314861B (en) Method for detecting, identifying and aligning silicon wafer overlay pattern
CN119379617A (en) Photovoltaic module film tape missing detection method, device, equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
CF01 Termination of patent right due to non-payment of annual fee
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20211026