CN118036476A - Precast concrete crack detection model, method, system and readable medium - Google Patents
Precast concrete crack detection model, method, system and readable medium Download PDFInfo
- Publication number
- CN118036476A CN118036476A CN202410432015.9A CN202410432015A CN118036476A CN 118036476 A CN118036476 A CN 118036476A CN 202410432015 A CN202410432015 A CN 202410432015A CN 118036476 A CN118036476 A CN 118036476A
- Authority
- CN
- China
- Prior art keywords
- module
- unit
- model
- input end
- precast concrete
- 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
Links
- 238000001514 detection method Methods 0.000 title claims abstract description 127
- 239000011178 precast concrete Substances 0.000 title claims abstract description 40
- 238000000034 method Methods 0.000 title claims abstract description 21
- 238000011176 pooling Methods 0.000 claims abstract description 36
- 238000012549 training Methods 0.000 claims abstract description 30
- 238000012360 testing method Methods 0.000 claims description 14
- 238000002372 labelling Methods 0.000 claims description 8
- 238000004590 computer program Methods 0.000 claims description 7
- 238000012804 iterative process Methods 0.000 claims description 2
- 230000009286 beneficial effect Effects 0.000 abstract description 10
- 238000010586 diagram Methods 0.000 abstract description 9
- 238000000605 extraction Methods 0.000 abstract description 3
- 238000010801 machine learning Methods 0.000 abstract 1
- 239000004567 concrete Substances 0.000 description 10
- 238000012545 processing Methods 0.000 description 10
- 238000005336 cracking Methods 0.000 description 8
- 239000011159 matrix material Substances 0.000 description 7
- 230000007547 defect Effects 0.000 description 6
- 238000012795 verification Methods 0.000 description 6
- 238000010276 construction Methods 0.000 description 4
- 238000004422 calculation algorithm Methods 0.000 description 3
- 238000013135 deep learning Methods 0.000 description 2
- 238000011156 evaluation Methods 0.000 description 2
- 239000000463 material Substances 0.000 description 2
- 230000003044 adaptive effect Effects 0.000 description 1
- 238000013528 artificial neural network Methods 0.000 description 1
- 238000004364 calculation method Methods 0.000 description 1
- 238000013527 convolutional neural network Methods 0.000 description 1
- 238000005516 engineering process Methods 0.000 description 1
- 238000007667 floating Methods 0.000 description 1
- 230000006870 function Effects 0.000 description 1
- 230000003902 lesion Effects 0.000 description 1
- 238000004519 manufacturing process Methods 0.000 description 1
- 238000003062 neural network model Methods 0.000 description 1
- 238000003908 quality control method Methods 0.000 description 1
- 238000005070 sampling Methods 0.000 description 1
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F30/00—Computer-aided design [CAD]
- G06F30/20—Design optimisation, verification or simulation
- G06F30/27—Design optimisation, verification or simulation using machine learning, e.g. artificial intelligence, neural networks, support vector machines [SVM] or training a model
-
- 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/0464—Convolutional networks [CNN, ConvNet]
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- Evolutionary Computation (AREA)
- Software Systems (AREA)
- Artificial Intelligence (AREA)
- General Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Health & Medical Sciences (AREA)
- Mathematical Physics (AREA)
- Computational Linguistics (AREA)
- Molecular Biology (AREA)
- Computing Systems (AREA)
- Biophysics (AREA)
- Biomedical Technology (AREA)
- Data Mining & Analysis (AREA)
- Life Sciences & Earth Sciences (AREA)
- Health & Medical Sciences (AREA)
- Computer Vision & Pattern Recognition (AREA)
- Medical Informatics (AREA)
- Computer Hardware Design (AREA)
- Geometry (AREA)
- Image Analysis (AREA)
Abstract
The invention relates to the technical field of precast concrete surface detection and computers, in particular to a precast concrete crack detection model, a precast concrete crack detection method, a precast concrete crack detection system and a precast concrete crack detection readable medium. According to the training method of the precast concrete crack detection model, a YOLOv model is optimized firstly, and then machine learning is carried out. According to the invention, an LW module is set for three paths of data splicing, wherein one path is data input by the LW module, the LW module participates in the splicing, a larger characteristic diagram is reserved, and the detection of a small target is facilitated; the other path is data which is subjected to average pooling and maximum pooling and then dimension superposition on the data input by the LW module, the average pooling is beneficial to extracting overall characteristics, the maximum pooling is beneficial to extracting the most prominent characteristics, and the combination of the two ensures the overall characteristic extraction of the data, thereby being beneficial to improving the detection precision.
Description
Technical Field
The invention relates to the technical field of precast concrete surface detection and computers, in particular to a precast concrete crack detection model, a precast concrete crack detection method, a precast concrete crack detection system and a precast concrete crack detection readable medium.
Background
The significance of quality control in the production of products is becoming more and more remarkable, and surface defects of the products affect the quality of the products. A significant portion of the construction costs are for reworking due to material defects. The crack defect is a very common type of surface defect of the prefabricated part, and accurately detecting the crack defect plays a very important role in improving the product quality and reducing the construction cost.
At present, the detection and evaluation of the quality of the prefabricated part mainly comprises a manual identification detection method, a detection method based on an image processing algorithm and a deep learning method. The traditional manual detection method has the advantages of low sampling rate, high detection accuracy, high labor intensity, low detection efficiency and poor real-time performance, and is greatly influenced by subjective factors such as manual experience, fatigue degree and the like. The image processing algorithm detection method is mainly used for detecting cracks of background images of the same material and texture, and the crack detection of the color image cannot be directly performed at present. In the existing deep learning algorithm detection method, an image to be detected is directly compressed to a smaller size to meet the input requirement of a neural network, and then the image is sent into a neural network model trained in advance for detection to obtain a prediction result.
Disclosure of Invention
In order to overcome the defects of low efficiency or low precision or the detection of the precast concrete cracks in the prior art, the invention provides a training method of a precast concrete crack detection model, which can train an efficient and accurate precast concrete crack detection model.
The invention provides a training method of a precast concrete crack detection model, which comprises the following steps:
Firstly, a basic model and a learning sample are acquired, wherein the learning sample is an associated crack shooting image and a crack labeling image; the basic model is based on YOLOv model, the Upsample unit and the Concat unit which are connected are replaced by LW module, the LW module firstly carries out pooling treatment on the input data of Upsample unit in YOLOv model, then carries out three-way splicing on the pooled data and two paths of input of Upsample unit and Concat unit combination module in YOLOv model, and then outputs;
Then the basic model learns the learning sample to iterate the model parameters until convergence; and taking the converged basic model as a precast concrete crack detection model, inputting the model into a shooting image, and outputting the model into a crack labeling image.
Preferably, the LW module includes an average pooling layer, a maximum pooling layer, a dimension superposition unit, and a fifth Concat unit; the fifth Concat unit is provided with three input ends; the LW module is provided with two input ends; in the YOLOv model, the input end of the Upsample unit in the Upsample unit and Concat unit combined module is marked as a first input end of the combined module, and the input end of the Concat unit connected with the second C3 module is marked as a second input end of the combined module; the first input end of the LW module replaces the first input end of the combination module, and the second input end of the LW module replaces the second input end of the combination module;
The first input end of the LW module is respectively connected with the input end of the average pooling layer, the input end of the maximum pooling layer and the first input end of the fifth Concat unit, the output end of the average pooling layer and the output end of the maximum pooling layer are both connected with the input end of the dimension superposition unit, the output end of the dimension superposition unit is connected with the second input end of the fifth Concat unit, and the third input end of the fifth Concat unit is connected with the second input end of the LW module; the output of the fifth Concat unit serves as the output of the LW module.
Preferably, in YOLOv models, modules with the same structure are named sequentially along the data flow direction; the basic model is based on YOLOv model, the first C3 module and the fourth C3 module in the data flow direction are replaced by MMT modules, and the MMT modules comprise Bottleneck units, multiAttenCat units and tenth Conv units which are sequentially connected; the input end of the MMT module is respectively connected with the input end of the Bottleneck unit and the input end of the MultiAttenCat unit, and the output end of the tenth Conv unit is used as the output end of the MMT module.
Preferably, the base model is further based on the YOLOv model by replacing both the fourth Conv unit and the fifth Conv unit with RepVGG units.
Preferably, the iterative process of model parameters comprises the steps of:
st1, dividing a learning sample into a training set and a testing set;
st2, extracting a plurality of samples from the training set to serve as training samples, and enabling a basic model to learn the training samples so as to iterate model parameters;
St3, extracting a plurality of samples from the test set to serve as test samples, enabling a basic model to predict the test samples and outputting crack marking images;
St4, calculating the loss of the basic model on the test sample, and judging whether the basic model converges or not; if not, returning to the step St2; if yes, the base model is fixed.
Preferably, in St4, the loss of the base model is a cross entropy loss or a mean square error loss.
The invention provides a precast concrete crack detection method which is characterized in that a detection model is obtained by adopting the training method of the precast concrete crack detection model; photographing the target to be detected to obtain a target image; and inputting the target image into a detection model, and outputting a crack labeling image by the detection model to label the crack type.
Preferably, the fracture types include: transverse cracks, longitudinal cracks, and fatigue cracks.
The invention provides a precast concrete crack detection system, which comprises a memory and a processor, wherein a computer program is stored in the memory, the processor is connected with the memory, and the processor is used for executing the computer program so as to realize the training method of the precast concrete crack detection model.
The invention provides a readable medium storing a computer program which is used for realizing the training method of the precast concrete crack detection model when being executed. The invention has the advantages that:
(1) According to the invention, an LW module is set for three paths of data splicing, wherein one path is data input by the LW module, the LW module participates in the splicing, a larger characteristic diagram is reserved, and the detection of a small target is facilitated; the other path is data which is subjected to average pooling and maximum pooling and then dimension superposition on the data input by the LW module, the average pooling is beneficial to extracting overall characteristics, the maximum pooling is beneficial to extracting the most prominent characteristics, and the combination of the two ensures the overall characteristic extraction of the data, thereby being beneficial to improving the detection precision.
(2) The MMT module increases the data processing speed by replacing the C3 module in original YOLOv with a lightweight network model. The RepVGG module is used to reduce the network weight by reusing a simple convolution structure, equivalently representing the calculation of the convolution layer as a weighted sum of several small convolution blocks. The MMT module is used for optimizing the network structure, the RepVGG module is used for reducing the weight of the network, and the LW module improves the detection precision.
(3) The detection model provided by the invention can detect cracks of different types on the concrete prefabricated member, and the detection model provided by the invention is used for detecting the surface of the concrete prefabricated member, so that the detection precision on various types of cracks can be greatly improved, and the detection efficiency is improved.
Drawings
FIG. 1 is a flow chart of a first detection model construction method;
FIG. 2 is a diagram of a conventional YOLOv network architecture;
FIG. 3 is a diagram of a first detection model network architecture;
FIG. 4 is a block diagram of an LW module network;
FIG. 5 is a diagram of a network architecture of MMT modules;
FIG. 6 is a diagram of a second detection model network architecture;
FIG. 7 is a diagram of a third detection model network architecture;
FIG. 8 is an image of 3 cracking modes of concrete;
FIG. 9 is a graph showing the loss curve of the first detection model;
FIG. 10 is a graph showing the loss curve of the second detection model;
FIG. 11 is a graph showing a loss curve of a third detection model;
FIG. 12 is a graph comparing various model P-R curves;
FIG. 13 is a precision confusion matrix for the first detection model;
FIG. 14 is a precision confusion matrix for a second detection model;
fig. 15 is a precision confusion matrix for the third detection model.
Detailed Description
The following description of the embodiments of the present invention will be made clearly and completely with reference to the accompanying drawings, in which it is apparent that the embodiments described are only some embodiments of the present invention, but not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
A conventional YOLOv model, comprising: backbone network (backbone), neck network (back), and head network (head);
Referring to fig. 2, the backbone network includes a first Conv unit, a second Conv unit, a first C3 module, a third Conv unit, a second C3 module, a fourth Conv unit, a third C3 module, a fifth Conv unit, a fourth C3 module, and an SPPF module, which are sequentially connected; the input end of the first Conv unit is used as the input end of the backbone network and is also the input end of the YOLOv model;
The neck network comprises a sixth Conv unit, a first Upsample unit, a first Concat unit, a fifth C3 module, a seventh Conv unit, a second Upsample unit, a second Concat unit, a sixth C3 module, an eighth Conv unit, a third Concat unit, a seventh C3 module, a ninth Conv unit, a fourth Concat unit and an eighth C3 module connected in sequence;
The output end of the SPPF module is connected with the input end of a sixth Conv unit, the input end of the first Concat unit is also connected with the output end of the third C3 module, the input end of the second Concat unit is also connected with the output end of the second C3 module, the input end of the third Concat unit is also connected with the output end of the seventh Conv unit, and the input end of the fourth Concat unit is also connected with the output end of the sixth Conv unit;
The header network includes: a first detection unit, a second detection unit, and a third detection unit; the input end of the first detection unit is connected with the output end of the sixth C3 module, the input end of the second detection unit is connected with the output end of the seventh C3 module, and the input end of the third detection unit is connected with the output end of the eighth C3 module;
the first detection unit outputs a first detection result, the second detection unit outputs a second detection result, and the third detection unit outputs a third detection result.
In practical application, one or more of the first detection result, the second detection result and the third detection result can be selected as required to be output by the YOLOv model.
Definition data form h×p×q represents H-dimensional data representation of a feature map of size p×q. In this embodiment, H=2h+1、2h+2、2h+3、2h+4、n、2n、i、4i;P=x、x/2、x/4、x/8、x/16、p、p/2、2p、j;Q=y、y/2、y/4、y/8、y/16、q、q/2、2q、k;h、x、y、n、p、q、i、j and k are set values.
In YOLOv model, the first Conv unit performs convolution processing on input image data and outputs data 2 h ×x×y; converting the data 2 h x y into data 2 h+1 x (x/2) x (y/2) through a second Conv unit convolution process, sequentially processing the data 2 h+1 x (x/2) x (y/2) through a first C3 module and a third Conv unit, and outputting the data 2 h+2 x (x/4) x (y/4) by the third Conv unit; data 2 h+2 × (x/4) × (y/4) is processed sequentially by the second C3 module and the fourth Conv unit, which outputs data 2 h+3 × (x/8) × (y/8); data 2 h+3 × (x/8) × (y/8) is processed sequentially by the third C3 module and fifth Conv unit, which outputs data 2 h+4 × (x/16) × (y/16); data 2 h+4 × (x/16) × (y/16) were processed sequentially through the fourth C3 module, SPPF module, and sixth Conv unit to output data 2 h+3 × (x/16) × (y/16).
Data 2 h+3 × (x/16) × (y/16) output by the sixth Conv unit is converted into data 2 h+3 × (x/8) × (y/8) by the first Upsample unit; the first Concat unit performs dimension concatenation on the data 2 h+3 × (x/8) × (y/8) output by the third C3 module and the data 2 h+3 × (x/8) × (y/8) output by the first Upsample unit.
Data 2 h+4 x (x/8) x (y/8) output by the first Concat unit is converted into data 2 h+3 x (x/8) x (y/8) by the fifth C3 module and then input into a seventh Conv unit; the seventh Conv unit converts the input data into data 2 h+2 × (x/8) × (y/8) and inputs the data to the second Upsample unit.
The second Concat unit performs dimension splicing on the data 2 h+2 × (x/4) × (y/4) output by the second C3 module and the data 2 h+2 × (x/4) × (y/4) output by the second Upsample unit, and the data 2 h+3 × (x/4) × (y/4) output by the second Concat unit is converted into the data 2 h+2 × (x/4) × (y/4) by the sixth C3 module and then is input into the eighth Conv unit; the eighth Conv unit converts the input data into data 2 h+2 × (x/8) × (y/8) and inputs the data to the third Concat unit.
The third Concat unit splices the data 2 h+2 × (x/8) × (y/8) output by the seventh Conv unit and the data 2 h+2 × (x/8) × (y/8) output by the eighth Conv unit into data 2 h+3 × (x/8) × (y/8), and the data 2 h+3 × (x/8) × (y/8) output by the third Concat unit is processed sequentially by the seventh C3 module and the ninth Conv unit, and the ninth Conv unit outputs the data 2 h+3 × (x/16) × (y/16).
The fourth Concat unit splices the data 2 h+3 × (x/16) × (y/6) output by the sixth Conv unit and the data 2 h+3 × (x/16) × (y/16) output by the ninth Conv unit into data 2 h+4 × (x/16) × (y/16), and the eighth C3 module processes the data 2 h+4 × (x/16) × (y/16) output by the fourth Concat unit.
The precast concrete crack detection model provided by the invention is short for detection model, and is used for detecting cracks on the surface of precast concrete; the input of the detection model is: shooting images of precast concrete, and outputting the shooting images as follows: and labeling the image of the crack, namely labeling the image of the crack.
First detection model
Referring to fig. 1, 3 and 4, the first detection model proposed by the present invention is improved on the conventional YOLOv model, and the improvement mode includes the following steps S1-S2.
S1, constructing an LW module, wherein the LW module comprises an average pooling layer (mean-pooling), a maximum pooling layer (max-pooling), a dimension superposition unit and a fifth Concat unit; the fifth Concat unit is provided with three input ends; the LW module is provided with two input ends, a first input end of the LW module is respectively connected with an input end of an average pooling layer, an input end of a maximum pooling layer and a first input end of a fifth Concat unit, an output end of the average pooling layer and an output end of the maximum pooling layer are both connected with an input end of a dimension superposition unit, an output end of the dimension superposition unit is connected with a second input end of the fifth Concat unit, and a third input end of the fifth Concat unit is connected with a second input end of the LW module; the output of the fifth Concat unit serves as the output of the LW module.
In this way, the data nxpxq input by the first input end of the LW module is subjected to average pooling and maximum pooling respectively and then subjected to dimension superposition processing, and dimension superposition data nxx (p/2) × (q/2) and data input by the two input ends of the LW module are subjected to dimension splicing through a fifth Concat unit and then serve as output data 2nx2px2q of the LW module. In the LW module, a fifth Concat unit performs weighted splicing on the input 3 paths of data, and the parameter weights W 1、W2 and W 2 on the three channels are set values.
S2, replacing a first Upsample unit and a first Concat unit in the YOLOv model with an LW module, and recording the LW module as a first LW module; replacing a second Upsample unit and a second Concat unit in the YOLOv model with an LW module, and recording the LW module as a second LW module; the first input end of the first LW module is connected with the output end of the sixth Conv unit, the second input end of the first LW module is connected with the output end of the third C3 module, and the output end of the first LW module is connected with the input end of the fifth C3 module; the first input end of the second LW module is connected with the output end of the seventh Conv unit, the second input end of the second LW module is connected with the output end of the second C3 module, and the output end of the second LW module is connected with the input end of the sixth C3 module.
In the embodiment, the LW module performs three paths of data splicing, wherein one path is data input by the LW module, the data participate in the splicing, a larger characteristic diagram is reserved, and small target detection is facilitated; the other path is data which is subjected to average pooling and maximum pooling and then dimension superposition on the data input by the LW module, the average pooling is beneficial to extracting overall characteristics, the maximum pooling is beneficial to extracting the most prominent characteristics, and the combination of the two ensures the overall characteristic extraction of the data, thereby being beneficial to improving the detection precision.
Second detection model
Referring to fig. 5 and 6, a second detection model proposed by the present invention is further improved on the first detection model, and the improvement manner is that: and replacing the first C3 module and the fourth C3 module with a first MMT module and a second MMT module respectively.
The first MMT module and the second MMT module have the same structure and are collectively called an MMT module, and comprise Bottleneck units, multiAttenCat units and tenth Conv units which are sequentially connected; the input end of the MMT module is respectively connected with the input end of the Bottleneck unit and the input end of the MultiAttenCat unit, and the output end of the tenth Conv unit is used as the output end of the MMT module.
The input data i x j x k of the MMT module is converted into data 4i x j x k through Bottleneck units; the MultiAttenCat unit samples and concatenates the input data ixjxk and the data 4ixjxk to generate data ixjxk as output data.
In the embodiment, a lighter MMT module is introduced into a backbone network to replace two C3 modules, so that the data processing speed is improved.
The main function of the C3 module is to improve the information flow in the model by cross-phase partial connection; and C3, the input data is convolved and then input into Bottleneck network for processing, and the output result of Bottleneck network is spliced with the input data.
The MMT module in this embodiment splices the processing result of the Bottleneck network on the input data with the input data through the MultiAttenCat unit, so as to fuse more information. The MultiAttenCat unit can manually set weights of different inputs, so that the network can select channels and weights in a most adaptive mode, and the characteristics of interference to the output can be restrained, thereby being beneficial to target detection.
Third kind of detection model
Referring to fig. 7, a third detection model proposed by the present invention is further improved on the second detection model, and the improvement manner is that: the fourth Conv unit and the fifth Conv unit were each replaced with RepVGG units.
The fourth Conv unit and the fifth Conv unit are two convolution modules with the largest parameter number in the original YOLOv model, and in the embodiment, the fourth Conv unit and the fifth Conv unit are subjected to light weight processing by replacing the RepVGG unit, so that the accuracy of the model is improved under the condition that the parameter number is reduced.
The three detection models described above are validated in connection with the specific examples below.
In this embodiment, the dataset for target detection includes 1371 concrete damage images captured using a high-resolution camera, the concrete damage images being captured under different lighting conditions, depicting concrete pavements with different flatness. In this example, each crack image was manually annotated as a binary image using Photoshop and cropped to obtain a resolution of 512×512. That is, the samples in this embodiment are: the concrete damage image marked with the crack image is a binary image with a resolution of 512×512.
Concrete cracking includes three modes, namely longitudinal cracking, transverse cracking, and fatigue cracking, also referred to as longitudinal cracking, transverse cracking, and fatigue cracking, as shown in fig. 8.
In this embodiment, the data set is randomly divided into a training set and a verification set, and the training set and the verification set respectively contain 960 and 411 different crack images, as shown in table 1.
Table 1 number of images per lesion type in self-built dataset
In this embodiment, the model evaluation metrics include: precision, recall, average precision (mAP), F1 score, gigabit per second floating point operand (GFLOPs), and parameter number (Params).
The greater the accuracy, recall, and mAP values, the greater the accuracy of crack detection, the smaller the Params and GFLOPs values, and the lower the computational power required for the model. For F1, a value of 1 indicates optimal performance.
In this example, the first test model is denoted YOLOv-L, the second test model is denoted YOLOv-ML, and the third test model is denoted YOLOv-RML; in this embodiment, the models Fast R-CNN, YOLOv5, YOLOv, YOLOv, and YOLOv8 are also selected as comparison models to verify the performance of the three detection models by data comparison of the five comparison models with the three detection models.
In this embodiment, a training set is used to train three detection models and five comparison models.
In this embodiment, as the number of iterations of the model increases, the loss curves of the three detection models are shown in fig. 9, fig. 10, and fig. 11, respectively, where the scattered points show the loss performance of the model on the training set and the loss performance of the model on the verification set. As can be seen in conjunction with fig. 9-11, the three test models YOLOv-L, YOLOv5-ML and YOLOv5-RML, model losses tended to saturate after approximately 100 training steps, with a final loss value of 0.017 for YOLOv RML.
In this example, after training of the three detection models and the five comparison models was completed, model performance was verified on a verification set, and the results are shown in table 2.
Table 2: comparison of model verification results
As can be seen from table 2, in terms of model accuracy, all three detection models were higher than 0.9, and all five comparison models were lower than 0.9; in terms of recall, all three detection models are higher than 0.86, and all five comparison models are lower than 0.84; on average, the three detection models are all higher than 0.93, and the five comparison models are all lower than or equal to 0.92; on the F1 fraction, all three detection models are higher than 0.89, and all five comparison models are lower than 0.86; in terms of parameter number, all three detection models are lower than 5.61, and all five comparison models are higher than 7.02.
In particular, compared with the original model YOLOv, the average precision of the third detection model YOLOv-RML is improved by 6.86%, the reasoning time is reduced by 4.82%, and the model weight is reduced by 18.23%; the improvement in precision, recall, average precision, and F1 score was 3.28%, 8.46%, 3.79%, and 5.89%, respectively, compared to YOLOv. Therefore, the third detection model provided by the invention has better performance than YOLOv in the surface detection of the concrete prefabricated member, and greatly promotes the technical progress of the surface detection of the concrete prefabricated member.
Therefore, the three detection models provided by the invention have higher precision than the existing comparison models, the convergence speed is also better than that of most of the existing comparison models, and the comparison model YOLOv with higher individual convergence speed has larger difference with any detection model in precision.
Referring to fig. 12, in this embodiment, the average accuracy (area under the P-R curve) of each model in table 2 is further shown by the P-R curve, and the larger the area under the P-R curve, the better the model performance, and it can be seen that the performance of the third detection model proposed by the present invention is more excellent than YOLOv.
In this embodiment, the detection accuracy of the trained detection model in the different types of cracks is further verified on the verification set. For ease of representation, the transverse cracks are labeled with D00, the longitudinal cracks are labeled with D10, and the fatigue cracks are labeled with D20. The prediction accuracy of the detection model Yolov-L for the different types of crack images is shown in the confusion matrix of fig. 13, the prediction accuracy of the detection model Yolov-ML for the different types of crack images is shown in the confusion matrix of fig. 14, and the prediction accuracy of the detection model Yolov-RML for the different types of crack images is shown in the confusion matrix of fig. 15. In combination with the confusion matrix, the third detection model YOLOv RML showed better performance in terms of accuracy, recall, and mAP50 on longitudinal, transverse, and fatigue cracks than the other cases.
It will be understood by those skilled in the art that the present invention is not limited to the details of the foregoing exemplary embodiments, but includes other specific forms of the same or similar structures that may be embodied without departing from the spirit or essential characteristics thereof. The present embodiments are, therefore, to be considered in all respects as illustrative and not restrictive, the scope of the invention being indicated by the appended claims rather than by the foregoing description, and all changes which come within the meaning and range of equivalency of the claims are therefore intended to be embraced therein. Any reference sign in a claim should not be construed as limiting the claim concerned.
Furthermore, it should be understood that although the present disclosure describes embodiments, not every embodiment is provided with a separate embodiment, and that this description is provided for clarity only, and that the disclosure is not limited to the embodiments described in detail below, and that the embodiments described in the examples may be combined as appropriate to form other embodiments that will be apparent to those skilled in the art.
The technology, shape, and construction parts of the present invention, which are not described in detail, are known in the art.
Claims (10)
1. The training method of the precast concrete crack detection model is characterized by comprising the following steps of:
Firstly, a basic model and a learning sample are acquired, wherein the learning sample is an associated crack shooting image and a crack labeling image; the basic model is based on YOLOv model, the Upsample unit and the Concat unit which are connected are replaced by LW module, the LW module firstly carries out pooling treatment on the input data of Upsample unit in YOLOv model, then carries out three-way splicing on the pooled data and two paths of input of Upsample unit and Concat unit combination module in YOLOv model, and then outputs;
Then the basic model learns the learning sample to iterate the model parameters until convergence; and taking the converged basic model as a precast concrete crack detection model, inputting the model into a shooting image, and outputting the model into a crack labeling image.
2. The training method of the precast concrete crack detection model according to claim 1, wherein the LW module includes an average pooling layer, a maximum pooling layer, a dimension superposition unit, and a fifth Concat unit; the fifth Concat unit is provided with three input ends; the LW module is provided with two input ends; in the YOLOv model, the input end of the Upsample unit in the Upsample unit and Concat unit combined module is marked as a first input end of the combined module, and the input end of the Concat unit connected with the second C3 module is marked as a second input end of the combined module; the first input end of the LW module replaces the first input end of the combination module, and the second input end of the LW module replaces the second input end of the combination module;
The first input end of the LW module is respectively connected with the input end of the average pooling layer, the input end of the maximum pooling layer and the first input end of the fifth Concat unit, the output end of the average pooling layer and the output end of the maximum pooling layer are both connected with the input end of the dimension superposition unit, the output end of the dimension superposition unit is connected with the second input end of the fifth Concat unit, and the third input end of the fifth Concat unit is connected with the second input end of the LW module; the output of the fifth Concat unit serves as the output of the LW module.
3. The training method of precast concrete crack detection model according to claim 1, wherein in YOLOv models, modules of the same structure are named sequentially along the data stream direction; the basic model is based on YOLOv model, the first C3 module and the fourth C3 module in the data flow direction are replaced by MMT modules, and the MMT modules comprise Bottleneck units, multiAttenCat units and tenth Conv units which are sequentially connected; the input end of the MMT module is respectively connected with the input end of the Bottleneck unit and the input end of the MultiAttenCat unit, and the output end of the tenth Conv unit is used as the output end of the MMT module.
4. A training method for a precast concrete crack detection model as claimed in claim 3, characterized in that the base model is further replaced by RepVGG units for both the fourth Conv unit and the fifth Conv unit on the basis of YOLOv model.
5. The training method of a precast concrete crack detection model according to claim 1, wherein the iterative process of model parameters comprises the steps of:
st1, dividing a learning sample into a training set and a testing set;
st2, extracting a plurality of samples from the training set to serve as training samples, and enabling a basic model to learn the training samples so as to iterate model parameters;
St3, extracting a plurality of samples from the test set to serve as test samples, enabling a basic model to predict the test samples and outputting crack marking images;
St4, calculating the loss of the basic model on the test sample, and judging whether the basic model converges or not; if not, returning to the step St2; if yes, the base model is fixed.
6. The training method of a precast concrete crack detection model according to claim 5, wherein in St4, the loss of the base model is a cross entropy loss or a mean square error loss.
7. A precast concrete crack detection method employing the training method of the precast concrete crack detection model according to any one of claims 1 to 6, characterized in that firstly, a detection model is obtained by employing the training method of the precast concrete crack detection model according to any one of claims 1 to 6; photographing the target to be detected to obtain a target image; and inputting the target image into a detection model, and outputting a crack labeling image by the detection model to label the crack type.
8. The precast concrete crack detection method of claim 7, wherein the crack type includes: transverse cracks, longitudinal cracks, and fatigue cracks.
9. A precast concrete crack detection system, comprising a memory and a processor, wherein the memory stores a computer program, the processor is connected with the memory, and the processor is used for executing the computer program to implement the training method of the precast concrete crack detection model according to any one of claims 1-6.
10. A readable medium, characterized in that a computer program is stored, which computer program, when executed, is adapted to carry out a training method of a precast concrete crack detection model according to any one of claims 1-6.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202410432015.9A CN118036476B (en) | 2024-04-11 | 2024-04-11 | Precast concrete crack detection model, method, system and readable medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202410432015.9A CN118036476B (en) | 2024-04-11 | 2024-04-11 | Precast concrete crack detection model, method, system and readable medium |
Publications (2)
Publication Number | Publication Date |
---|---|
CN118036476A true CN118036476A (en) | 2024-05-14 |
CN118036476B CN118036476B (en) | 2024-07-02 |
Family
ID=90991696
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202410432015.9A Active CN118036476B (en) | 2024-04-11 | 2024-04-11 | Precast concrete crack detection model, method, system and readable medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN118036476B (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN118279567A (en) * | 2024-05-30 | 2024-07-02 | 合肥工业大学 | Construction method of target detection model and road crack detection method |
Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2020046213A1 (en) * | 2018-08-31 | 2020-03-05 | Agency For Science, Technology And Research | A method and apparatus for training a neural network to identify cracks |
CN114998756A (en) * | 2022-05-17 | 2022-09-02 | 大连理工大学 | Yolov 5-based remote sensing image detection method and device and storage medium |
CN116468716A (en) * | 2023-04-26 | 2023-07-21 | 山东省计算中心(国家超级计算济南中心) | YOLOv 7-ECD-based steel surface defect detection method |
CN116486231A (en) * | 2023-04-24 | 2023-07-25 | 佛山科学技术学院 | Concrete crack detection method based on improved YOLOv5 |
CN116485709A (en) * | 2023-02-01 | 2023-07-25 | 武汉科技大学 | Bridge concrete crack detection method based on YOLOv5 improved algorithm |
CN116993732A (en) * | 2023-09-27 | 2023-11-03 | 合肥工业大学 | Gap detection method, system and storage medium |
CN117078624A (en) * | 2023-08-18 | 2023-11-17 | 广西大学 | Light-weight concrete crack detection method and device based on multidimensional attention module |
-
2024
- 2024-04-11 CN CN202410432015.9A patent/CN118036476B/en active Active
Patent Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2020046213A1 (en) * | 2018-08-31 | 2020-03-05 | Agency For Science, Technology And Research | A method and apparatus for training a neural network to identify cracks |
CN114998756A (en) * | 2022-05-17 | 2022-09-02 | 大连理工大学 | Yolov 5-based remote sensing image detection method and device and storage medium |
CN116485709A (en) * | 2023-02-01 | 2023-07-25 | 武汉科技大学 | Bridge concrete crack detection method based on YOLOv5 improved algorithm |
CN116486231A (en) * | 2023-04-24 | 2023-07-25 | 佛山科学技术学院 | Concrete crack detection method based on improved YOLOv5 |
CN116468716A (en) * | 2023-04-26 | 2023-07-21 | 山东省计算中心(国家超级计算济南中心) | YOLOv 7-ECD-based steel surface defect detection method |
CN117078624A (en) * | 2023-08-18 | 2023-11-17 | 广西大学 | Light-weight concrete crack detection method and device based on multidimensional attention module |
CN116993732A (en) * | 2023-09-27 | 2023-11-03 | 合肥工业大学 | Gap detection method, system and storage medium |
Non-Patent Citations (4)
Title |
---|
WEI JIA, ETC.: "Real-time automatic helmet detection of motorcyclists in urban traffic using improved YOLOv5 detector", 《IET IMAGE PROCESSING》, 31 December 2021 (2021-12-31), pages 3623 - 3637 * |
YUAN DAI, ETC.: "YOLO-Former: Marrying YOLO and Transformer for Foreign Object Detection", 《IEEE TRANSACTIONS ON INSTRUMENTATION AND MEASUREMENT》, 31 December 2022 (2022-12-31), pages 1 - 14 * |
董学恒: "车载式路面异常检测定位系统及方法研究", 《中国优秀硕士学位论文全文数据库 (工程科技Ⅰ辑)》, 15 June 2023 (2023-06-15), pages 026 - 27 * |
阿里云: "YOLOv5改进 | Neck篇 | 利用ASF-YOLO改进特征融合层(适用于分割和目标检测)", 《HTTPS://DEVELOPER.ALIYUN.COM/ARTICLE/1438145》, 7 February 2024 (2024-02-07), pages 1 - 4 * |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN118279567A (en) * | 2024-05-30 | 2024-07-02 | 合肥工业大学 | Construction method of target detection model and road crack detection method |
CN118279567B (en) * | 2024-05-30 | 2024-08-13 | 合肥工业大学 | Construction method of target detection model and road crack detection method |
Also Published As
Publication number | Publication date |
---|---|
CN118036476B (en) | 2024-07-02 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN118036476B (en) | Precast concrete crack detection model, method, system and readable medium | |
CN109035233B (en) | Visual attention network system and workpiece surface defect detection method | |
CN111507990B (en) | Tunnel surface defect segmentation method based on deep learning | |
CN108961235B (en) | Defective insulator identification method based on YOLOv3 network and particle filter algorithm | |
CN109493346B (en) | Stomach cancer pathological section image segmentation method and device based on multiple losses | |
CN109272500B (en) | Fabric classification method based on adaptive convolutional neural network | |
CN107403197A (en) | A kind of crack identification method based on deep learning | |
CN114419449B (en) | Self-attention multi-scale feature fusion remote sensing image semantic segmentation method | |
CN112750129B (en) | Image semantic segmentation model based on feature enhancement position attention mechanism | |
CN112489164B (en) | Image coloring method based on improved depth separable convolutional neural network | |
CN111079826B (en) | Construction progress real-time identification method integrating SLAM and image processing | |
CN112967271A (en) | Casting surface defect identification method based on improved DeepLabv3+ network model | |
CN111178392A (en) | Aero-engine hole-exploring image damage segmentation method based on deep neural network | |
CN114972216A (en) | Construction method and application of texture surface defect detection model | |
CN114612803B (en) | Improved CENTERNET transmission line insulator defect detection method | |
CN118134785A (en) | Image fusion method based on feature decomposition strengthening and gradient supplementing | |
CN114359167B (en) | Insulator defect detection method based on lightweight YOLOv < 4 > under complex scene | |
CN114581789A (en) | Hyperspectral image classification method and system | |
CN113744205B (en) | End-to-end road crack detection system | |
CN116778346B (en) | Pipeline identification method and system based on improved self-attention mechanism | |
CN112270370B (en) | Vehicle apparent damage assessment method | |
CN116977636A (en) | Large-scale point cloud semantic segmentation method for three-dimensional point cloud | |
CN114821368B (en) | Electric power defect detection method based on reinforcement learning and transducer | |
CN113947567B (en) | Defect detection method based on multitask learning | |
CN111899161A (en) | Super-resolution reconstruction 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 |