CN115170804A - Surface defect detection method, device, system and medium based on deep learning - Google Patents

Surface defect detection method, device, system and medium based on deep learning Download PDF

Info

Publication number
CN115170804A
CN115170804A CN202210885199.5A CN202210885199A CN115170804A CN 115170804 A CN115170804 A CN 115170804A CN 202210885199 A CN202210885199 A CN 202210885199A CN 115170804 A CN115170804 A CN 115170804A
Authority
CN
China
Prior art keywords
image
information
detection
defect
deep learning
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
CN202210885199.5A
Other languages
Chinese (zh)
Other versions
CN115170804B (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.)
Wuxi Jiuxiao Technology Co ltd
Original Assignee
Wuxi Jiuxiao Technology Co ltd
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 Wuxi Jiuxiao Technology Co ltd filed Critical Wuxi Jiuxiao Technology Co ltd
Priority to CN202210885199.5A priority Critical patent/CN115170804B/en
Publication of CN115170804A publication Critical patent/CN115170804A/en
Application granted granted Critical
Publication of CN115170804B publication Critical patent/CN115170804B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/20Image preprocessing
    • G06V10/26Segmentation of patterns in the image field; Cutting or merging of image elements to establish the pattern region, e.g. clustering-based techniques; Detection of occlusion
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/08Learning methods
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR 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; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/60Analysis of geometric attributes
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/20Image preprocessing
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/20Image preprocessing
    • G06V10/30Noise filtering
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/70Arrangements for image or video recognition or understanding using pattern recognition or machine learning
    • G06V10/764Arrangements for image or video recognition or understanding using pattern recognition or machine learning using classification, e.g. of video objects
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/70Arrangements for image or video recognition or understanding using pattern recognition or machine learning
    • G06V10/77Processing image or video features in feature spaces; using data integration or data reduction, e.g. principal component analysis [PCA] or independent component analysis [ICA] or self-organising maps [SOM]; Blind source separation
    • G06V10/7715Feature extraction, e.g. by transforming the feature space, e.g. multi-dimensional scaling [MDS]; Mappings, e.g. subspace methods
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/70Arrangements for image or video recognition or understanding using pattern recognition or machine learning
    • G06V10/82Arrangements for image or video recognition or understanding using pattern recognition or machine learning using neural networks
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR 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; CALCULATING OR 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; CALCULATING OR 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; CALCULATING OR 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/30164Workpiece; Machine component

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Multimedia (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Evolutionary Computation (AREA)
  • Health & Medical Sciences (AREA)
  • Artificial Intelligence (AREA)
  • Computing Systems (AREA)
  • Software Systems (AREA)
  • General Health & Medical Sciences (AREA)
  • Medical Informatics (AREA)
  • Databases & Information Systems (AREA)
  • Data Mining & Analysis (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Biomedical Technology (AREA)
  • Biophysics (AREA)
  • Computational Linguistics (AREA)
  • Quality & Reliability (AREA)
  • Molecular Biology (AREA)
  • General Engineering & Computer Science (AREA)
  • Mathematical Physics (AREA)
  • Geometry (AREA)
  • Image Analysis (AREA)
  • Image Processing (AREA)
  • Investigating Materials By The Use Of Optical Means Adapted For Particular Applications (AREA)

Abstract

The invention discloses a surface defect detection method, a device, a system and a medium based on deep learning, which comprises the following steps: acquiring a multi-angle light image of a detection component and a two-dimensional image of the detection component under conventional illumination; calculating the multi-angle light image by using a photometric stereo method to obtain surface topography information of the real-time detection part; stacking the surface topography information on a two-dimensional image of a detection part to obtain an image to be detected; and utilizing the defect information in the image to be tested of the improved RCF model. The invention utilizes a photometric stereo method to enhance the topography information of the surface to be detected, stacks the height information and the curvature information into a two-dimensional image under normal exposure according to a channel to form an image to be detected, then utilizes an improved RCF model to identify the defect information in the image, combines the surface topography information calculated by the photometric stereo method with the traditional image information, enhances the detection capability of three-dimensional defects such as scratches, bulges and the like, and reduces the adverse effect of complex background interference and surface texture on defect detection.

Description

Surface defect detection method, device, system and medium based on deep learning
Technical Field
The invention relates to the technical field of visual inspection, in particular to a surface defect detection method, device, system and medium based on deep learning.
Background
The rotor is an important component of the engine phase adjuster and is typically manufactured by a powder metallurgy process. During the powder forming and sintering process, defects such as unfilled corners, scratches and deformation are caused by problems such as material peeling and adhesion, and the defects affect the overall performance and service life of the rotor and thus the engine. The high-exposure image can form better discrimination between the edge profile and the background, is favorable for detecting the edge defects such as gouges and the like, but has an inhibiting effect on surface defects, particularly unobvious small-size defects, and is easy to cause missed detection; the image detail information collected under normal exposure is rich, the missing detection risk is small, but the contrast ratio of the defect and the normal area is low, the detection difficulty caused by surface texture and processing marks is large, and the false detection is easy. Therefore, higher demands are made on the surface defect detection technology of the engine rotor.
With the development of computer vision technology, the research and application range of machine vision systems is continuously expanded, and the surface quality detection of products based on machine vision is paid more and more attention in intelligent manufacturing. However, in the detection of the rotor surface defect, under the influence of metal texture and processing traces, the conventional detection methods based on characteristics such as color, brightness, gradient, etc., such as Sobel operator using image gradient information and widely used Canny operator, image segmentation method based on threshold and region, SCG (spark Code Gradients) method based on artificially designed characteristics, etc., cannot be well applied to the weak contrast image acquired under the normal exposure condition, and the detected region has the problems of mixing of target defect and a large amount of pseudo defect and incomplete detection of defect region.
Disclosure of Invention
The invention aims to overcome the technical defects, provides a surface defect detection method, a device, a system and a medium based on deep learning, and solves the technical problems that in the prior art, the method cannot be well suitable for a weak-contrast image acquired under a normal exposure condition, target defects and a large number of pseudo defects are mixed in a detected region, and the detection of the defect region is incomplete.
In order to achieve the above technical objective, a first aspect of the present invention provides a surface defect detection method based on deep learning, including the following steps:
acquiring a multi-angle light image of a detection component and a two-dimensional image of the detection component under conventional illumination;
calculating the multi-angle light image by using a photometric stereo method to obtain surface topography information of the real-time detection part;
stacking the surface topography information on the two-dimensional image of the detection part to obtain an image to be detected;
and utilizing the improved RCF model to obtain the defect information in the image to be tested.
Compared with the prior art, the invention has the beneficial effects that:
the method utilizes a photometric stereo method to enhance the topography information of the surface to be detected, stacks the height information and the curvature information into a two-dimensional image under normal exposure according to a channel to form an image to be detected, then utilizes an improved RCF model to identify the defect information in the image, combines the surface topography information calculated by the photometric stereo method with the traditional image information, enhances the detection capability of three-dimensional defects such as scratches and bulges, and reduces the adverse effect of complex background interference and surface texture on defect detection; the idea of layer jump connection used by the RCF model and the convolutional neural network structure in the attention module optimization model are improved, the specific type and the specific area of the defect are distinguished, and the defect detection precision is improved.
According to some embodiments of the invention, the surface topography information comprises: height map, curvature map, and reflectivity.
According to some embodiments of the present invention, the method for detecting defects in the image under test by using the improved RCF model comprises the following steps:
dividing the improved RCF model into five intermediate stages by taking a pooling layer as a boundary, and extracting a multi-scale and multi-level feature map by using the intermediate stages;
restoring the feature maps of different intermediate stages to the same size as the image to be detected from different scales;
stacking and combining the first intermediate stage side output feature graph and feature graphs sampled at the four subsequent intermediate stages, eliminating aliasing phenomena by using convolution, and reducing dimensions of convolution features to finally form 5 side outputs;
and stacking the 5 side outputs to form global information, weighting the feature maps of different intermediate stages integrally to form channel attention, weighting different areas in the feature maps to form space attention, and fusing the feature maps of different intermediate stages to output a final segmentation image.
According to some embodiments of the invention, after fusing the features of the different intermediate stages to output a final segmented image, the method comprises the steps of:
and outputting the final segmentation image into an independent model suitable for outputting multi-class information, segmenting the final segmentation image into different defect areas, and identifying the defect types of the defect areas.
According to some embodiments of the invention, after acquiring the multi-angle light image of the detection component and the two-dimensional image of the detection component under normal illumination, the method comprises the steps of:
and carrying out filtering noise reduction processing and image enhancement processing on the multi-angle light image of the detection component and the two-dimensional image of the detection component under conventional illumination.
According to some embodiments of the present invention, calculating the multi-angle light image by using a photometric stereo method to obtain surface topography information of a real-time detection component comprises the steps of:
and carrying out surface normal vector calculation processing on the multi-angle light image of the detection component to obtain a height image and a curvature image.
In a second aspect, an aspect of the present invention provides a surface defect detection apparatus based on deep learning, including:
the image acquisition module is used for acquiring a multi-angle light image of the detection component and a two-dimensional image of the detection component under conventional illumination;
the luminosity three-dimensional module is used for calculating the multi-angle light image by utilizing a luminosity three-dimensional method to obtain the surface appearance information of the real-time detection component;
the image fusion module is used for stacking the surface morphology information on the two-dimensional image of the detection component to obtain an image to be detected;
and the deep learning module is used for improving the defect information in the image to be detected by the RCF model.
According to some embodiments of the invention, the deep learning based surface defect detecting apparatus further comprises:
the preprocessing module is in communication connection with the image acquisition module and is used for filtering and denoising the multi-angle light image of the detection component and the two-dimensional image of the detection component under conventional illumination and enhancing the image.
In a third aspect, a technical solution of the present invention provides a surface defect detection system based on deep learning, including: a memory, a processor and a computer program stored on the memory and executable on the processor, the processor implementing the method for detecting surface defects based on deep learning according to any one of the first aspect when executing the computer program.
In a fourth aspect, the present invention provides a computer-readable storage medium, in which computer-executable instructions are stored, and the computer-executable instructions are configured to enable a computer to execute the surface defect detection method based on deep learning according to any one of the first aspect.
Additional aspects and advantages of the invention will be set forth in part in the description which follows and, in part, will be obvious from the description, or may be learned by practice of the invention.
Drawings
The above and/or additional aspects and advantages of the present invention will become apparent and readily appreciated from the following description of the embodiments, taken in conjunction with the accompanying drawings of which the abstract is intended to be fully consistent with one of the figures in which:
FIG. 1 is a flowchart of a surface defect detection method based on deep learning according to an embodiment of the present invention;
FIG. 2 is a diagram of an acquisition of a surface defect detection method based on deep learning according to another embodiment of the present invention;
FIG. 3 is a photometric stereo calculated surface topography information map of a deep learning based surface defect detection method according to another embodiment of the present invention;
FIG. 4 is a block diagram of an improved RCF model of a deep learning-based surface defect detection method according to another embodiment of the present invention;
FIG. 5 is a comparison graph of RCF model side output of a deep learning-based surface defect detection method according to another embodiment of the present invention;
FIG. 6 is a comparison graph of the final output of the RCF model of the deep learning-based surface defect detection method according to another embodiment of the present invention;
FIG. 7 is a partial sample of a constructed data set and a visual label chart thereof for a deep learning-based surface defect detection method according to another embodiment of the present invention;
fig. 8 is a comparison chart of defect detection results of multiple methods of the deep learning-based surface defect detection method according to another embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the present invention is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
It should be noted that although functional block divisions are provided in the system drawings and logical orders are shown in the flowcharts, in some cases, the steps shown and described may be performed in different orders than the block divisions in the systems or in the flowcharts. The terms first, second and the like in the description and in the claims, and the drawings described above, are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order.
The RCF model (semantic segmentation model) can well distinguish image textures, shadows and other interferences and effective target contours, and has good potential in weak-contrast defect detection. The feature layering thought adopted in the RCF model ensures that the model can fully carry out multi-scale and multi-level feature learning in the training process, but for a deep convolutional neural network, error of accurate size and position information is increased and fine scale features are lost due to deconvolution after downsampling of a plurality of pooling layers. This results in the problems of inaccurate defect boundary information, simultaneous extraction of defect and interference information, etc. when the RCF model is used to detect the rotor surface defects.
The invention provides a surface defect detection method based on deep learning, which is characterized in that a photometric stereo method is used for enhancing the appearance information of a surface to be detected, height information and curvature information are stacked into a two-dimensional image under normal exposure according to a channel to form an image to be detected, an improved RCF (Radar Cross-correlation) model is used for identifying the defect information in the image, the surface appearance information calculated by the photometric stereo method is combined with the traditional image information, the detection capability of three-dimensional defects such as scratches and bulges is enhanced, and the adverse effect of complex background interference and surface textures on defect detection is reduced.
The embodiments of the present invention will be further explained with reference to the drawings.
Referring to fig. 1, fig. 1 is a flowchart of a surface defect detection method based on deep learning according to an embodiment of the present invention; the surface defect detection method based on deep learning includes, but is not limited to, the following steps:
step S110, acquiring multi-angle light images of the detection component and two-dimensional images of the detection component under conventional illumination;
step S120, calculating the multi-angle light image by using a photometric stereo method to obtain surface topography information of the real-time detection component;
s130, stacking the surface topography information on the two-dimensional image of the detection part to obtain an image to be detected;
and step S140, utilizing the defect information in the image to be tested of the improved RCF model.
In one embodiment, the surface defect detection method based on deep learning comprises the following steps: acquiring a multi-angle light image of a detection component and a two-dimensional image of the detection component under conventional illumination; calculating the multi-angle light image by using a photometric stereo method to obtain surface topography information of the real-time detection component; stacking the surface topography information on a two-dimensional image of a detection part to obtain an image to be detected; and utilizing the defect information in the image to be tested of the improved RCF model.
Referring to fig. 2 to 8, fig. 2 is a diagram illustrating an acquisition of a surface defect detection method based on deep learning according to another embodiment of the present invention; FIG. 3 is a chart of surface topography information computed photometrically based on a deep learning surface defect inspection method according to another embodiment of the present invention; FIG. 4 is a block diagram of an improved RCF model of a deep learning-based surface defect detection method according to another embodiment of the present invention; FIG. 5 is a comparison graph of RCF model side output of a deep learning-based surface defect detection method according to another embodiment of the present invention; FIG. 6 is a comparison graph of the final output of the RCF model of the deep learning-based surface defect detection method according to another embodiment of the present invention; FIG. 7 is a partial sample of a constructed data set and a visual label chart thereof for a deep learning-based surface defect detection method according to another embodiment of the present invention; fig. 8 is a comparison chart of defect detection results of multiple methods of the deep learning-based surface defect detection method according to another embodiment of the present invention.
In one embodiment, the surface defect detection method based on deep learning includes the steps of: acquiring a multi-angle light image of a detection component and a two-dimensional image of the detection component under conventional illumination; calculating the multi-angle light image by using a photometric stereo method to obtain surface topography information of the real-time detection part; stacking the surface topography information on the two-dimensional image of the detection part to obtain an image to be detected; and utilizing the defect information in the image to be tested of the improved RCF model.
The invention utilizes a photometric stereo method to enhance the appearance information of a surface to be detected, stacks height information and curvature information into a two-dimensional image under normal exposure according to a channel to form an image to be detected, and then utilizes an improved RCF model to identify defect information in the image, and the method comprises the following steps:
acquiring a two-dimensional image under normal illumination and an image required by photometric stereo calculation;
calculating the surface appearance information of the object to be measured by using a photometric stereo method;
stacking surface appearance information such as height, reflectivity and curvature with a two-dimensional image under normal illumination
Extracting defect information in an image to be detected by adopting a surface defect detection method based on an improved RCF model, wherein the method comprises the following steps:
step1, using the convolution and pooling parts of the VGG16 model as a backbone network of an improved model, dividing five intermediate stages by taking a pooling layer as a boundary, and extracting multi-scale and multi-level characteristic information from the intermediate stages respectively;
step2, fusing the characteristics by using matrix addition and convolution in the phases, up-sampling the characteristic diagram, and recovering the characteristic diagrams of different intermediate phases to the same size as the input image from different scales;
step3, stacking and combining the first-stage side output characteristic graph and the characteristic graphs sampled at the four subsequent stages, eliminating aliasing phenomena by using convolution and reducing dimensions of the convolution characteristics to finally form 5 side outputs;
and step4, stacking the five side outputs, weighting the side outputs of all the intermediate stages by using a CBAM (Convolitional Block Attention Module) Attention Module to assist the formation of a final output, weighting the feature maps of different stages integrally according to global information formed by stacking the intermediate stages to form channel Attention, weighting different areas in the feature maps to form space Attention, and fusing the features of different intermediate stages to output a final segmentation image.
And step5, finally outputting the channel dimensional index to be an independent heat mode more suitable for outputting multi-class information, wherein the channel dimensional index where the maximum value is located represents the background or defect class.
In the training process, the difference between the output value and the actual value marked manually is calculated by using the multi-classification cross entropy as a loss function, the loss values of the accumulated background and each channel are used as the total loss and are propagated reversely, so that the total loss function can be written as:
Figure BDA0003765455440000071
wherein S represents the number of model-side outputs and final outputs (S =6 herein); i represents the number of pixels per image; k denotes the number of defect classes (K =4 herein), bg denotes a non-defect class; l (X) i Y) represents the loss value of the output image, and its calculation function can be expressed as:
Figure BDA0003765455440000072
Figure BDA0003765455440000081
wherein, | Y + I and Y - L respectively represents the target pixel number and the non-target pixel number in the true value image; λ is used as a hyper-parameter to balance the problem of unbalanced proportion of a target defect region relative to a non-target region in a training image; mu.s 1 、μ 2 The method is a hyper-parameter used for relieving the problem of sudden drop of loss value when a training sample is a background or no target area exists in an image.
In the test process, an end face image of the rotor is collected and processed, and a defect area data set is manufactured in combination with a manual labeling mode. In consideration of the problems of training efficiency and video memory limitation, the image is further clipped into a subset with the size of 320 × 320 pixels, and 3781 pairs of samples are finally obtained. 488 pairs of samples are randomly selected to form a test set, and the rest 3293 pairs of samples form a training and verification set. The richness of the training set data has great influence on the training effect of the model, and in order to ensure the training effect, the training process further adopts the modes of central rotation, mirror image turning and the like to perform data augmentation processing on the training sample.
The backbone network in the model herein is initialized with VGG16 model parameters pre-trained on ImageNet to reduce the risk of overfitting and improve training efficiency.
Initialization is completed for the newly added convolutional layer using a normal distribution with a mean of 0 and a variance of 0.01.
Setting the batch processing size to be 10, setting the initial learning rate to be 1e-4, reducing the learning rate to be 0.5 after all training samples are trained for 10 rounds, setting the momentum optimization coefficient to be 0.9, setting the weight attenuation to be 2e-5, setting the hyper-parameter lambda in the loss function to be 0.2, 1.0, 0.7, 0.8 and mu according to different categories 1 And mu 2 Set to 0.05.
The test hardware mainly comprises one NVIDIA RTX 2070s and one AMD R5 3600, and all the tests are completed under the same equipment.
And selecting a model for stable convergence after multiple rounds of iterative training for effect testing and evaluation. Taking the pixel accuracy (Pa) and the intersection ratio (Iou) as evaluation indexes, wherein the pixel accuracy represents the proportion of the real number of defective pixels in the output result of the model in the total number of pixels; the intersection ratio represents the ratio of the number of true defective pixels in the output result of the model in the number of output pixels, and the calculation formula can be expressed as follows:
Figure BDA0003765455440000082
Figure BDA0003765455440000083
where K is the number of identified categories, tp is the number of defective pixels correctly extracted and detected, tn is the number of non-target defective pixels correctly extracted and detected, total represents the Total number of defective pixels, fp is the number of defective pixels erroneously detected, and Fn is the number of defective pixels not extracted and detected.
The methods herein were compared to other related methods as shown in table 1. Compared with an adaptive threshold segmentation method, the semantic segmentation model based on deep learning is greatly improved in the aspect of effect of extracting the defect region, and the RCF and the text model are twice ahead of the traditional algorithm in the aspect of pixel accuracy. The output result of the deep learning model can better segment the defect region and can also distinguish the defect type, thereby providing more basis for screening and judging the subsequent defects.
TABLE 1 comparison of the results of the measurements of the rotor surface defects by different methods
Figure BDA0003765455440000091
Although the pixel accuracy rate of the FCN model and the OCRNet model is slightly higher, the detection capability of the FCN model and the OCRNet model on the black spots and the gouges is weak, and the intersection ratio of the black spots and the gouges is lower than 60%. The effectiveness of the UNet + + model is improved compared with the FCN model, but the detection effect is still not ideal enough. The RCF model integrates multi-scale and multi-level characteristics and uses side output to assist model training, detection capability is improved in detection of black spots and collisions, and pixel accuracy reaches 93%. The model has higher pixel accuracy than an RCF model, the intersection ratio of various defects is improved by about 1 to 7 percentage points, and a better detection effect is obtained. In terms of execution efficiency, the optimized model constructed in the method is more complex in network structure and slightly increased in the number of parameters compared with the original model, the execution speed is reduced, and the efficient processing of about 32 images per second can be realized.
As shown in fig. 8, the detection result of the defective region by the different method is that the adaptive threshold segmentation method can approximately segment the defective region, but has problems such as incomplete segmentation of the defective region and mixing of the non-defective region and the defective region. The traditional method is greatly influenced by a workpiece manufacturing process, a large number of false detections are easily caused on the insufficiently polished surface, and the problem of discontinuity of a slender scratch defect extraction area exists, so that frequent false judgments and missed detections are easily formed in subsequent judgments. The FCN model is more prone to outputting a block area, accuracy is not high on defects with small sizes, and missing detection and false detection exist on the defects such as black spots and small gouges which are distributed in a scattered manner. The UNet + + model has a serious over-detection problem, more normal surface regions are wrongly segmented, and the segmented regions are relatively thick. The OCRNet model has the defects of missing detection of gouges and scratches and has weak detection and identification capability of black spot defects. Compared with the RCF model, the output result of the model is more complete and fine, the morphology of the target region is more similar to the region morphology in the true value image, the defect region is more accurate, and even the fine defects which are not marked in the true value image can be extracted.
In one embodiment, the surface defect detection method based on deep learning includes the steps of: acquiring a multi-angle light image of a detection component and a two-dimensional image of the detection component under conventional illumination; calculating the multi-angle light image by using a photometric stereo method to obtain surface topography information of the real-time detection component; stacking the surface topography information on the two-dimensional image of the detection part to obtain an image to be detected; and utilizing the defect information in the image to be tested of the improved RCF model. The surface topography information includes: height map, curvature map, and reflectivity.
In one embodiment, the surface defect detection method based on deep learning comprises the following steps: acquiring a multi-angle light image of a detection component and a two-dimensional image of the detection component under conventional illumination; calculating the multi-angle light image by using a photometric stereo method to obtain surface topography information of the real-time detection part; stacking the surface topography information on the two-dimensional image of the detection part to obtain an image to be detected; and utilizing the defect information in the image to be tested of the improved RCF model.
The method for utilizing the defect information in the image to be tested of the improved RCF model comprises the following steps: dividing the improved RCF model into five intermediate stages by taking the pooling layer as a boundary, and extracting a multi-scale and multi-level characteristic diagram by using the intermediate stages; restoring the feature maps of different intermediate stages to the same size as the image to be detected from different scales; stacking and combining the side output feature map of the first intermediate stage and the feature maps sampled at the four subsequent intermediate stages, eliminating aliasing phenomena by using convolution and reducing dimensions of the convolution features to finally form 5 side outputs; and stacking the 5 side outputs to form global information, weighting the feature maps of different intermediate stages integrally to form channel attention, weighting different areas in the feature maps to form space attention, and fusing the features of different intermediate stages to output a final segmentation image.
In one embodiment, the surface defect detection method based on deep learning includes the steps of: acquiring a multi-angle light image of a detection component and a two-dimensional image of the detection component under conventional illumination; calculating the multi-angle light image by using a photometric stereo method to obtain surface topography information of the real-time detection part; stacking the surface topography information on the two-dimensional image of the detection part to obtain an image to be detected; and utilizing the defect information in the image to be tested of the improved RCF model.
The method for utilizing the defect information in the image to be tested of the improved RCF model comprises the following steps: dividing the improved RCF model into five intermediate stages by taking the pooling layer as a boundary, and extracting a multi-scale and multi-level characteristic diagram by using the intermediate stages; restoring the feature maps of different intermediate stages to the same size as the image to be detected from different scales; stacking and combining the side output feature graph of the first intermediate stage and the feature graphs sampled at the four subsequent intermediate stages, eliminating aliasing phenomena by using convolution, and reducing the dimension of the convolution features to finally form 5 side outputs; and stacking the 5 side outputs to form global information, weighting the feature maps of different intermediate stages integrally to form channel attention, weighting different areas in the feature maps to form space attention, and fusing the features of different intermediate stages to output a final segmentation image. After fusing features of different intermediate stages to output a final segmentation image, comprising the steps of: and outputting the final segmentation image into an independent model suitable for outputting multi-class information, segmenting the final segmentation image into different defect areas, and identifying the defect types of the defect areas.
In one embodiment, the surface defect detection method based on deep learning includes the steps of: acquiring a multi-angle light image of a detection component and a two-dimensional image of the detection component under conventional illumination; calculating the multi-angle light image by using a photometric stereo method to obtain surface topography information of the real-time detection part; stacking the surface topography information on a two-dimensional image of a detection part to obtain an image to be detected; and utilizing the defect information in the image to be tested of the improved RCF model. After acquiring the multi-angle light image of the detection component and the two-dimensional image of the detection component under the conventional illumination, the method comprises the following steps: and carrying out filtering noise reduction processing and image enhancement processing on the multi-angle light image of the detection component and the two-dimensional image of the detection component under conventional illumination.
In one embodiment, the surface defect detection method based on deep learning includes the steps of: acquiring a multi-angle light image of a detection component and a two-dimensional image of the detection component under conventional illumination; calculating the multi-angle light image by using a photometric stereo method to obtain surface topography information of the real-time detection component; stacking the surface topography information on the two-dimensional image of the detection part to obtain an image to be detected; and utilizing the defect information in the image to be tested of the improved RCF model. After acquiring the multi-angle light image of the detection component and the two-dimensional image of the detection component under the conventional illumination, the method comprises the following steps: and carrying out filtering noise reduction processing and image enhancement processing on the multi-angle light image of the detection component and the two-dimensional image of the detection component under conventional illumination. The method for calculating the multi-angle light image by using the photometric stereo method to obtain the surface topography information of the real-time detection part comprises the following steps: and carrying out surface normal vector calculation processing on the multi-angle light image of the detection part to obtain a height image and a curvature image.
The invention also provides a surface defect detection device based on deep learning, which comprises: the image acquisition module is used for acquiring a multi-angle light image of the detection component and a two-dimensional image of the detection component under conventional illumination; the luminosity three-dimensional module is used for calculating the multi-angle light image by utilizing a luminosity three-dimensional method to obtain the surface appearance information of the real-time detection component; the image fusion module is used for stacking the surface topography information on the two-dimensional image of the detection part to obtain an image to be detected; and the deep learning module is used for improving the defect information in the image to be detected of the RCF model.
In one embodiment, a surface defect detecting apparatus based on deep learning includes: the image acquisition module is used for acquiring a multi-angle light image of the detection component and a two-dimensional image of the detection component under conventional illumination; the luminosity three-dimensional module is used for calculating the multi-angle light image by utilizing a luminosity three-dimensional method to obtain the surface appearance information of the real-time detection component; the image fusion module is used for stacking the surface topography information on the two-dimensional image of the detection part to obtain an image to be detected; the deep learning module is used for improving the defect information in the to-be-detected image of the RCF model; and the preprocessing module is in communication connection with the image acquisition module and is used for performing filtering and noise reduction processing and image enhancement processing on the multi-angle light image of the detection component and the two-dimensional image of the detection component under conventional illumination.
The invention also provides a surface defect detection system based on deep learning, which comprises: a memory, a processor and a computer program stored on the memory and executable on the processor, the processor implementing the method for detecting surface defects based on deep learning as described above when executing the computer program.
The processor and memory may be connected by a bus or other means.
The memory, as a non-transitory computer-readable storage medium, may be used to store non-transitory software programs as well as non-transitory computer-executable programs. Further, the memory may include high speed random access memory, and may also include non-transitory memory, such as at least one disk storage device, flash memory device, or other non-transitory solid state storage device. In some embodiments, the memory optionally includes memory located remotely from the processor, and these remote memories may be connected to the processor through a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
The above-described embodiments of the apparatus are merely illustrative, wherein the units illustrated as separate components may or may not be physically separate, i.e. may be located in one place, or may also be distributed over a plurality of network elements. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of the present embodiment.
Furthermore, an embodiment of the present invention further provides a computer-readable storage medium, which stores computer-executable instructions, which are executed by a processor or a controller, for example, by a processor in the terminal embodiment, and can make the processor execute the surface defect detection method based on deep learning in the above embodiment.
It will be understood by those of ordinary skill in the art that all or some of the steps, systems, and methods disclosed above may be implemented as software, firmware, hardware, or suitable combinations thereof. Some or all of the physical components may be implemented as software executed by a processor, such as a central processing unit, digital signal processor, or microprocessor, or as hardware, or as an integrated circuit, such as an application specific integrated circuit. Such software may be distributed on computer readable media, which may include computer storage media (or non-transitory media) and communication media (or transitory media). The term computer storage media includes volatile and nonvolatile, removable and non-removable media implemented in any method or technology for storage of information such as computer readable instructions, data structures, program modules or other data, as is well known to those of ordinary skill in the art. Computer storage media includes, but is not limited to, RAM, ROM, EEPROM, flash memory or other memory technology, CD-ROM, digital Versatile Disks (DVD) or other optical disk storage, magnetic cassettes, magnetic tape, magnetic disk storage or other magnetic storage devices, or any other medium which can be used to store the desired information and which can accessed by a computer. In addition, communication media typically embodies computer readable instructions, data structures, program modules or other data in a modulated data signal such as a carrier wave or other transport mechanism and includes any information delivery media as known to those skilled in the art.
While the preferred embodiments of the present invention have been described in detail, it will be understood by those skilled in the art that the foregoing and various other changes, omissions and deviations in the form and detail thereof may be made without departing from the scope of this invention.
The above embodiments of the present invention should not be construed as limiting the scope of the present invention. Any other corresponding changes and modifications made according to the technical idea of the present invention should be included in the protection scope of the claims of the present invention.

Claims (10)

1. A surface defect detection method based on deep learning is characterized by comprising the following steps:
acquiring a multi-angle light image of a detection component and a two-dimensional image of the detection component under conventional illumination;
calculating the multi-angle light image by using a photometric stereo method to obtain surface topography information of the real-time detection component;
stacking the surface topography information on the two-dimensional image of the detection part to obtain an image to be detected;
and utilizing the improved RCF model to obtain the defect information in the image to be tested.
2. The method of claim 1, wherein the surface topography information comprises: height map, curvature map, and reflectivity.
3. The method for detecting surface defects based on deep learning of claim 1, wherein the defect information in the image to be detected by using the improved RCF model comprises the following steps:
dividing the improved RCF model into five intermediate stages by taking a pooling layer as a boundary, and extracting a multi-scale and multi-level feature map by using the intermediate stages;
restoring the feature maps of different intermediate stages to the same size as the image to be detected from different scales;
stacking and combining the first intermediate stage side output feature graph and feature graphs sampled at the four subsequent intermediate stages, eliminating aliasing phenomena by using convolution, and reducing dimensions of convolution features to finally form 5 side outputs;
and stacking the 5 side outputs to form global information, weighting the feature maps of different intermediate stages integrally to form channel attention, weighting different areas in the feature maps to form space attention, and fusing the feature maps of different intermediate stages to output a final segmentation image.
4. The method for detecting surface defects based on deep learning of claim 3, wherein after fusing features of different intermediate stages to output a final segmentation image, the method comprises the following steps:
and outputting the final segmentation image into an independent model suitable for outputting multi-class information, segmenting the final segmentation image into different defect areas, and identifying the defect types of the defect areas.
5. The surface defect detection method based on deep learning of claim 1, characterized in that after acquiring multi-angle light images of a detection part and two-dimensional images of the detection part under normal illumination, it comprises the steps of:
and carrying out filtering noise reduction processing and image enhancement processing on the multi-angle light image of the detection component and the two-dimensional image of the detection component under conventional illumination.
6. The method for detecting surface defects based on deep learning of claim 5, wherein the multi-angle light image is calculated by a photometric stereo method to obtain surface topography information of a real-time detection component, comprising the steps of:
and carrying out surface normal vector calculation processing on the multi-angle light image of the detection component to obtain a height image and a curvature image.
7. A surface defect detecting apparatus based on deep learning, comprising:
the image acquisition module is used for acquiring a multi-angle light image of the detection component and a two-dimensional image of the detection component under conventional illumination;
the photometric stereo module is used for calculating the multi-angle light image by utilizing a photometric stereo method to obtain the surface topography information of the real-time detection component;
the image fusion module is used for stacking the surface topography information on the two-dimensional image of the detection part to obtain an image to be detected;
and the deep learning module is used for improving the defect information in the image to be detected by the RCF model.
8. The apparatus of claim 7, further comprising:
the preprocessing module is in communication connection with the image acquisition module and is used for filtering and denoising the multi-angle light image of the detection component and the two-dimensional image of the detection component under conventional illumination and enhancing the image.
9. A deep learning based surface defect detection system, comprising: a memory, a processor and a computer program stored on the memory and executable on the processor, the processor implementing the deep learning based surface defect detection method according to any one of claims 1 to 6 when executing the computer program.
10. A computer-readable storage medium storing computer-executable instructions for causing a computer to perform the method for surface defect detection based on deep learning according to any one of claims 1 to 6.
CN202210885199.5A 2022-07-26 2022-07-26 Surface defect detection method, device, system and medium based on deep learning Active CN115170804B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210885199.5A CN115170804B (en) 2022-07-26 2022-07-26 Surface defect detection method, device, system and medium based on deep learning

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210885199.5A CN115170804B (en) 2022-07-26 2022-07-26 Surface defect detection method, device, system and medium based on deep learning

Publications (2)

Publication Number Publication Date
CN115170804A true CN115170804A (en) 2022-10-11
CN115170804B CN115170804B (en) 2024-01-26

Family

ID=83497793

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210885199.5A Active CN115170804B (en) 2022-07-26 2022-07-26 Surface defect detection method, device, system and medium based on deep learning

Country Status (1)

Country Link
CN (1) CN115170804B (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115619767A (en) * 2022-11-09 2023-01-17 南京云创大数据科技股份有限公司 Method and device for detecting surface defects of mirror-like workpiece based on multi-illumination condition
CN117409077A (en) * 2023-10-18 2024-01-16 无锡九霄科技有限公司 Chip attitude detection method based on multi-scale residual UNet segmentation

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102519391A (en) * 2011-12-28 2012-06-27 东南大学 Object surface three-dimensional image reconstruction method on basis of weak saturated two-dimensional images
CN111862092A (en) * 2020-08-05 2020-10-30 复旦大学 Express delivery outer package defect detection method and device based on deep learning
CN112345539A (en) * 2020-11-05 2021-02-09 菲特(天津)检测技术有限公司 Aluminum die casting surface defect detection method based on deep learning
CN112435248A (en) * 2020-11-30 2021-03-02 深圳市泰沃德技术有限公司 Defect detection method, defect detection device, control device and readable storage medium
CN112798617A (en) * 2021-01-28 2021-05-14 江苏骠马智能工业设计研究有限公司 Defect detection device and method for mirror-like object
CN113658155A (en) * 2021-08-24 2021-11-16 凌云光技术股份有限公司 Object surface flaw detection and analysis method and device based on photometric stereo
CN113870342A (en) * 2021-08-19 2021-12-31 广州超音速自动化科技股份有限公司 Appearance defect detection method, intelligent terminal and storage device
CN114119462A (en) * 2021-10-08 2022-03-01 厦门微亚智能科技有限公司 Deep learning-based blue film appearance detection algorithm for lithium battery cell aluminum shell
CN114119497A (en) * 2021-11-04 2022-03-01 武汉逸飞激光股份有限公司 Method and device for detecting sealing welding quality of cylindrical battery cell, electronic equipment and storage medium

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102519391A (en) * 2011-12-28 2012-06-27 东南大学 Object surface three-dimensional image reconstruction method on basis of weak saturated two-dimensional images
CN111862092A (en) * 2020-08-05 2020-10-30 复旦大学 Express delivery outer package defect detection method and device based on deep learning
CN112345539A (en) * 2020-11-05 2021-02-09 菲特(天津)检测技术有限公司 Aluminum die casting surface defect detection method based on deep learning
CN112435248A (en) * 2020-11-30 2021-03-02 深圳市泰沃德技术有限公司 Defect detection method, defect detection device, control device and readable storage medium
CN112798617A (en) * 2021-01-28 2021-05-14 江苏骠马智能工业设计研究有限公司 Defect detection device and method for mirror-like object
CN113870342A (en) * 2021-08-19 2021-12-31 广州超音速自动化科技股份有限公司 Appearance defect detection method, intelligent terminal and storage device
CN113658155A (en) * 2021-08-24 2021-11-16 凌云光技术股份有限公司 Object surface flaw detection and analysis method and device based on photometric stereo
CN114119462A (en) * 2021-10-08 2022-03-01 厦门微亚智能科技有限公司 Deep learning-based blue film appearance detection algorithm for lithium battery cell aluminum shell
CN114119497A (en) * 2021-11-04 2022-03-01 武汉逸飞激光股份有限公司 Method and device for detecting sealing welding quality of cylindrical battery cell, electronic equipment and storage medium

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
徐海青 等: ""基于注意力机制及滑窗检测的电网散断股识别算法"", 《能源与环保》, vol. 43, no. 8, pages 210 - 215 *
朱勇建 等: ""基于光度立体和级数展开法的金属表面缺陷检测方法"", 《广西师范大学学报(自然科学版)》, vol. 38, no. 6, pages 21 - 31 *

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115619767A (en) * 2022-11-09 2023-01-17 南京云创大数据科技股份有限公司 Method and device for detecting surface defects of mirror-like workpiece based on multi-illumination condition
CN115619767B (en) * 2022-11-09 2023-04-18 南京云创大数据科技股份有限公司 Method and device for detecting surface defects of mirror-like workpiece based on multi-illumination condition
CN117409077A (en) * 2023-10-18 2024-01-16 无锡九霄科技有限公司 Chip attitude detection method based on multi-scale residual UNet segmentation
CN117409077B (en) * 2023-10-18 2024-04-05 无锡九霄科技有限公司 Chip attitude detection method based on multi-scale residual UNet segmentation

Also Published As

Publication number Publication date
CN115170804B (en) 2024-01-26

Similar Documents

Publication Publication Date Title
CN115170576B (en) Aluminum pipe surface defect detection method based on machine vision
CN110349126B (en) Convolutional neural network-based marked steel plate surface defect detection method
CN110490914B (en) Image fusion method based on brightness self-adaption and significance detection
CN112348787B (en) Training method of object defect detection model, object defect detection method and device
CN115170804B (en) Surface defect detection method, device, system and medium based on deep learning
CN103593670B (en) A kind of copper plate/strip detection method of surface flaw based on online limit of sequence learning machine
CN111951253B (en) Method, device and readable storage medium for detecting surface defects of lithium battery
CN111160249A (en) Multi-class target detection method of optical remote sensing image based on cross-scale feature fusion
CN112233067A (en) Hot rolled steel coil end face quality detection method and system
CN106557740B (en) The recognition methods of oil depot target in a kind of remote sensing images
CN110415260B (en) Smoke image segmentation and identification method based on dictionary and BP neural network
CN111814852B (en) Image detection method, image detection device, electronic equipment and computer readable storage medium
CN111027546A (en) Character segmentation method and device and computer readable storage medium
CN111738114B (en) Vehicle target detection method based on anchor-free accurate sampling remote sensing image
CN110570442A (en) Contour detection method under complex background, terminal device and storage medium
CN111160100A (en) Lightweight depth model aerial photography vehicle detection method based on sample generation
CN118279304B (en) Abnormal recognition method, device and medium for special-shaped metal piece based on image processing
CN109978916B (en) Vibe moving target detection method based on gray level image feature matching
CN114596316A (en) Road image detail capturing method based on semantic segmentation
CN112288726A (en) Method for detecting foreign matters on belt surface of underground belt conveyor
CN115546127A (en) Engine lubricating oil abrasive particle image analysis method and device, medium and equipment
CN110458019B (en) Water surface target detection method for eliminating reflection interference under scarce cognitive sample condition
CN117994240A (en) Multi-scale two-level optical remote sensing image stripe noise intelligent detection method and device
CN113920421A (en) Fast-classification full convolution neural network model
CN111507177B (en) Identification method and device for metering turnover cabinet

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