CN114648647A - Defect detection method based on visual attention mechanism - Google Patents
Defect detection method based on visual attention mechanism Download PDFInfo
- Publication number
- CN114648647A CN114648647A CN202011393155.8A CN202011393155A CN114648647A CN 114648647 A CN114648647 A CN 114648647A CN 202011393155 A CN202011393155 A CN 202011393155A CN 114648647 A CN114648647 A CN 114648647A
- Authority
- CN
- China
- Prior art keywords
- defect
- feature map
- image
- scale
- convolution
- 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.)
- Withdrawn
Links
- 230000007547 defect Effects 0.000 title claims abstract description 75
- 238000001514 detection method Methods 0.000 title claims abstract description 27
- 230000000007 visual effect Effects 0.000 title claims abstract description 9
- 230000004927 fusion Effects 0.000 claims abstract description 12
- 238000000605 extraction Methods 0.000 claims description 3
- 230000006870 function Effects 0.000 claims description 3
- 238000010586 diagram Methods 0.000 abstract description 3
- 238000007792 addition Methods 0.000 description 1
- 238000013528 artificial neural network Methods 0.000 description 1
- 230000009286 beneficial effect Effects 0.000 description 1
- 238000013527 convolutional neural network Methods 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F18/00—Pattern recognition
- G06F18/20—Analysing
- G06F18/21—Design or setup of recognition systems or techniques; Extraction of features in feature space; Blind source separation
- G06F18/214—Generating training patterns; Bootstrap methods, e.g. bagging or boosting
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F18/00—Pattern recognition
- G06F18/20—Analysing
- G06F18/24—Classification techniques
- G06F18/241—Classification techniques relating to the classification model, e.g. parametric or non-parametric approaches
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F18/00—Pattern recognition
- G06F18/20—Analysing
- G06F18/25—Fusion techniques
Landscapes
- Engineering & Computer Science (AREA)
- Data Mining & Analysis (AREA)
- Theoretical Computer Science (AREA)
- Computer Vision & Pattern Recognition (AREA)
- Bioinformatics & Cheminformatics (AREA)
- Bioinformatics & Computational Biology (AREA)
- Artificial Intelligence (AREA)
- Evolutionary Biology (AREA)
- Evolutionary Computation (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Life Sciences & Earth Sciences (AREA)
- Image Analysis (AREA)
Abstract
The invention belongs to the technical field of computer vision, and provides a defect detection method based on a visual attention mechanism, which comprises the following steps: inputting the defect image and the saliency mask map of the defect image into the twin network; generating a multi-scale convolution feature map and a multi-scale defect significance convolution feature map through a twin network, and fusing the two through a feature map fusion module to obtain a fusion feature map; training the fusion characteristic diagram through a repeated iteration minimization loss function to simultaneously classify the defects and carry out regression tasks on the defect positions, and continuously optimizing network parameters to obtain a training model; and detecting the input image through a training model, eliminating redundant defect detection frames by adopting an NMS algorithm, and selecting the frame with the highest confidence coefficient as a detection result. The invention has the advantages that the human eye vision attention selection mechanism is introduced into the surface defect detection, and the detection accuracy of the micro defect and the low-contrast defect is improved.
Description
Technical Field
The invention relates to the technical field of computer vision, in particular to a defect detection method based on a visual attention mechanism.
Background
In the traditional research, for the tiny defects and the low-contrast defects in the defect images of the products with the complex backgrounds, the detection accuracy of the tiny defects and the low-contrast defects is influenced due to the fact that the defect targets are small and the interference of the complex backgrounds on defect feature learning is caused.
Disclosure of Invention
The invention aims to provide a defect detection method based on a visual attention mechanism, which is used for solving the problem of low detection accuracy of tiny defects and low-contrast defects;
in order to achieve the purpose, the invention adopts the technical scheme that:
a defect detection method based on a visual attention mechanism comprises the following steps:
s1, acquiring a defect image and acquiring a saliency mask image of the defect image through the defect image;
s2, inputting the defect image and the significance mask image of the defect image into the twin network;
s3, generating a multi-scale convolution feature map and a multi-scale defect significance convolution feature map through a twin network;
s4, fusing the multi-scale convolution feature map and the multi-scale defect significance convolution feature map through a feature map fusion module to obtain a fusion feature map;
s5, training the defect classification and defect position regression tasks simultaneously by the fusion feature map through multiple iteration minimization loss functions, and continuously optimizing network parameters to obtain a training model;
and S6, detecting the input image through the training model, eliminating redundant defect detection frames by adopting an NMS algorithm, and selecting the frame with the highest confidence coefficient as a detection result.
Further, the specific step of step S3 is:
s31, inputting the defect image into a feature extraction sub-network of the twin network, and generating a multi-scale convolution feature map through a plurality of convolution layers;
and S32, inputting the saliency mask image of the defect image into a saliency learning subnetwork of the twin network, and generating a multi-scale defect saliency convolution feature image through a plurality of convolution layers.
Compared with the prior art, the invention at least comprises the following beneficial effects:
the human eye vision selection attention mechanism is introduced into surface defect detection, and the vision attention mechanism is added on the basis of a defect detection framework based on the regional convolutional neural network, so that the vision attention mechanism can highlight a significant signal and filter redundant information, a disordered background is restrained, a defect target region is determined, and the detection accuracy of tiny defects and low-contrast defects is improved.
Drawings
FIG. 1 is a schematic overview of an embodiment of the present invention;
Detailed Description
The following are specific embodiments of the present invention, and the technical solutions of the present invention are further described with reference to the drawings, but the present invention is not limited to these embodiments.
As shown in FIG. 1, the invention relates to a defect detection method based on a visual attention mechanism, which comprises the following steps:
s1, acquiring a defect image and acquiring a saliency mask image of the defect image through the defect image;
s2, inputting the defect image and the significance mask image of the defect image into the twin network;
s3, generating a multi-scale convolution characteristic diagram and a multi-scale defect significance convolution characteristic diagram through a twin network;
s4, fusing the multi-scale convolution feature map and the multi-scale defect significance convolution feature map through a feature map fusion module to obtain a fusion feature map;
s5, training the defect classification and defect position regression tasks simultaneously by the fusion feature map through multiple iteration minimization loss functions, and continuously optimizing network parameters to obtain a training model;
and S6, detecting the input image through the training model, eliminating redundant defect detection frames by adopting an NMS algorithm, and selecting the frame with the highest confidence coefficient as a detection result.
Further, the specific step of step S3 is:
s31, inputting the defect image into a feature extraction sub-network of the twin network, and generating a multi-scale convolution feature map through a plurality of convolution layers;
and S32, inputting the saliency mask image of the defect image into a saliency learning subnetwork of the twin network, and generating a multi-scale defect saliency convolution feature image through a plurality of convolution layers.
The invention introduces a human eye vision selection attention mechanism into surface defect detection, and increases the vision attention mechanism on the basis of a defect detection framework based on a regional convolution neural network, thereby improving the detection accuracy of tiny defects and low-contrast defects.
The specific embodiments described herein are merely illustrative of the spirit of the invention. Various modifications or additions may be made to the described embodiments or alternatives may be employed by those skilled in the art without departing from the spirit or ambit of the invention as defined in the appended claims.
Claims (2)
1. A defect detection method based on a visual attention mechanism is characterized by comprising the following steps:
s1, acquiring a defect image and acquiring a saliency mask image of the defect image through the defect image;
s2, inputting the defect image and the significance mask image of the defect image into the twin network;
s3, generating a multi-scale convolution feature map and a multi-scale defect significance convolution feature map through a twin network;
s4, fusing the multi-scale convolution feature map and the multi-scale defect significance convolution feature map through a feature map fusion module to obtain a fusion feature map;
s5, training the defect classification and defect position regression tasks simultaneously by the fusion feature map through multiple iteration minimization loss functions, and continuously optimizing network parameters to obtain a training model;
and S6, detecting the input image through the training model, eliminating redundant defect detection frames by adopting an NMS algorithm, and selecting the frame with the highest confidence coefficient as a detection result.
2. The visual attention mechanism-based defect detection method as claimed in claim 1, wherein the step S3 includes the following steps:
s31, inputting the defect image into a feature extraction sub-network of the twin network, and generating a multi-scale convolution feature map through a plurality of convolution layers;
and S32, inputting the saliency mask image of the defect image into a saliency learning subnetwork of the twin network, and generating a multi-scale defect saliency convolution feature image through a plurality of convolution layers.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202011393155.8A CN114648647A (en) | 2020-12-02 | 2020-12-02 | Defect detection method based on visual attention mechanism |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202011393155.8A CN114648647A (en) | 2020-12-02 | 2020-12-02 | Defect detection method based on visual attention mechanism |
Publications (1)
Publication Number | Publication Date |
---|---|
CN114648647A true CN114648647A (en) | 2022-06-21 |
Family
ID=81989641
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202011393155.8A Withdrawn CN114648647A (en) | 2020-12-02 | 2020-12-02 | Defect detection method based on visual attention mechanism |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN114648647A (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN116626052A (en) * | 2023-07-19 | 2023-08-22 | 北京阿丘机器人科技有限公司 | Battery cover plate surface detection method, device, equipment and storage medium |
-
2020
- 2020-12-02 CN CN202011393155.8A patent/CN114648647A/en not_active Withdrawn
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN116626052A (en) * | 2023-07-19 | 2023-08-22 | 北京阿丘机器人科技有限公司 | Battery cover plate surface detection method, device, equipment and storage medium |
CN116626052B (en) * | 2023-07-19 | 2023-10-17 | 北京阿丘机器人科技有限公司 | Battery cover plate surface detection method, device, equipment and storage medium |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN111563446B (en) | Human-machine interaction safety early warning and control method based on digital twin | |
CN109614922B (en) | Dynamic and static gesture recognition method and system | |
CN106971152B (en) | Method for detecting bird nest in power transmission line based on aerial images | |
CN106845487B (en) | End-to-end license plate identification method | |
KR20190063839A (en) | Method and System for Machine Vision based Quality Inspection using Deep Learning in Manufacturing Process | |
CN108334881B (en) | License plate recognition method based on deep learning | |
CN113205063A (en) | Visual identification and positioning method for defects of power transmission conductor | |
CN108320306B (en) | Video target tracking method fusing TLD and KCF | |
CN111611905A (en) | Visible light and infrared fused target identification method | |
CN107133969A (en) | A kind of mobile platform moving target detecting method based on background back projection | |
CN111160407A (en) | Deep learning target detection method and system | |
CN110796018A (en) | Hand motion recognition method based on depth image and color image | |
CN110852190A (en) | Driving behavior recognition method and system integrating target detection and gesture recognition | |
CN110046544A (en) | Digital gesture identification method based on convolutional neural networks | |
CN113344967B (en) | Dynamic target identification tracking method under complex background | |
CN108921003A (en) | Unmanned plane obstacle detection method based on convolutional neural networks and morphological image | |
CN109685030A (en) | A kind of mug rim of a cup defects detection classification method based on convolutional neural networks | |
CN117011381A (en) | Real-time surgical instrument pose estimation method and system based on deep learning and stereoscopic vision | |
CN111260609A (en) | Cigarette appearance defect detection method based on deep learning | |
CN116883763A (en) | Deep learning-based automobile part defect detection method and system | |
CN114648647A (en) | Defect detection method based on visual attention mechanism | |
CN114037684B (en) | Defect detection method based on yolov and attention mechanism model | |
García-Aguilar et al. | Optimized instance segmentation by super-resolution and maximal clique generation | |
CN116523916B (en) | Product surface defect detection method and device, electronic equipment and storage medium | |
CN114219763A (en) | Infrared picture detection method for abnormal heating point of power distribution equipment based on fast RCNN algorithm |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
WW01 | Invention patent application withdrawn after publication |
Application publication date: 20220621 |
|
WW01 | Invention patent application withdrawn after publication |