Unmanned aerial vehicle visual detection and evaluation method and system for corrosion of high-altitude steel structure
1. The unmanned aerial vehicle visual detection and evaluation method for high-altitude steel structure corrosion is characterized by comprising the following steps:
carrying a Camera Link industrial Camera on an unmanned aerial vehicle flying platform to serve as a visual detection device, and acquiring large high-altitude steel structure images to be detected in an all-dimensional and multi-angle manner;
secondly, transmitting the acquired high-altitude steel structure image to an edge computing image processing module based on an FPGA (field programmable gate array) or an embedded GPU (graphic processing unit) through a Camera Link interface;
thirdly, detecting whether the large-scale high-altitude steel structure image has corrosion defects or not by using an improved YOLOV3 deep neural network classification model; when corrosion defects are detected, automatically generating the size of an anchor frame by a K-means clustering method, and marking a corrosion target frame area;
fourthly, performing image segmentation on the detected corrosion target frame region by adopting an Otsu threshold segmentation and mathematical morphology method, extracting a connected domain inversion defect shape, and counting the corrosion area by using a pixel point method; setting a weight factor according to the color depth of the corroded part, calculating a weighted corrosion rate, and carrying out corrosion grading evaluation on the detection equipment by referring to an ASTM standard; the weighted corrosion rate is the ratio of the corrosion area to the area of the corrosion target frame area calculated under the condition of considering the color depth weight factor of the corroded part.
2. The unmanned aerial vehicle visual inspection and evaluation method for corrosion of high-altitude steel structures as claimed in claim 1, further comprising a fifth step of performing sound and light alarm when a defect is detected and automatically storing an image of the defect.
3. The unmanned aerial vehicle visual detection and evaluation method for high-altitude steel structure corrosion according to claim 1, wherein in the third step, anchor clustering is realized by a K-means clustering method to generate the size of an anchor frame, and the specific steps are as follows:
(1) inputting the actual width and height data sets of all the boundary boxes of the corrosion target box areaT:
(1)
Wherein the content of the first and second substances,is shown asiThe actual width of the bounding box of the area of the etch target frame,is shown asiActual height of the boundary frame of the area of the corrosion target frame;nthe number of all the etching target frame areas;
(2) fromTIn the random selectionmEach element as initial cluster center:
(2)
wherein the content of the first and second substances,is thatTIs selected from the group consisting of (a) a subset of,i、j、m、nare all positive integers, andmis less than or equal ton;
(3) ComputingTCross-over ratio of each element to cluster centerThe following are:
(3)
is provided with;
Then;
(4) Computing newCluster center of (2):wherein;;
(5) If the new cluster center is the same as the original cluster center, the algorithm is terminated and the calculation result of the step (4) is output as the final cluster centerAnd (4) the updated anchor frame size is obtained, otherwise, the step (3) is returned to.
4. The unmanned aerial vehicle visual inspection and evaluation method for high altitude steel structure corrosion according to claim 1, wherein in step three, the YOLOV3 algorithm is further modified as follows: replacing a Darknet-53 network with a Darknet-19 network to serve as a backbone of an improved YOLOv3 network, deleting repeated layers in YOLOv3-Scale1, YOLOv3-Scale2 and YOLOv3-Scale3, thereby reducing detection time, increasing two feature connection paths, fully utilizing features extracted from the network, and qualitatively detecting whether corrosion defects exist in a steel structure image or not by a multi-Scale sliding window searching method; calculating the probability of judging as the corrosion defect by adopting Sigmoid logistic regression function, and when the probability is greater than a set threshold valueTAnd then, determining the defect of the cover as a corrosion defect, marking the defect by using the target frame, and marking the defect type and the probability value.
5. The unmanned aerial vehicle visual inspection and evaluation method for high altitude steel structure corrosion according to claim 4, wherein in the third step, the training step of the improved Yolov3 deep neural network classification model is as follows:
(1) constructing a high-altitude steel structure corrosion defect training data set: collecting a large number of corrosion images of steel structures of port cranes, wind power equipment, towers, large amusement facilities, boilers, steel bridges and large ship equipment and normal images without corrosion defects to form a data set, then enhancing the data set in a turning, translation and angular rotation mode, and manually marking information of image samples through drawing library management and marking software and multiple ports to construct a training data set;
(2) deep neural network learning: for the improved Yolov3 deep neural network classification model, learning is carried out by using a training data set, the sum of loss functions of all training data is calculated according to formula (4), and then the sum of the loss functions is made through a plurality of times of learningEFinding the optimal model parameter to obtain the optimal corrosion defect classification model;
(4)
wherein the number of training data isRThe number of the main components is one,is shown aslThe first of the training datakThe value of each of the elements is,representing the output of the neural network.
6. The unmanned aerial vehicle visual detection and evaluation method for corrosion of high-altitude steel structures as claimed in claim 1, wherein in the fourth step, the number of occupied pixels in the corrosion region is counted by using a pixel point method to obtain the area of the corroded pixelAnd calculating the corrosion rateASaid corrosion rateAPixel area for corrosionAnd area of the etching target frameThe ratio of (A) to (B) is as in formula (5):
(5)。
7. the unmanned aerial vehicle visual inspection and evaluation method for high-altitude steel structure corrosion according to claim 6, wherein in the fourth step, a weighting factor is set according to the color depth of a corroded part in the image, and the weighted corrosion rate of each corrosion target frame region is calculatedThe specific method comprises the following steps:
(1) dividing each corrosion target frame area into different color shadesNIn grades, i.e. divided intoNA corrosion area, weightFrom heavy to light are respectively arranged as;
(2) The weight setting step comprises extracting gray level image of each erosion region, obtaining gray level histogram, and setting gray level of erosion part pixelThe sorting is carried out from small to large,to erode the pixel coordinates, the minimum gray value is obtainedAnd most preferablyHigh valueThe weight of each erosion area is set according to equation (6):
(6)
(3) calculating a weighted corrosion rateAs in equation (7):
(7)
in the formula (I), the compound is shown in the specification,S 1,S 2,......,S N indicating the area of the pixel corresponding to different erosion areas.
8. The unmanned aerial vehicle visual inspection and evaluation method for corrosion of high-altitude steel structures as claimed in claim 7, wherein in the fourth step, the weighted corrosion rate is calculated according to equations (6) - (7)The extent of corrosion in each corrosion target box area is graded with reference to the ASTM standards in Table 1, and areas requiring repainting are suggested according to the relevant grade to reduce the probability of corrosion propagation and section loss
TABLE 1 ASTM Corrosion Performance grades
。
9. The unmanned aerial vehicle visual detection and evaluation system for corrosion of the high-altitude steel structure is characterized by comprising an unmanned aerial vehicle flight platform, a Camera Link industrial Camera, edge computing equipment, wireless transmission equipment, ground terminal display equipment and an alarm assembly which are in telecommunication connection;
the unmanned aerial vehicle flight platform carries a Camera Link industrial Camera to acquire images of a steel structure to be detected in real time, and transmits the images to the edge computing equipment in real time through a Camera Link interface for image processing;
the edge computing device comprises a storage module and an edge computing image processing module; the storage module is used for storing the steel structure image to be detected acquired by the unmanned aerial vehicle and transmitting the image to the edge calculation image processing module; the edge calculation image processing module is used for processing image data of an image to be detected, operating the method of any one of claims 1 to 8 to detect, identify and evaluate corrosion defects in a grading way, and marking the defects; then the image detection result is transmitted to a ground terminal display device through a wireless transmission device to be displayed, and meanwhile, acousto-optic alarm is carried out through an alarm component.
Background
In-service large steel structure corrosion represented by port cranes, large-scale amusement facilities, boilers, storage tanks, steel bridges, towers, wind power equipment and the like can greatly reduce fatigue allowable stress and the cold brittleness resistance of steel, reduce the bearing capacity of the steel structure, reduce the service time of the equipment, lead to structural fracture and crash in serious cases and cause serious casualty accidents. The original characteristics of color, appearance, texture and the like of a steel structure are changed after corrosion, according to the characteristics of a corrosion defect different from a normal area, a color space model and a color component with the most obvious corrosion color characteristics relative to a background area can be selected by using color model conversion methods such as HIS, RGB, HSV, YCrCb, LAB and the like, and image segmentation is carried out to realize corrosion detection, but threshold segmentation seriously depends on manual setting of a threshold, the generalization capability of different data sets is poor, misjudgment of some background areas similar to the corrosion color is possibly included, the shape difference of corrosion is large, the shapes of corrosion parts are different, and the corrosion is difficult to detect; the defect characteristics in the image can be manually designed and extracted, and the classifier model is adopted to classify and identify the defects, so that the problem of manually adjusting threshold parameters in the traditional image segmentation detection method is solved, but the definition of the characteristics by people is influenced by experience, the robustness of the manually designed defect characteristics to diversity change is not high, and when the high-level characteristics of the image cannot be expressed by a manual design algorithm, the identification rate is greatly reduced.
The deep learning obtains the target characteristics through automatic learning, has strong self-adaptive capacity and higher detection efficiency, and gradually becomes a mainstream detection algorithm. The convolutional neural network detection algorithm represented by fast R-CNN directly predicts the width and height of the anchor frame, tends to select a larger anchor frame, is easy to generate errors, and causes the anchor frame to exceed the range of image pixel coordinates, and causes gradient instability in the training process due to the larger value range of the predicted value; such methods typically employ a fixed anchor frame setup, suitable for creating special predictors, but these predictors do not detect objects of different sizes in a particular dataset well; in addition, the current defect detection method based on deep learning generally stays in the classification and judgment stage of defects, and a theory and a method for carrying out quantitative identification and damage degree evaluation on corrosion are lacked.
Disclosure of Invention
The invention aims to provide an unmanned aerial vehicle visual detection and evaluation method and system for high-altitude steel structure corrosion, and solves the technical problems that corrosion defects of large high-altitude steel structures such as cranes, towers, wind power blades and the like are variable in form, complex in background and difficult to detect and quantitatively identify on line.
In order to solve the problems, the invention is realized by the following technical scheme:
the unmanned aerial vehicle visual detection and evaluation method for the corrosion of the high-altitude steel structure comprises the following steps:
carrying a Camera Link industrial Camera as a visual detection device through an unmanned aerial vehicle flight platform, and acquiring large-scale high-altitude steel structure images of a crane, a tower, a wind power blade and the like in an all-around and multi-angle manner;
secondly, transmitting the acquired high-altitude steel structure image to an edge computing image processing module based on an FPGA (field programmable gate array) or an embedded GPU (graphic processing unit) through a Camera Link interface;
thirdly, detecting whether the large-scale high-altitude steel structure image has corrosion defects or not by using an improved YOLOV3 deep neural network classification model; when corrosion defects are detected, automatically generating the size of an anchor frame by a K-means clustering method, and marking a corrosion target frame area;
and fourthly, performing image segmentation on the detected corrosion target frame area by adopting an Otsu threshold segmentation and mathematical morphology method, extracting the inversion defect shape of the connected domain, counting the corrosion area by utilizing a pixel point method, setting a weight factor according to the color depth of the corroded part, calculating the ratio of the weight factor to the area of the corrosion target frame area as a weighted corrosion rate, and performing corrosion grading evaluation by referring to an ASTM standard.
And further optimizing, and further comprising a fifth step of carrying out sound-light alarm when the defect is detected and automatically storing the defect image.
By designing the alarm module, when the defect is identified, sound and light alarm is carried out to remind detection personnel in time, and the defect position of the equipment is marked, maintained or replaced. By automatically storing the defect images, the number of samples of the training data set is increased, and the detection and identification precision is improved.
Further optimization, in the third step, anchor clustering is realized through a K-means clustering method, and the size of an anchor frame is generated, and the specific steps are as follows:
(1) inputting the actual width and height data sets of all the boundary boxes of the corrosion target box areaT:
(1)
Wherein the content of the first and second substances,is shown asiThe actual width of the bounding box of the area of the etch target frame,is shown asiActual height of the boundary frame of the area of the corrosion target frame;nthe number of all the etching target frame areas;
(2) fromTIn the random selectionmEach element as initial cluster center:
(2)
wherein the content of the first and second substances,is thatTIs selected from the group consisting of (a) a subset of,i、j、m、nare all positive integers, andmis less than or equal ton;
(3) ComputingTCross-over ratio of each element to cluster centerThe following are:
(3)
is provided with;
Then;
(4) Calculating a new cluster center:wherein;;
(5) If the new cluster center is the same as the original cluster center, the algorithm is terminated and the calculation result of the step (4) is output as the final cluster centerAnd (4) the updated anchor frame size is obtained, otherwise, the step (3) is returned to.
In the target detection algorithm based on the anchor, the anchor is generally designed by people. For example, in SSD and Faster-RCNN, 9 anchors with different sizes and aspect ratios are designed, however, the artificially designed anchors have the disadvantage that the anchors cannot be guaranteed to be well suitable for a data set, and if the difference between the size of the anchors and the size of a target is large, the detection effect of a model is influenced.
Therefore, the K-means clustering is used for replacing manual design, a group of anchors more suitable for the data set are automatically generated by clustering the bounding box of the training set, and the detection effect of the network can be better. Therefore, the final cluster center is the size of the updated anchor.
Further optimization, in the third step, the YOLOV3 algorithm is further modified as follows: using Darknet-19 network instead of Darknet-53 network as backbone for improving YOLOv3 network, deleting duplicate layers in YOLOv3-Scale1, YOLOv3-Scale2 and YOLOv3-Scale3, thereby reducing detection time, increasing two feature connection paths, and fully improving detection efficiencyCarrying out qualitative detection on whether corrosion defects exist in the steel structure image or not by utilizing the characteristics extracted from the network and a multi-scale sliding window searching method; calculating the probability of judging as the corrosion defect by adopting Sigmoid logistic regression function, and when the probability is greater than a set threshold valueTAnd then, determining the defect of the cover as a corrosion defect, marking the defect by using the target frame, and marking the defect type and the probability value.
Further optimization, the training steps of the improved Yolov3 deep neural network classification model are as follows:
(1) constructing a high-altitude steel structure corrosion defect training data set: collecting a large number of corrosion images of steel structures of port cranes, wind power equipment, towers, large amusement facilities, boilers, steel bridges and large ship equipment and normal images without corrosion defects to form a data set, then enhancing the data set in a turning, translation and angular rotation mode, and manually marking information of image samples through drawing library management and marking software and multiple ports to construct a training data set;
(2) deep neural network learning: for the improved Yolov3 deep neural network classification model, learning is carried out by using a training data set, the sum of loss functions of all training data is calculated according to formula (4), and then the sum of the loss functions is made through a plurality of times of learningEFinding the optimal model parameter to obtain the optimal corrosion defect classification model;
(4)
wherein the number of training data isRThe number of the main components is one,is shown aslThe first of the training datakThe value of each of the elements is,representing the output of the neural network.
Further optimization, in the fourth step, a pixel point method is used for counting the corrosion areaOccupying pixel number in the domain to obtain the pixel area of corrosionAnd calculating the corrosion rateASaid corrosion rateAPixel area for corrosionAnd area of the etching target frameThe ratio of (A) to (B) is as in formula (5):
(5)
further optimizing, in the fourth step, in order to evaluate the corrosion degree more objectively and accurately, a weight factor is set according to the color depth of the corroded part in the image, and the weighted corrosion rate of each corrosion target frame area is calculatedThe specific method comprises the following steps:
(1) dividing each corrosion target frame area into different color shadesNIn grades, i.e. divided intoNA corrosion area, weightFrom heavy to light are respectively arranged as;
(2) The weight setting step comprises extracting gray level image of each erosion region, obtaining gray level histogram, and setting gray level of erosion part pixelThe sorting is carried out from small to large,to erode the pixel coordinates, the minimum gray value is obtainedAnd maximum valueThe weight of each erosion area is set according to equation (6):
(6)
(3) calculating a weighted corrosion rateAs in equation (7):
(7)
in the formula (I), the compound is shown in the specification,S 1,S 2,......,S N indicating the area of the pixel corresponding to different erosion areas.
Further optimized, the weighted corrosion rate is calculated according to the formulas (6) to (7)The extent of corrosion of each corrosion target box area is graded with reference to the ASTM standard in table 1 and areas requiring repainting are suggested according to the relevant grade to reduce the probability of corrosion propagation and section loss.
TABLE 1 ASTM Corrosion Performance grades
Etching ofGrade
Weighted corrosion rate () Range of
Area ratio of heavy paint
10
< 0.01%
0
9
0.01% 0.1%
0
8
0.1%0.25%
0
7
0.25%0.5%
0
6
0.5% 1.0%
8%
5
1.0%2.5%
18%
4
2.5%5%
40%
3
5%10%
60%
2
10%25%
100%
1
25%50%
100%
0
50%100%
100%
Unmanned aerial vehicle visual detection and evaluation system of high altitude steel construction corruption, unmanned aerial vehicle flight platform, Camera Link industry Camera, edge computing equipment, wireless transmission equipment, ground terminal display device and the warning subassembly including telecommunication connection.
The unmanned aerial vehicle flight platform carries a Camera Link industrial Camera to acquire images of a steel structure to be detected in real time, and transmits the images to the edge computing equipment in real time through a Camera Link interface for image processing;
the edge computing device comprises a storage module and an edge computing image processing module; the storage module is used for storing the steel structure image to be detected acquired by the unmanned aerial vehicle and transmitting the image to the edge calculation image processing module; and the edge calculation image processing module performs image data processing on the image to be detected, operates the detection methods in the third step and the fourth step to perform corrosion defect detection, identification and grading evaluation, and marks the defects. Then the image detection result is transmitted to a ground terminal display device through a wireless transmission device to be displayed, and meanwhile, acousto-optic alarm is carried out through an alarm component.
Compared with the prior art, the invention has the beneficial effects that:
1) aiming at the characteristics of complex and changeable corrosion forms, irregular shapes, unbalanced sizes, complex backgrounds and the like, the improved YOLOV3 deep neural network classification model is provided, the sizes of anchor frames are automatically generated by a K-means clustering method, the capability of the model for detecting corrosion defects of different sizes and shapes is improved, the model compression and optimized speed acceleration are carried out on the YOLOv3 network, and the detection precision and speed are improved; on the basis, a grading evaluation algorithm based on Otsu threshold segmentation and corrosion area and color weighted corrosion rate identification is provided, a corrosion target frame area detected by a defect classification network is segmented by adopting an Otsu threshold segmentation and mathematical morphology method, the area of the corrosion area is obtained through pixel point method statistics, a weight factor is set according to the color depth of a corroded part, the ratio of the area of the corroded part to the area of the corrosion target frame area is calculated to be the weighted corrosion rate, corrosion grading evaluation is carried out by referring to an ASTM standard, meanwhile, areas needing repainting are recommended according to related grades, and the probability of corrosion expansion and section loss is reduced.
2) The method is used for detecting, identifying, quantifying and evaluating the metal structure corrosion defects of large-scale mechanical equipment, the detection efficiency can be improved, the scientificity and the accuracy of detection results are improved, meanwhile, places which cannot be detected or are difficult to reach by the unmanned aerial vehicle can be detected and replaced, accidents can be effectively prevented and controlled, the loss of personnel and equipment property is reduced, and the method has important significance for promoting the safety production of enterprises.
Drawings
Fig. 1 is a flowchart of an unmanned aerial vehicle visual inspection and evaluation method for corrosion of a medium-high altitude steel structure according to an embodiment.
FIG. 2 is a result of detecting corrosion defects on a surface of a large steel structure by using the improved YOLOV3 deep neural network model in the first embodiment.
FIG. 3 is a diagram of an image of corrosion defect identification of a certain steel structure; wherein, fig. 3(a) is a diagram of a corrosion target frame 1 detected by a deep neural network model, and fig. 3(b) is a diagram of a segmentation recognition result of a corrosion region of the target frame 1; FIG. 3(c) is a diagram of a corrosion target frame 2 detected by the deep neural network model, and FIG. 3(d) is a diagram of a segmentation recognition result of a corrosion region of the target frame 2; FIG. 3(e) is a diagram of a corrosion target frame 3 detected by the deep neural network model, and FIG. 3(f) is a diagram of a segmentation recognition result of a corrosion region of the target frame 3; FIG. 3(g) is a diagram of a corrosion target frame 4 detected by the deep neural network model, and FIG. 3(h) is a diagram of a segmentation recognition result of a corrosion region of the target frame 4; FIG. 3(i) is a diagram of a corroded target frame 5 detected by the deep neural network model, and FIG. 3(j) is a diagram of a segmentation recognition result of a corroded area of the target frame 5; fig. 3(k) is a diagram of an erosion target frame 6 detected by the deep neural network model, and fig. 3(l) is a diagram of a segmentation recognition result of an erosion region of the target frame 6.
FIG. 4 is a block diagram of the unmanned aerial vehicle visual inspection and evaluation system for high-altitude steel structure corrosion.
Detailed Description
The technical solution in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention.
The first embodiment is as follows:
as shown in fig. 1, the unmanned aerial vehicle visual detection and evaluation method for high-altitude steel structure corrosion comprises the following steps:
carrying a Camera Link industrial Camera as a visual detection device through an unmanned aerial vehicle flight platform, and acquiring large-scale high-altitude steel structure images of a crane, a tower, a wind power blade and the like in an all-around and multi-angle manner;
secondly, transmitting the acquired high-altitude steel structure image to an edge computing image processing module based on an FPGA (field programmable gate array) or an embedded GPU (graphic processing unit) through a Camera Link interface;
automatically generating the size of an anchor frame by using an improved YOLOV3 deep neural network classification model through a K-means clustering method, rapidly detecting and classifying corrosion defects on the surfaces of three-dimensional complex steel structures such as box beams, I-beams and trusses in high-altitude steel structure images, and marking out a corrosion target frame area;
and fourthly, performing image segmentation on the detected corrosion target frame area by adopting an Otsu threshold segmentation and mathematical morphology method, extracting the inversion defect shape of the connected domain, counting the corrosion area by utilizing a pixel point method, setting a weight factor according to the color depth of the corroded part, calculating the ratio of the corrosion area to the corrosion target frame area as a weighted corrosion rate, and performing corrosion grading evaluation by referring to an ASTM standard.
And fifthly, when the defect is detected, performing sound-light alarm, and automatically storing the defect image. By designing the alarm module, when the defect is identified, sound and light alarm is carried out to remind detection personnel in time, and the defect position of the equipment is marked, maintained or replaced. By automatically storing the defect images, the number of samples of the training data set is increased, and the detection and identification precision is improved.
In this embodiment, in the third step, anchor clustering is implemented by a K-means clustering method, and the size of the anchor frame is generated, which specifically includes the following steps:
(1) input allActual width and height data set of bounding box of corrosion target frame areaT:
(1)
Wherein the content of the first and second substances,is shown asiThe actual width of the bounding box of the area of the etch target frame,is shown asiActual height of the boundary frame of the area of the corrosion target frame;nthe number of all the etching target frame areas;
(2) fromTIn the random selectionmEach element as initial cluster center:
(2)
wherein the content of the first and second substances,is thatTIs selected from the group consisting of (a) a subset of,i、j、m、nare all positive integers, andmis less than or equal ton;
(3) ComputingTCross-over ratio of each element to cluster centerThe following are:
(3)
is provided with;
Then;
(4) Calculating a new cluster center:wherein;;
(5) If the new cluster center is the same as the original cluster center, the algorithm is terminated and the calculation result of the step (4) is output as the final cluster centerAnd (4) the updated anchor frame size is obtained, otherwise, the step (3) is returned to.
In this embodiment, step (1) in conjunction with FIG. 2nIs a mixture of a water-soluble polymer and a water-soluble polymer, and is 6,mis 4.
In this embodiment, the YOLOV3 algorithm was also modified as follows: replacing a Darknet-53 network with a Darknet-19 network to serve as a backbone of an improved YOLOv3 network, deleting repeated layers in YOLOv3-Scale1, YOLOv3-Scale2 and YOLOv3-Scale3, thereby reducing detection time, increasing two feature connection paths, fully utilizing features extracted from the network, and qualitatively detecting whether corrosion defects exist in a steel structure image or not by a multi-Scale sliding window searching method; and calculating the probability of judging the corrosion defect by adopting a Sigmoid logistic regression function, determining the defect as the corrosion defect when the probability is greater than a set threshold value of 0.8, marking the defect by using a target box, and marking the defect type and the probability value.
As shown in fig. 2, 6 corrosion defects in the steel structure image are automatically detected, and are labeled by using a rectangular frame, and the defect type and probability are labeled, wherein in the figure, corrosion is represented by run, and the numerical value represents the probability of type defect, which is 0.944, 0.960, 0.977, 0.934, 0.960 and 0.938, respectively, and are all greater than the set threshold value of 0.8.
In this embodiment, in the third step, the training step of the improved YOLOV3 deep neural network classification model is as follows:
(1) constructing a high-altitude steel structure corrosion defect training data set: collecting a large number of corrosion images and normal images without corrosion of steel structures of large equipment such as port cranes, wind power equipment, towers, large amusement facilities, boilers, steel bridges, ship bodies and the like, enhancing the data set in the modes of overturning, translation, angular rotation and the like, and manually marking information of image samples through a drawing library management and marking software in multiple ports to construct a training data set;
(2) deep neural network learning: for the improved Yolov3 deep neural network classification model, learning is carried out by using a training data set, the sum of loss functions of all training data is calculated according to formula (4), and then the sum of the loss functions is made through a plurality of times of learningEFinding the optimal model parameter to obtain the optimal corrosion defect classification model;
(4)
wherein the number of training data isRThe number of the main components is one,is shown aslThe first of the training datakThe value of each of the elements is,representing the output of the neural network.
In the fourth step, an Otsu threshold segmentation and mathematical morphology method are adopted to perform image segmentation on the detected corrosion target frame region and extract a connected domain inversion defect shape, as shown in fig. 3, where fig. 3(a) is a diagram of a corrosion target frame 1 detected by a deep neural network model, the corrosion target frame is a corrosion target frame marked at the upper left corner in fig. 2, fig. 3(b) is a diagram of a segmentation recognition result of the corrosion region of the target frame 1, and a black part in the diagram is a corrosion region;fig. 3(c) is a diagram of a corrosion target frame 2 detected by the deep neural network model, the corrosion target frame being marked at the lower left corner in fig. 2, fig. 3(d) is a diagram of a corrosion region segmentation recognition result of the target frame 2, fig. 3(e) is a diagram of a corrosion target frame 3 detected by the deep neural network model, the corrosion target frame being marked at the upper middle position in fig. 2, and fig. 3(f) is a diagram of a corrosion region segmentation recognition result of the target frame 3; FIG. 3(g) is a diagram of a corrosion target frame 4 detected by the deep neural network model, the corrosion target frame being marked at the middle position of FIG. 2, and FIG. 3(h) is a diagram of a segmentation recognition result of a corrosion region of the target frame 4; FIG. 3(i) is a diagram of a corrosion target frame 5 detected by the deep neural network model, the corrosion target frame being a corrosion target frame marked at a lower middle position in FIG. 2, and FIG. 3(j) is a diagram of a result of segmentation and identification of a corrosion region of the target frame 5; fig. 3(k) is a diagram of a corrosion target frame 6 detected by the deep neural network model, the corrosion target frame is a corrosion target frame marked at the lower right corner in fig. 2, and fig. 3(l) is a diagram of a result of identifying the corrosion region of the target frame 6. Then, pixel count occupied in the corrosion area is counted by using a pixel point method to obtain the area of the corroded pixelAnd calculating the corrosion rateASaid corrosion rateAPixel area for corrosionAnd area of the etching target frameThe ratio of (A) to (B) is as in formula (5):
(5)
respectively obtaining the original image areas of the 6 corrosion target frame areas in the figure 2Area of pixel in the etched regionAnd corrosion rateASee table 4.
In this embodiment, in the fourth step, to more objectively and accurately evaluate the corrosion degree, a weighting factor may be set according to the color depth of the corroded part, the color depth may be divided into 4 levels, that is, divided into 4 corrosion regions, and the weighting factor may be used to calculate the corrosion degreeFrom heavy to light are respectively arranged as(ii) a Calculating a weighted corrosion rateAs in equation (6):
(6)
in the formula (I), the compound is shown in the specification,S 1,S 2,S 3,S 4the pixel areas of the different color dark and light corrosion areas.
The weight setting step comprises extracting gray image of the erosion region, obtaining gray histogram, and setting gray value of erosion part pixelThe sorting is carried out from small to large,to erode the pixel coordinates, the minimum gray value is obtainedAnd maximum valueAnd setting the weight of each corrosion pixel point according to a formula (7).
In this embodiment, the gray scale minimum of the 6 etching target frame regions in FIG. 2Maximum valueAnd areas of different color depth corrosion regionsS 1,S 2,S 3,S 4See table 2, respectively.
In the present embodiment, in the fourth step, the weighted corrosion rate is calculated according to the formulas (6) to (7), the corrosion degree of the target frame 1, 2 of the corrosion frame is graded according to the ASTM standard (see table 3), the grading result is shown in table 4, and the area needing repainting is suggested according to the relevant grade, so as to reduce the probability of corrosion expansion and section loss.
TABLE 2 Gray-scale distribution of the area of the etch target frame
TABLE 3 ASTM Corrosion Performance grades
TABLE 4 Corrosion parameter identification and grading results
Through the embodiment, the method is obtained from the steps of fig. 1, fig. 2, fig. 3(a), fig. 3(b), fig. 3(c), fig. 3(d), fig. 3(e), fig. 3(f), fig. 3(g), fig. 3(h), fig. 3(i), fig. 3(j), fig. 3(k), fig. 3(l), a table 2, a table 3 and a table 4, and is used for detecting, identifying, quantifying and evaluating the metal structure corrosion defects of the large-scale mechanical equipment, so that the detection efficiency can be improved, the detection result scientificity and accuracy can be improved, meanwhile, places which cannot be reached or are difficult to be reached by unmanned aerial vehicle detection can be replaced, the accidents can be effectively prevented and controlled, the loss of personnel and equipment properties is reduced, and the method has important significance for promoting the safety production of enterprises.
Example two:
as shown in FIG. 4, the unmanned aerial vehicle visual detection and evaluation system for high altitude steel structure corrosion comprises an unmanned aerial vehicle flight platform 1, a Camera Link industrial Camera 2, an edge computing device 3, a wireless transmission device 4, a ground terminal display device 5 and an alarm assembly 6 which are in telecommunication connection. The unmanned aerial vehicle flight platform carries a Camera Link industrial Camera to acquire images of a steel structure to be detected in real time, and transmits the images to the edge computing equipment for image processing in real time through a Camera Link interface.
The edge computing device 3 comprises a storage module and an image processing module. The storage module is used for storing the steel structure image to be detected acquired by the unmanned aerial vehicle and transmitting the image to the image processing module; and the image processing module performs image data processing on the image to be detected, operates the detection methods in the third step and the fourth step to perform corrosion defect detection, identification and grading evaluation, and marks the defects. Then the image detection result is transmitted to a ground terminal display device through a wireless transmission device to be displayed, and meanwhile, acousto-optic alarm is carried out through an alarm component.
It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention; any modification, equivalent replacement, or improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.