CN113643228B - Nuclear power station equipment surface defect detection method based on improved CenterNet network - Google Patents
Nuclear power station equipment surface defect detection method based on improved CenterNet network Download PDFInfo
- Publication number
- CN113643228B CN113643228B CN202110575217.5A CN202110575217A CN113643228B CN 113643228 B CN113643228 B CN 113643228B CN 202110575217 A CN202110575217 A CN 202110575217A CN 113643228 B CN113643228 B CN 113643228B
- Authority
- CN
- China
- Prior art keywords
- detection
- loss function
- defect
- nuclear power
- network
- 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.)
- Active
Links
- 238000001514 detection method Methods 0.000 title claims abstract description 104
- 230000007547 defect Effects 0.000 title claims abstract description 85
- 238000012549 training Methods 0.000 claims abstract description 18
- 238000000605 extraction Methods 0.000 claims abstract description 9
- 238000007781 pre-processing Methods 0.000 claims abstract description 7
- 238000013528 artificial neural network Methods 0.000 claims abstract description 5
- 238000000034 method Methods 0.000 claims description 37
- 238000004364 calculation method Methods 0.000 claims description 9
- 238000012545 processing Methods 0.000 claims description 7
- 238000011176 pooling Methods 0.000 claims description 4
- 238000005520 cutting process Methods 0.000 claims description 3
- 230000002950 deficient Effects 0.000 claims description 2
- 230000006870 function Effects 0.000 description 38
- 230000009286 beneficial effect Effects 0.000 description 10
- 238000004422 calculation algorithm Methods 0.000 description 8
- 238000010586 diagram Methods 0.000 description 8
- 230000000694 effects Effects 0.000 description 6
- 238000012360 testing method Methods 0.000 description 6
- 238000004590 computer program Methods 0.000 description 5
- 238000013527 convolutional neural network Methods 0.000 description 5
- 238000002474 experimental method Methods 0.000 description 5
- 230000007797 corrosion Effects 0.000 description 4
- 238000005260 corrosion Methods 0.000 description 4
- 238000013461 design Methods 0.000 description 4
- 238000007689 inspection Methods 0.000 description 4
- 230000007246 mechanism Effects 0.000 description 4
- 230000002776 aggregation Effects 0.000 description 3
- 238000004220 aggregation Methods 0.000 description 3
- 230000008901 benefit Effects 0.000 description 3
- 230000008859 change Effects 0.000 description 3
- 238000013135 deep learning Methods 0.000 description 3
- 230000006872 improvement Effects 0.000 description 3
- 238000004519 manufacturing process Methods 0.000 description 3
- 229910052799 carbon Inorganic materials 0.000 description 2
- 238000002372 labelling Methods 0.000 description 2
- 238000010801 machine learning Methods 0.000 description 2
- 239000000463 material Substances 0.000 description 2
- 238000012986 modification Methods 0.000 description 2
- 230000004048 modification Effects 0.000 description 2
- 230000011218 segmentation Effects 0.000 description 2
- 238000012795 verification Methods 0.000 description 2
- 238000011179 visual inspection Methods 0.000 description 2
- KUBWJGWIWGGEPZ-UHFFFAOYSA-N 1-[amino(ethoxy)phosphoryl]oxy-4-nitrobenzene Chemical compound CCOP(N)(=O)OC1=CC=C([N+]([O-])=O)C=C1 KUBWJGWIWGGEPZ-UHFFFAOYSA-N 0.000 description 1
- PXFBZOLANLWPMH-UHFFFAOYSA-N 16-Epiaffinine Natural products C1C(C2=CC=CC=C2N2)=C2C(=O)CC2C(=CC)CN(C)C1C2CO PXFBZOLANLWPMH-UHFFFAOYSA-N 0.000 description 1
- 101100225890 Aplysia californica ENPP gene Proteins 0.000 description 1
- 238000012935 Averaging Methods 0.000 description 1
- OKTJSMMVPCPJKN-UHFFFAOYSA-N Carbon Chemical compound [C] OKTJSMMVPCPJKN-UHFFFAOYSA-N 0.000 description 1
- 238000013459 approach Methods 0.000 description 1
- 208000003464 asthenopia Diseases 0.000 description 1
- 230000000052 comparative effect Effects 0.000 description 1
- 230000006835 compression Effects 0.000 description 1
- 238000007906 compression Methods 0.000 description 1
- 238000001816 cooling Methods 0.000 description 1
- 238000005536 corrosion prevention Methods 0.000 description 1
- 238000005336 cracking Methods 0.000 description 1
- 230000007423 decrease Effects 0.000 description 1
- 238000011161 development Methods 0.000 description 1
- 230000018109 developmental process Effects 0.000 description 1
- 238000005187 foaming Methods 0.000 description 1
- 230000004927 fusion Effects 0.000 description 1
- 238000005286 illumination Methods 0.000 description 1
- 230000003993 interaction Effects 0.000 description 1
- 239000000203 mixture Substances 0.000 description 1
- 238000010248 power generation Methods 0.000 description 1
- 230000008569 process Effects 0.000 description 1
- 230000009467 reduction Effects 0.000 description 1
- 230000000246 remedial effect Effects 0.000 description 1
- 230000000717 retained effect Effects 0.000 description 1
- 239000013535 sea water Substances 0.000 description 1
- 229910001220 stainless steel Inorganic materials 0.000 description 1
- 239000010935 stainless steel Substances 0.000 description 1
- 239000000126 substance Substances 0.000 description 1
- 230000001629 suppression Effects 0.000 description 1
- 238000010998 test method Methods 0.000 description 1
- 230000009466 transformation Effects 0.000 description 1
- 230000000007 visual effect Effects 0.000 description 1
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/0002—Inspection of images, e.g. flaw detection
- G06T7/0004—Industrial image inspection
-
- 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
- G06N—COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06N3/00—Computing arrangements based on biological models
- G06N3/02—Neural networks
- G06N3/04—Architecture, e.g. interconnection topology
- G06N3/045—Combinations of networks
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06N—COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06N3/00—Computing arrangements based on biological models
- G06N3/02—Neural networks
- G06N3/08—Learning methods
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T2207/00—Indexing scheme for image analysis or image enhancement
- G06T2207/10—Image acquisition modality
- G06T2207/10004—Still image; Photographic image
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T2207/00—Indexing scheme for image analysis or image enhancement
- G06T2207/20—Special algorithmic details
- G06T2207/20081—Training; Learning
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T2207/00—Indexing scheme for image analysis or image enhancement
- G06T2207/20—Special algorithmic details
- G06T2207/20084—Artificial neural networks [ANN]
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T2207/00—Indexing scheme for image analysis or image enhancement
- G06T2207/30—Subject of image; Context of image processing
- G06T2207/30108—Industrial image inspection
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- Data Mining & Analysis (AREA)
- General Physics & Mathematics (AREA)
- Life Sciences & Earth Sciences (AREA)
- Artificial Intelligence (AREA)
- General Engineering & Computer Science (AREA)
- Evolutionary Computation (AREA)
- Computer Vision & Pattern Recognition (AREA)
- Computational Linguistics (AREA)
- Software Systems (AREA)
- Mathematical Physics (AREA)
- Health & Medical Sciences (AREA)
- Biomedical Technology (AREA)
- Biophysics (AREA)
- Computing Systems (AREA)
- General Health & Medical Sciences (AREA)
- Molecular Biology (AREA)
- Evolutionary Biology (AREA)
- Bioinformatics & Cheminformatics (AREA)
- Bioinformatics & Computational Biology (AREA)
- Quality & Reliability (AREA)
- Image Analysis (AREA)
- Monitoring And Testing Of Nuclear Reactors (AREA)
Abstract
The invention discloses a nuclear power station equipment surface defect detection method based on an improved CenterNet network, which comprises the steps of firstly, obtaining a nuclear power station equipment surface picture and preprocessing the picture; secondly, performing feature extraction on the preprocessed picture by using a DLAseg network to obtain a downsampled feature map, performing convolution operation on the downsampled feature map obtained by using a plurality of different convolution checks to obtain a heat map, offset values and sizes of defect points on the surface of equipment, converting the obtained heat map into a prediction frame, obtaining detection frames of a plurality of defect points according to the offset values and the sizes, and removing redundant detection frames by using soft_NMS and a confidence threshold value to obtain a prediction result of the defect of the equipment; finally, the obtained prediction result is input into a neural network for training to obtain a detection result of the equipment defect, and various super parameters related to an anchor point frame are not required to be adjusted in the scheme, so that the detection model is more concise, a large amount of priori knowledge is not required, the convergence speed is faster, and the time required for training the model is greatly saved.
Description
Technical Field
The invention relates to a nuclear power station equipment surface defect detection method based on an improved CenterNet network.
Background
Nuclear power plants refer to facilities that convert nuclear energy into electrical energy by suitable means, and nuclear power is a very clean and low-carbon source of energy, so nuclear power generation is a very important source of electrical energy. Considering a series of factors such as cooling, emission, regional economic development and the like comprehensively, a nuclear power station is generally built at sea, a very good environment is created for corrosion in a coastal high-salt and high-humidity severe environment, and nuclear power station equipment materials are contacted with high-temperature, high-pressure, high-heat-flow media, chemical media and seawater media, and meanwhile, the nuclear power station equipment materials are influenced by factors such as irradiation, stress and vibration, so that higher requirements are provided for corrosion prevention of the nuclear power station. Other various defects such as cracking, falling off, foaming and the like can occur on the surfaces of nuclear power plant equipment besides corrosion. In order to cope with the corrosion problem of the nuclear power plant equipment, when the nuclear power plant equipment is selected, in consideration of the irradiation resistance requirement, stainless steel or a carbon plate is generally selected as a main structure according to the importance degree of the equipment, but the corrosion and other conditions cannot be completely avoided in the mode. When defects on the surface of equipment are unavoidable, the defects can be timely found and different remedial measures can be taken for different defects. If the defects on the surface of the nuclear power plant equipment are not repaired in time, the service life of the equipment is seriously influenced, the production efficiency and quality are reduced, so that the defect problem on the surface of the nuclear power plant equipment is timely detected, and the method has important significance for guaranteeing the safe and stable operation of the nuclear power.
Today, a common method for detecting defects of nuclear power plant equipment is still manual visual detection, and experienced inspectors record the types and positions of the defects to form inspection reports. However, the efficiency of this method is very low, and there are many difficulties in manual visual inspection, such as visual fatigue is very easy to occur in long-time inspection, so some defects are omitted correspondingly; a further difficulty is the detection of small defects, which may cause significant risks to some very important equipment, and if the method of manual visual inspection does not allow the detection of these small defects, it may cause immeasurable losses to the equipment and to the production in the solution; finally, the criteria for judging defects may be different for different inspectors, which may lead to final inspection results that may be controversial. Therefore, computer-aided device defect detection is of great importance.
Before deep learning appears, many classical machine learning algorithms have been applied to the industry for defect detection, and the specific practice is mainly divided into three stages: the method comprises the steps of region selection, feature extraction and classification, wherein the step of region selection is to locate the position of a defect, a sliding window strategy is generally adopted to traverse the whole image, and the size, the length-width ratio and the like of the defect are uncertain, so that sliding windows with different scales and length-width ratios are required to be arranged; features commonly used in the feature extraction stage are SIFT, HOG and the like, good features can greatly improve detection performance, but due to various forms of defects and different illumination intensities, manual design of a robust feature is not an easy matter, the prior knowledge of a designer is needed, and the advantage of big data is difficult to use; the classifier commonly used in the classification stage is SVM, adaboost and the like. To sum up, the conventional defect detection method based on machine learning mainly has two problems: 1. the area selection strategy based on the sliding window has high time complexity and redundancy; 2. the manual design features are difficult and not very robust.
After deep learning occurs, a defect detection method based on deep learning is widely applied to industry, such as FasterR-CNN, yolo, SSD and the like. Such methods can be broadly divided into two categories: two-stage method and one-stage method. The two-stage method needs to generate a series of candidate frames by an algorithm, and then classifies the candidate frames, such as R-CNN, fasterR-CNN and the like, through a convolutional neural network. The one-stage method does not need to generate a candidate frame, and directly converts the positioning problem of the target frame into a regression problem for processing, such as YOLO, SSD and the like. The two methods have different detection performances, the two-stage method has more advantages in detection accuracy and positioning accuracy, and the one-stage method has more advantages in speed. Whether the two-stage method or the one-stage method is adopted, most of the methods for detecting defects in the industry are detection methods based on an anchor point mechanism, and the method has a remarkable disadvantage that super parameters related to an anchor point frame, such as scale, aspectratio of the anchor point frame, are difficult to design, and in different industrial application scenes, the method needs to design scale and aspectratio of the anchor according to the data condition in the scheme, which needs stronger priori knowledge, and the setting of the super parameters, such as IOU threshold, is also a problem when classifying the target category based on an anchor. Moreover, the object detection method based on the anchor mechanism can generate a great number of redundant frames in one image, and defects in one image are limited, so that a great number of anchors become background frames without defects, and the problem of serious unbalance of positive and negative samples is caused.
Disclosure of Invention
Aiming at the defects in the prior art, the invention provides a nuclear power station equipment surface defect detection method based on an improved CenterNet network.
In order to achieve the aim of the invention, the invention adopts the following technical scheme:
a nuclear power station equipment surface defect detection method based on an improved CenterNet network comprises the following steps:
s1, acquiring a nuclear power station equipment surface picture and preprocessing the picture;
s2, performing feature extraction on the picture preprocessed in the step S1 by using a DLAseg network to obtain a downsampled feature map;
s3, performing convolution operation by using the downsampled feature images obtained in the step S2 of the various convolution checks to obtain a heat image, an offset value and a size of the defect points on the surface of the equipment;
s4, converting the heat map obtained in the step S3 into a prediction frame, and obtaining a detection frame of a plurality of defect points according to the offset value and the size;
s5, removing redundant detection frames by utilizing the soft_NMS and a confidence threshold value to obtain a prediction result of the equipment defect;
s6, inputting the prediction result obtained in the step S6 into a neural network for training to obtain a detection result of the equipment defect.
The beneficial effect of above-mentioned scheme is:
the traditional target detection algorithm based on the anchor mechanism is avoided, so that any super parameters based on anchor point correlation, such as scale, aspect ratio and the like of an anchor point frame, do not need to be set.
Further, the preprocessing in step S1 specifically includes:
s11, performing overturning, scaling, cutting and overturning operations on the acquired nuclear power station equipment surface picture by using an image processing tool;
s12, performing Gaussian kernel scattering on the picture processed in the step S11 through a Gaussian function.
The beneficial effects of the above-mentioned further scheme are:
the data are enhanced, the more the number of samples is, the better the training effect of the model is, and the stronger the generalization capability of the model is. The gaussian function is to transform the labels.
Further, the step S3 specifically includes:
s31, the number of channels of tensors output by the heat map is 80, and each channel represents the heat map of the corresponding category and is operated as follows:
Sequential(
(0):Conv2d(64,64,kernel_size=(3,3),stride=(1,1),padding=(1,1))
(1):ReLU(inplace)
(2):Conv2d(64,80,kernel_size=(1,1),stride=(1,1))
)
s32, the number of channels of tensors of the width and height output is 2, and the number of channels respectively represents the length and the width of the center of an output frame, and the operation is as follows:
Sequential(
(0):Conv2d(64,64,kernel_size=(3,3),stride=(1,1),padding=(1,1))
(1):ReLU(inplace)
(2):Conv2d(64,2,kernel_size=(1,1),stride=(1,1)))
s33, the number of channels of tensors output by the offset value is 2, and the tensors are offset in the width and height directions respectively, and the operation is as follows:
Sequential(
(0):Conv2d(64,64,kernel_size=(3,3),stride=(1,1),padding=(1,1))
(1):ReLU(inplace)
(2):Conv2d(64,2,kernel_size=(1,1),stride=(1,1)))
the beneficial effects of the above-mentioned further scheme are:
and obtaining the category of the prediction frame, the confidence and the specific position of the prediction frame.
Further, the step S4 specifically includes:
s41, carrying out maximum pooling operation on the heat map obtained in the step S3, obtaining a plurality of neighbor maximum points of the defect point, and arranging the obtained neighbor maximum points in descending order according to the score;
s42, selecting the corresponding neighbor maximum points with the ranks higher than the score threshold value and the corresponding numbers according to the score sizes of the neighbor maximum points;
s43, planning a detection frame for the neighbor maximum points selected in the step S2 according to the offset value and the size obtained in the step S3, and obtaining a detection frame for a plurality of defect points.
The beneficial effects of the above-mentioned further scheme are:
and deleting the redundant prediction frames to obtain a final detection result.
Further, the step S5 specifically includes:
s51, arranging the detection frames obtained in the step S4 in a descending order according to the confidence level;
s52, judging whether the object accuracy standard of the detection frame with the serial number in the step S51 is larger than a set threshold, if so, reducing the confidence coefficient of the detection frame, and if not, reserving the detection frame.
The beneficial effects of the above-mentioned further scheme are:
more candidate detection frames that may contain the target are retained.
Further, the calculating manner of the confidence in step S51 is as follows:
the heat map after the pooling operation is the confidence in S51.
The beneficial effects of the above-mentioned further scheme are:
when the defects are denser, more detection frames can be reserved by soft_nms, and the detection accuracy of an algorithm is improved.
Further, in the step S52, the calculation method for reducing the confidence coefficient of the detection frame is as follows:
wherein d i Represents the ith detection frame, d m The detection box with the highest confidence is represented, and sigma is constant.
The beneficial effects of the above-mentioned further scheme are:
when the defects are denser, the method can reserve more detection frames, rather than directly setting the confidence of the detection frames possibly containing the defects to 0.
Further, the step S6 specifically includes:
s61, inputting the prediction result obtained in the step S5 into a CenterNet network, and constructing positive and negative sample pairs;
s62, reducing the weight of a negative sample in the heat map by using the loss function, increasing the weight of the heat map loss function, and reducing the loss function of the offset value to obtain the loss function of the CenterNet network;
and S63, training the prediction result obtained in the step S5 by using the loss function obtained in the step S62 to obtain a detection result of the surface defect of the nuclear power station equipment.
The beneficial effects of the above-mentioned further scheme are:
and the surface defect classification and positioning capacity of the model nuclear power station equipment is improved.
Further, the loss function of the central net network in the step S62 is expressed as:
L det =λ k L k +λ size L size +λ off L off ;
wherein L is det L is a loss function of the CenterNet network k Lambda is the heat map loss function k Weights and λ for heat map loss function k >1,L size Lambda is the size loss function size Weights of size loss functions, L off As an offset value loss function, lambda off Weight and lambda as offset value loss function off <1。
The beneficial effects of the above-mentioned further scheme are:
different weights are distributed for different loss functions, so that the network is better optimized, and the defect detection precision is improved.
Further, the heat map loss function L k The calculation formula of (2) is as follows:
wherein, thereinC represents the number of categories, ">Representing the predicted value of the model on the (x, Y) coordinate on the c-th heat map channel, Y xyc Is a real label, and alpha and beta are super parameters;
size loss function L size The calculation formula of (2) is as follows:
wherein,n is the number of key points and s is the predicted value of the model k In order to require the true value of the regression,k is the target number.
Offset value loss function L off The calculation formula of (2) is as follows:
where p represents the center point of the target box, R represents a multiple of the downsampling, representing the deviation value.
The beneficial effects of the above-mentioned further scheme are:
when the labeling information is mapped from the input image to the output feature image, errors on coordinates are brought due to rounding operation, and the offset can improve the positioning accuracy of the detection model.
Drawings
Fig. 1 is a schematic flow chart of a nuclear power station equipment surface defect detection method based on an improved centrnet network.
Fig. 2 is a graph showing comparison between the detection effects of the central net and the detection effects of the SSD and YOLOv3 according to the embodiment of the invention.
FIG. 3 is a graph showing the loss of change of different models during the training phase according to the embodiment of the present invention.
Detailed Description
The following description of the embodiments of the present invention is provided to facilitate understanding of the present invention by those skilled in the art, but it should be understood that the present invention is not limited to the scope of the embodiments, and all the inventions which make use of the inventive concept are protected by the spirit and scope of the present invention as defined and defined in the appended claims to those skilled in the art.
A nuclear power station equipment surface defect detection method based on an improved CenterNet network is shown in FIG. 1, and comprises the following steps:
s1, acquiring a nuclear power station equipment surface picture and preprocessing the picture;
data preprocessing: the method comprises the steps of performing overturning, affine transformation (including zooming, cutting and the like), overturning and the like on the surface picture of the nuclear power station equipment; in the training stage, the labels of the defect targets need to be converted into heat maps through a Gaussian function, namely Gaussian kernel scattering is needed, in the unmodified CenterNet, the radius of the Gaussian kernel is determined according to the IOU threshold value of a prediction frame and a GTbox, the IOU threshold value of the prediction frame and the GTbox in the unmodified CenterNet is set to be 0.7, then the Gaussian kernel radius is determined according to the threshold value of 0.7, two-dimensional Gaussian kernel scattering is carried out, and only the frame with the IOU of the prediction frame and the GTbox larger than 0.7 is reserved, but for the application scene of nuclear power station equipment surface defect detection, the outline of the defect is uncertain, and therefore the marking of the defect is not a definite standard.
S2, performing feature extraction on the picture preprocessed in the step S1 by using a DLAseg network to obtain a downsampled feature map;
the preprocessed picture is sent into a DLASeg network for feature extraction, DLA is deep LayerArgregation, and DlAseg is a segmentation network added with deformable convolution on the basis of DLA-34, and the deformable convolution is convolution operation with stronger feature extraction capability after improvement on the traditional CNN. The deformable convolution is very suitable for the task that the target to be identified has a certain geometric deformation, and in the application scene of defect detection, a defect has various shapes, and in the scheme, the task can be considered as an object identification task with various geometric deformation, so that the deformable convolution can be well represented in the application scene of defect detection.
The Aggregation Aggregation is a network structure Aggregation mode capable of fusing information between blocks at different depths and different stages, just like the jump connection used by ResNet, and can be regarded as a connection mode, but the fusion mode of ResNet can only be performed in the block, and also can be performed in a simple superposition mode, while the DLA structure can be used for fusing the characteristic information of the network structure in an iterative mode, so that the model can be expressed with higher precision under the condition of less parameter quantity.
However, in the unmodified DLA-34 network, the model only fuses more features in space, and information among modeling channels is not displayed, so that the model can automatically learn the importance degree of different channel features, and in the scheme, a ECA (Efficient Channel Attention) module is embedded into the DLA-34 network, so that the performance of the neural network is remarkably improved. ECA is an extremely light channel attention module, which captures local cross-channel interaction by considering each channel and K neighbors thereof after channel-level global averaging pooling without dimension reduction, and can obtain obvious performance gain in classification, detection and segmentation tasks although only a small amount of parameters are added, so that ECA is an attention mechanism very suitable for being applied to the field of industrial detection. The ECA module enables the model to learn the defect characteristics more effectively, and improves the defect detection accuracy.
Through the feature extraction of the backbone network, a feature map which is sampled 4 times is obtained, and the resolution of the feature map is much larger than that of the feature map obtained by a general network, so that a small target can be well predicted. And (3) respectively carrying out convolution operation on the feature map by using three different convolution checks to obtain three feature maps with different dimensions, wherein the feature maps are respectively corresponding to a heat map, an offset value and a width and height. Since the model is regressed by thermodynamic diagrams, the receptive field of the model is very important for defect detection, and the 3*3 convolution is replaced by 5*5 convolution in the scheme for the model to have a larger receptive field.
S3, performing convolution operation by using the downsampled feature images obtained in the step S2 of the various convolution checks to obtain a heat image, an offset value and a size of the defect points on the surface of the equipment;
s4, converting the heat map obtained in the step S3 into a prediction frame, and obtaining a detection frame of a plurality of defect points according to the offset value and the size;
first, a maxpooling operation of 3*3 is performed on the backbone network output, which is similar to the effect of NMS (Non-Maximum Suppression) based anchor point detection method, i.e., to find 8-neighbor maxima points. Then, the first K maximum scores and the corresponding ids of the heat map are taken out without considering the influence of the category, the K points are the central points of the K defects predicted in the scheme, then according to the offset value and the width and height output by the main network, the K detection frames can be obtained in the scheme, 100 taken by the K in the central net, and for most cases, the 100 detection frames are redundant, so that a specific algorithm is needed to remove the redundant detection frames in the scheme, and the Soft-NMS is used to remove the redundant detection frames in the central net. Soft-NMS improves upon the traditional NMS (Non-Maxim compression) approach.
S5, removing redundant detection frames by utilizing the soft_NMS and a confidence threshold value to obtain a prediction result of the equipment defect;
the traditional NMS algorithm firstly ranks the detection frames from high to low according to the confidence, then reserves the detection frame with the highest confidence, and removes the detection frame with the IOU of the detection frame larger than the set threshold value. The above steps are then repeated in the remaining test frames. However, this method has a significant drawback in that when two defects are too close, a missing inspection may occur because the lower confidence box is removed because of the larger overlap area with the higher confidence box. In the application scenario of surface defect detection of nuclear power plant equipment, the situation that defects are close to or even overlap is very large, so that the conventional NMS algorithm is not suitable for the scenario. The Soft-NMS used in the CenterNet is an improvement on the traditional NMS algorithm, and for the detection frames with IOU larger than the threshold value, the Soft-NMS adopts a mode of not directly removing but reducing the confidence of the detection frames, so that more detection frames are reserved, the detection accuracy is improved, and the traditional NMS and the Soft-NMS have the following calculation formulas:
NMS sets 0 to the confidence of the detection frame with the io u greater than the threshold value of the detection frame with the highest confidence
Soft-NMS for detection boxes with iou greater than the threshold, the confidence is not set to 0 directly, but is reduced by some function.
The use of gaussian weighting in the central net reduces confidence:
s in the formulas (1), (2) and (3) i Representing the confidence of the ith detection frame;
d i representing an ith detection frame;
d m a detection frame with the highest confidence coefficient is represented;
sigma is constant, 0.5 is taken from CenterNet;
s6, inputting the prediction result obtained in the step S6 into a neural network for training to obtain a detection result of the equipment defect.
In this embodiment, the method specifically includes the following steps:
s61, inputting the prediction result obtained in the step S5 into a CenterNet network, and constructing positive and negative sample pairs;
s62, reducing the weight of a negative sample in the heat map by using the loss function, increasing the weight of the heat map loss function, and reducing the loss function of the offset value to obtain the loss function of the CenterNet network;
and S63, training the prediction result obtained in the step S5 by using the loss function obtained in the step S62 to obtain a detection result of the surface defect of the nuclear power station equipment.
Loss function
L det =L k +λ size L size +λ off L off (4)
The loss function of CenterNet is shown in equation 4, where L det Representing the loss function of the CenterNet as a whole, L det From L k (loss of heat map portion), L size (loss of width and height) and L off (loss of offset part) three-part loss composition, where lambda size And lambda (lambda) off Is constant and represents the weight of different loss, unmodified loss function lambda size And lambda (lambda) off 0.1 and 1, respectively. The three-part loss function formula is as follows:
n in the formula (5) represents the number of image key points, wherein(C represents the number of categories), - (Y-O) and (C) is the same as the number of categories>Representing the predicted value of the model on the (x, Y) coordinate on the c-th heat map channel, Y xyc Is a real tag, alpha and beta are super parameters, and 2 and 4 are respectively taken from CenterNet. L (L) k The method adopts the form of FocalLoss, the FocalLoss can solve the problem of serious unbalance of positive and negative samples in defect detection, and the loss function reduces the weight of a large number of simple negative samples in training, so that the model focuses on difficult and indistinct samples.
From the formula (6), L size Training length and width using L1Loss function, assuming the kth objective, class c k Is represented as (x 1) (k) ,y1 (k) ,x2 (k) ,y2 ( k ) ) Then the center point coordinate of the target frame isThe length and width of the target frame are s k =(x2 (k) -x1 (k) ,y2 (k) -y1 (k) ),/>N is the number of key points and is the predicted value of the model.
Equation (7) also trains the bias using L1Loss, where p represents the center point of the target box, R represents the multiple of downsampling 4,representing the deviation value.
In the scheme, explained in the step 1, because the outline of the defect is not determined and the labeling mode of the defect is not unique, the position output of the model is not required to be aligned with GroundTruth strictly in the scheme, and therefore the improvement of the loss function in the scheme is as follows:
L det =λ k L k +λ size L size +λ off L off (8)
in this scheme, a lambda is added k The parameter defaults to 2 and decreases L off The weight occupied will be lambda off Set to 0.1.
Experiment verification
The ENPP divides the defective data into a training set and a test set, wherein the training set has 1822 pictures, and the test set has 217 pictures.
Experiments used SSD, YOLOv3, retinaNet and the method in this protocol trained 200 epochs on the training set, respectively. In the scheme, several pictures are randomly selected on the verification set, and a comparison diagram of detection results of SSD, YOLOv3 and a model in the scheme is shown as 2.
As can be seen from fig. 2, the detection effect of the method in the present scheme is not inferior to SSD and YOLOv3 which have been widely used in industry, even in some cases the detection effect of the method in the present scheme is better than SSD and YOLOv 3. Meanwhile, for the detection of small defects, the method in the scheme can also have good performance.
The experiments used single-stage detection models SSD, YOLOv3, unmodified centrnet as comparative experiments, respectively, with the following results:
experiments were performed with 200 epochs on the training set using different models, the loss change patterns for the different models are shown in fig. 3:
as can be seen from the loss change chart, the loss is trained by the method based on the CenterNet to converge first, so that the training time in the scheme is greatly saved.
In addition, the model in the scheme is tested by referring to the test method of the couapi in the scheme, the test set in the scheme has 217 pictures, and in the scheme explained in the scheme in 4.1, a higher tolerance is required to be given to the prediction frame in the scheme, so that five IOU thresholds of 0.3, 0.35, 0.4, 0.45 and 0.5 are set in the scheme, the final mAP is the average value of the results of the five IOU thresholds, the mAR is the average recall rate, the Informance time is the average reasoning time of each picture, and the test results are shown in Table 1 respectively:
TABLE 1
mAP | mAR | Inference time | Parameters(M) | |
YOLOv3 | 0.48 | 0.59 | 0.016s | 61.54 |
RetinaNet | 0.30 | 0.60 | 0.037 | 36.39 |
SSD | 0.45 | 0.56 | 0.09s | 24.15 |
CenterNet_Resdcn18 | 0.38 | 0.54 | 0.028s | 14.43 |
CenterNet_Resdcn101 | 0.473 | 0.60 | 0.043s | 49.67 |
CenterNet_Hourglass104 | 0.551 | 0.65 | 0.068 | 191.24 |
ours | 0.515 | 0.76 | 0.038 | 20.17 |
As can be seen from the test results, the YOLOv3 has the shortest reasoning time, but the accuracy and recall rate are not ideal, the SSD has the longest reasoning time, and the detection model based on the CenterNet has very large application prospects in the defect detection field because the accuracy and recall rate are generally better than those of YOLOv3 and SSD although the reasoning time does not have YOLOv 3.
The present invention is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems) and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flowchart illustrations and/or block diagrams, and combinations of flows and/or blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
The principles and embodiments of the present invention have been described in detail with reference to specific examples, which are provided to facilitate understanding of the method and core ideas of the present invention; meanwhile, as those skilled in the art will have variations in the specific embodiments and application scope in accordance with the ideas of the present invention, the present description should not be construed as limiting the present invention in view of the above.
Those of ordinary skill in the art will recognize that the embodiments described herein are for the purpose of aiding the reader in understanding the principles of the present invention and should be understood that the scope of the invention is not limited to such specific statements and embodiments. Those of ordinary skill in the art can make various other specific modifications and combinations from the teachings of the present disclosure without departing from the spirit thereof, and such modifications and combinations remain within the scope of the present disclosure.
Claims (6)
1. The nuclear power station equipment surface defect detection method based on the improved CenterNet network is characterized by comprising the following steps of:
s1, acquiring a nuclear power station equipment surface picture and preprocessing the picture;
s2, performing feature extraction on the picture preprocessed in the step S1 by using a DLAseg network to obtain a downsampled feature map;
s3, performing convolution operation by using the downsampled feature images obtained in the step S2 of the various convolution checks to obtain a heat image, an offset value and a size of the defect points on the surface of the equipment;
s4, converting the heat map obtained in the step S3 into a prediction frame, and obtaining a detection frame of a plurality of defect points according to the offset value and the size;
s5, removing redundant detection frames by utilizing the soft_NMS and a confidence threshold value to obtain a prediction result of the equipment defect;
s6, inputting the prediction result obtained in the step S5 into a neural network for training to obtain a detection result of the equipment defect, wherein the method specifically comprises the following steps:
s61, inputting the prediction result obtained in the step S5 into a CenterNet network, and constructing positive and negative sample pairs;
s62, reducing the weight of a negative sample in the heat map by using the loss function, increasing the weight of the heat map loss function and reducing the loss function of the offset value to obtain the loss function of the CenterNet network, wherein the loss function is expressed as:
;
wherein,loss function for a CenterNet network, < ->For the heat map loss function, < >>Weights the heat map loss function and +.>,/>For the size loss function>Weight of size loss function, +.>As a function of the loss of the offset value,weight of the loss function for offset value and +.>;
And S63, training the prediction result obtained in the step S5 by using the loss function obtained in the step S62 to obtain a detection result of the surface defect of the nuclear power station equipment.
2. The method for detecting surface defects of nuclear power plant equipment based on the improved central net network according to claim 1, wherein the preprocessing in step S1 specifically comprises:
s11, performing overturning, scaling, cutting and overturning operations on the acquired nuclear power station equipment surface picture by using an image processing tool;
s12, performing Gaussian kernel scattering on the picture processed in the step S11 through a Gaussian function.
3. The method for detecting surface defects of nuclear power plant equipment based on the improved central net network according to claim 2, wherein the step S4 specifically comprises:
s41, carrying out maximum pooling operation on the heat map obtained in the step S3, obtaining a plurality of neighbor maximum points of the defect point, and arranging the obtained neighbor maximum points in a descending order according to the confidence level;
s42, selecting corresponding neighbor maximum points and corresponding numbers with the ranks higher than the confidence threshold according to the confidence level in the step S41;
s43, planning detection frames for the neighbor maximum points selected in the step S42 according to the offset value and the size obtained in the step S3, and obtaining a plurality of detection frames for the defect points.
4. The method for detecting surface defects of nuclear power plant equipment based on the modified centnet network according to claim 3, wherein the step S5 specifically comprises:
s51, arranging the detection frames obtained in the step S4 in a descending order according to the confidence level;
s52, judging whether the object accuracy standard of the arranged detection frames in the step S51 is larger than a set threshold, if so, reducing the confidence coefficient of the detection frames, and if not, reserving the detection frames.
5. The method for detecting surface defects of nuclear power plant equipment based on the improved central net network according to claim 4, wherein in the step S52, the confidence of the detection frame is reduced by the following calculation method:
;
wherein,confidence for the ith detection frame, +.>Indicating the ith detection box,/->The detection box with the highest confidence is represented,is constant and is->And the intersection ratio of the ith detection frame and the detection frame with the highest confidence coefficient is represented.
6. The method for detecting surface defects of nuclear power plant equipment based on the improved CenterNet network as claimed in claim 1, wherein,
the heat map loss functionThe calculation formula of (2) is as follows:
wherein c is the category of the c-th heat map channel,representing the coordinates +.>The predicted value at which the position is to be determined,is a real label->And->Is a super parameter;
size loss functionThe calculation formula of (2) is as follows:
;
wherein,n is the number of defect points, which is the predicted value of the model>Index of defective point->K is the number of targets for regression reality;
offset value loss functionThe calculation formula of (2) is as follows:
;
wherein,prepresenting the center point of the target frame,Ra multiple of the downsampling is indicated,indicating that the network is +.>Bias value of output ∈>Representing the center point of the target frame on the feature map after downsampling, ++>,/>Is the deviation value.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110575217.5A CN113643228B (en) | 2021-05-26 | 2021-05-26 | Nuclear power station equipment surface defect detection method based on improved CenterNet network |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110575217.5A CN113643228B (en) | 2021-05-26 | 2021-05-26 | Nuclear power station equipment surface defect detection method based on improved CenterNet network |
Publications (2)
Publication Number | Publication Date |
---|---|
CN113643228A CN113643228A (en) | 2021-11-12 |
CN113643228B true CN113643228B (en) | 2024-01-19 |
Family
ID=78415823
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202110575217.5A Active CN113643228B (en) | 2021-05-26 | 2021-05-26 | Nuclear power station equipment surface defect detection method based on improved CenterNet network |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN113643228B (en) |
Families Citing this family (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN114782311B (en) * | 2022-03-14 | 2024-05-14 | 华南理工大学 | CENTERNET improvement-based multi-scale defect target detection method and system |
CN114594103B (en) * | 2022-04-12 | 2023-05-16 | 四川大学 | Automatic detection and report generation method and system for surface defects of nuclear industrial equipment |
CN114529546A (en) * | 2022-04-24 | 2022-05-24 | 科大天工智能装备技术(天津)有限公司 | Roof panel defect detection method and system |
CN116309587A (en) * | 2023-05-22 | 2023-06-23 | 杭州百子尖科技股份有限公司 | Cloth flaw detection method and device, electronic equipment and storage medium |
CN116309586A (en) * | 2023-05-22 | 2023-06-23 | 杭州百子尖科技股份有限公司 | Defect detection method, device, equipment and medium based on convolutional neural network |
Citations (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110766681A (en) * | 2019-10-28 | 2020-02-07 | 福建帝视信息科技有限公司 | Bamboo strip surface defect detection method based on triple loss network |
CN111062413A (en) * | 2019-11-08 | 2020-04-24 | 深兰科技(上海)有限公司 | Road target detection method and device, electronic equipment and storage medium |
CN111275171A (en) * | 2020-01-19 | 2020-06-12 | 合肥工业大学 | Small target detection method based on parameter sharing and multi-scale super-resolution reconstruction |
CN111738995A (en) * | 2020-06-10 | 2020-10-02 | 苏宁云计算有限公司 | RGBD image-based target detection method and device and computer equipment |
CN112257815A (en) * | 2020-12-03 | 2021-01-22 | 北京沃东天骏信息技术有限公司 | Model generation method, target detection method, device, electronic device, and medium |
CN112446327A (en) * | 2020-11-27 | 2021-03-05 | 中国地质大学(武汉) | Remote sensing image target detection method based on non-anchor frame |
CN112446302A (en) * | 2020-11-05 | 2021-03-05 | 杭州易现先进科技有限公司 | Human body posture detection method and system, electronic equipment and storage medium |
CN112507845A (en) * | 2020-12-02 | 2021-03-16 | 余姚市浙江大学机器人研究中心 | Pedestrian multi-target tracking method based on CenterNet and depth correlation matrix |
CN112613564A (en) * | 2020-12-25 | 2021-04-06 | 桂林汉璟智能仪器有限公司 | Target detection post-processing method for eliminating overlapped frames |
Family Cites Families (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20210118136A1 (en) * | 2019-10-22 | 2021-04-22 | Novateur Research Solutions LLC | Artificial intelligence for personalized oncology |
-
2021
- 2021-05-26 CN CN202110575217.5A patent/CN113643228B/en active Active
Patent Citations (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110766681A (en) * | 2019-10-28 | 2020-02-07 | 福建帝视信息科技有限公司 | Bamboo strip surface defect detection method based on triple loss network |
CN111062413A (en) * | 2019-11-08 | 2020-04-24 | 深兰科技(上海)有限公司 | Road target detection method and device, electronic equipment and storage medium |
CN111275171A (en) * | 2020-01-19 | 2020-06-12 | 合肥工业大学 | Small target detection method based on parameter sharing and multi-scale super-resolution reconstruction |
CN111738995A (en) * | 2020-06-10 | 2020-10-02 | 苏宁云计算有限公司 | RGBD image-based target detection method and device and computer equipment |
CN112446302A (en) * | 2020-11-05 | 2021-03-05 | 杭州易现先进科技有限公司 | Human body posture detection method and system, electronic equipment and storage medium |
CN112446327A (en) * | 2020-11-27 | 2021-03-05 | 中国地质大学(武汉) | Remote sensing image target detection method based on non-anchor frame |
CN112507845A (en) * | 2020-12-02 | 2021-03-16 | 余姚市浙江大学机器人研究中心 | Pedestrian multi-target tracking method based on CenterNet and depth correlation matrix |
CN112257815A (en) * | 2020-12-03 | 2021-01-22 | 北京沃东天骏信息技术有限公司 | Model generation method, target detection method, device, electronic device, and medium |
CN112613564A (en) * | 2020-12-25 | 2021-04-06 | 桂林汉璟智能仪器有限公司 | Target detection post-processing method for eliminating overlapped frames |
Non-Patent Citations (4)
Title |
---|
Cascade CenterNet: Robust Object Detection for Power Line Surveillance;ZHIYONG DAI 等;《IEEE》;1-14 * |
Xingyi Zhou 等.Objects as Points.《arXiv:1904.07850v2》.2019,第1-12页. * |
机器视觉技术在模具检测与定位中的应用研究;史亚秋;《中国优秀硕士学位论文全文数据库 工程科技Ⅰ辑》(第08期);B022-342 * |
王璇 等.基于改进 CenterNet的AFP铺层表面缺陷检测.《红外与激光工程》.2021,第1-16页. * |
Also Published As
Publication number | Publication date |
---|---|
CN113643228A (en) | 2021-11-12 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN113643228B (en) | Nuclear power station equipment surface defect detection method based on improved CenterNet network | |
CN108562589B (en) | Method for detecting surface defects of magnetic circuit material | |
CN111832608B (en) | Iron spectrum image multi-abrasive particle identification method based on single-stage detection model yolov3 | |
CN111179249A (en) | Power equipment detection method and device based on deep convolutional neural network | |
US20210150696A1 (en) | Neural network training device, system and method | |
CN111582345A (en) | Target identification method for complex environment under small sample | |
CN112070135A (en) | Power equipment image detection method and device, power equipment and storage medium | |
CN111652853A (en) | Magnetic powder flaw detection method based on deep convolutional neural network | |
CN112766170B (en) | Self-adaptive segmentation detection method and device based on cluster unmanned aerial vehicle image | |
CN115294089A (en) | Steel surface defect detection method based on improved YOLOv5 | |
CN114694130A (en) | Method and device for detecting telegraph poles and pole numbers along railway based on deep learning | |
CN111597939B (en) | High-speed rail line nest defect detection method based on deep learning | |
CN116758539B (en) | Embryo image blastomere identification method based on data enhancement | |
CN116503398B (en) | Insulator pollution flashover detection method and device, electronic equipment and storage medium | |
CN117593244A (en) | Film product defect detection method based on improved attention mechanism | |
CN115861306B (en) | Industrial product abnormality detection method based on self-supervision jigsaw module | |
Wangli et al. | Foxtail Millet ear detection approach based on YOLOv4 and adaptive anchor box adjustment | |
CN116563250A (en) | Recovery type self-supervision defect detection method, device and storage medium | |
CN108898157B (en) | Classification method for radar chart representation of numerical data based on convolutional neural network | |
Ibrahem et al. | Weakly supervised traffic sign detection in real time using single CNN architecture for multiple purposes | |
CN115830302A (en) | Multi-scale feature extraction and fusion power distribution network equipment positioning identification method | |
CN114332452B (en) | Automatic detection method for image annotation result of target detection or target segmentation | |
CN112199984B (en) | Target rapid detection method for large-scale remote sensing image | |
Bi et al. | CASA-Net: a context-aware correlation convolutional network for scale-adaptive crack detection | |
CN112200762A (en) | Diode glass bulb defect detection method |
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 |