A tower crack recognition method based on deformable attention mechanism
Through a dynamic object detection network based on the deformable attention mechanism, the problem of slow identification of tower cracks is solved, and efficient tower crack detection is achieved.
Patent Information
- Application Number
- CN202411789579.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-06
- Publication Date
- 2025-08-08
- Estimated Expiration
- 2044-12-06
AI Technical Summary
The existing tower tower crack identification method has slow recognition speed, resulting in low detection efficiency.
A dynamic object detection network based on a deformable attention mechanism is adopted to process tower crack images through backbone modules, dynamic router modules, deformable attention mechanism modules, image input judgment modules, first neck modules and second neck modules and head modules to distinguish simple and difficult images, and improve detection speed and accuracy.
The speed and accuracy of the detection of cracks in the tower body are improved and the detection efficiency is improved.
Smart Images

Figure CN119723188B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of crack recognition in an iron tower body, and in particular to a crack recognition method for an iron tower body based on a deformable attention mechanism. Background Art
[0002] According to data from China Tower Corporation Limited, by the end of 2023, the company will have 2.061 million tower sites, a cumulative increase of 6,000 sites compared to the end of 2022. With the increasing number of towers, tower maintenance issues are becoming increasingly prominent and urgently need to be addressed. As towers age and are eroded by the natural environment, their structures may become unstable, leading to safety hazards such as tilting or breaking, potentially resulting in casualties. Therefore, professional technicians are required to regularly inspect the condition of towers to promptly assess whether they require maintenance.
[0003] Monitoring the condition of steel towers primarily relies on tower data, much of which is collected by aerial workers climbing to the top. Professional technicians use this collected data to assess and determine the tower's condition. However, manual judgment methods can introduce errors as the volume of data increases. These errors can affect the accuracy and reliability of the data, impacting subsequent maintenance decisions. Such misjudgments not only impact the effectiveness of repairs but can also lead to more serious safety hazards. Statistics show that the main cause of tower collapse and deterioration is a lack of timely repair and maintenance, often linked to errors in judgment by technicians. Such misjudgments can delay timely resolution of potential problems, increasing the risk of tower damage. While current detection technologies, driven by the advancement of deep learning, have reduced errors in identifying cracks in towers, the complexity of the feature extraction network leads to slow detection and low efficiency. Summary of the Invention
[0004] The purpose of the present invention is to solve the problem that the existing tower body crack recognition method still has slow recognition speed, resulting in low detection efficiency, and proposes a tower body crack recognition method based on a deformable attention mechanism.
[0005] A tower crack recognition method based on a deformable attention mechanism is proposed, specifically:
[0006] Obtaining a crack image of the tower body to be tested, inputting the crack image of the tower body to be tested into a dynamic target detection network, and obtaining a tower body crack detection result;
[0007] The dynamic target detection network is obtained by:
[0008] Step 1: Obtain the tower body crack dataset:
[0009] Step 2: Divide the tower body crack dataset into a training set and a test set, use the training set and the test set to train and test the tower body crack recognition model, and obtain a dynamic target detection network;
[0010] The tower crack recognition model includes: a backbone module, a dynamic router module, a deformable attention mechanism module, an image input judgment module, a first neck module, a second neck module, a first head module and a second head module;
[0011] The backbone module is used to process the tower body crack image, obtain the tower body crack image feature map, and input the tower body crack image feature map into the deformable attention mechanism module;
[0012] The dynamic router module is used to judge the difficulty of the tower body crack image according to the tower body crack image feature map, and send the difficulty of the tower body crack image to the image input judgment module;
[0013] If there is only one crack in the tower body crack image, it means that the tower body crack image is a simple tower body crack image; if there is more than one crack in the tower body crack image, it means that the tower body crack image is a difficult tower body crack image;
[0014] The deformable attention mechanism module is used to process the tower body crack image feature map output by the backbone module, obtain an updated tower body crack image feature map, and send the updated tower body crack image feature map to the image input judgment module;
[0015] The image input judgment module is used to input the updated tower body crack image feature map into the first neck module or the second neck module according to the difficulty of the tower body crack image;
[0016] The first neck module processes the updated tower body crack image feature map determined to correspond to the simple tower body crack image to obtain a first multi-scale feature map, and sends the first multi-scale feature map to the first head module;
[0017] The second neck module processes the updated tower body crack image feature map corresponding to the difficult tower body crack image to obtain a second multi-scale feature map, and sends the second multi-scale feature map to the second head module;
[0018] The first head module is used to obtain the tower body crack category and the tower body crack target detection frame in the image judged as a simple tower body crack;
[0019] The second head module is used to obtain the tower crack category and the tower crack target detection frame in the image judged as difficult tower crack.
[0020] Furthermore, the tower body crack data set in step 1 includes:
[0021] The tower body crack dataset includes: tower body crack images, crack type labels, image difficulty labels, and crack target detection frame position labels;
[0022] The crack target detection frame position label includes: the coordinates of the upper left corner and the lower right corner of the crack target detection frame;
[0023] Crack types include: connection plate cracks, tower column cracks, platform cracks, and web cracks;
[0024] If there is only one crack in the tower crack image, it means that the tower crack image is a simple tower crack image, and the image difficulty label is set to simple; if there is more than one crack in the tower crack image, it means that the tower crack image is a difficult tower crack image, and the image difficulty label is set to difficult.
[0025] Furthermore, the backbone module includes: a first convolutional layer, a second convolutional layer, a third convolutional layer, a fourth convolutional layer, a first ELAN submodule, a first MP-1 submodule, a second ELAN submodule, a second MP-1 submodule, a third ELAN submodule, a third MP-1 submodule, and a fourth ELAN submodule;
[0026] The first convolutional layer is a 3x3 convolutional layer with 32 channels, 1 padding, and 1 stride.
[0027] The second convolutional layer is a 3x3 convolutional layer with 64 channels, a padding of 1, and a stride of 2; the input of the second convolutional layer is the output of the first convolutional layer;
[0028] The third convolutional layer is a 3x3 convolutional layer with 64 channels, 1 padding, and a stride of 1; the input of the third layer is the output of the second convolutional layer;
[0029] The fourth convolutional layer is a 3x3 convolutional layer with 128 channels, 1 padding, and a stride of 2. The input of the fourth convolutional layer is the output of the third convolutional layer.
[0030] The first ELAN submodule includes: a C1 layer, a C2 layer, a C3 layer, a C4 layer, a first concatenation layer, and a C5 layer; the input of the first ELAN submodule is the output of the fourth convolutional layer;
[0031] The first MP-1 submodule includes: a first maximum pooling layer, an MP-1-1 convolutional layer, an MP-1-2 convolutional layer, an MP-1-3 convolutional layer, and a second concatenation layer; the input of the first MP-1 submodule is the output of the first ELAN submodule;
[0032] The second ELAN submodule includes: a C1' layer, a C2' layer, a C3' layer, a C4' layer, a third splicing layer, and a C5' layer; the input of the second ELAN submodule is the output of the first MP-1 submodule;
[0033] The second MP-1 submodule has the same structure as the first MP-1 submodule; the input of the second MP-1 submodule is the output of the second ELAN submodule;
[0034] The third ELAN submodule has the same structure as the second ELAN submodule; the input of the third ELAN submodule is the output of the second MP-1 submodule;
[0035] The third MP-1 submodule has the same structure as the first MP-1 submodule; the input of the third MP-1 submodule is the output of the third ELAN submodule;
[0036] The fourth ELAN submodule has the same structure as the second ELAN submodule; the input of the fourth ELAN submodule is the output of the third MP-1 submodule.
[0037] Furthermore, the first ELAN submodule includes: a C1 layer, a C2 layer, a C3 layer, a C4 layer, a first splicing layer, and a C5 layer, specifically:
[0038] The C1 layer is a 1x1 convolutional layer with 64 channels, 1 padding, and a stride of 1. The input of the C1 layer is the output of the 4th convolutional layer.
[0039] The C2 layer is a 1x1 convolutional layer with 64 channels, 1 padding, and a stride of 1. The input of the C2 layer is the output of the 4th convolutional layer.
[0040] The C3 layer includes: C3-1 sublayer and C3-2 sublayer;
[0041] The C3-1 sublayer is a 3x3 convolutional layer with 64 channels, 1 padding, and a stride of 1. The input of the C3-1 sublayer is the output of the C2 layer.
[0042] The C3-2 sublayer is a 3x3 convolutional layer with 64 channels, 1 padding, and a stride of 1. The input of the C3-2 sublayer is the output of the C3-1 sublayer.
[0043] The C4 layer includes: C4-1 sublayer and C4-2 sublayer;
[0044] The C4-1 sublayer is a 3x3 convolutional layer with 64 channels, 1 padding, and a stride of 1. The input of the C4-1 sublayer is the output of the C3-2 sublayer.
[0045] The C4-2 sublayer is a 3x3 convolutional layer with 64 channels, 1 padding, and a stride of 1. The input of the C4-2 sublayer is the output of the C4-1 sublayer.
[0046] The first splicing layer is used to splice the outputs of layers C1, C2, C3, and C4 to obtain a first splicing result;
[0047] The C5 layer is a 1x1 convolutional layer with 256 channels, 1 padding, and a stride of 1. The input of the C5 layer is the first concatenation result.
[0048] Furthermore, the first MP-1 submodule includes: a first maximum pooling layer, an MP-1-1 convolutional layer, an MP-1-2 convolutional layer, an MP-1-3 convolutional layer, and a second splicing layer, specifically:
[0049] The first maximum pooling sublayer is a 2x2 maximum pooling layer; the input of the first maximum pooling layer is the output of the first ELAN submodule;
[0050] The MP-1-1 convolution layer is a 1x1 convolution layer with 128 channels, 1 padding, and a stride of 1. The input of the MP-1-1 convolution layer is the output of the first maximum pooling layer.
[0051] The MP-1-2 convolutional layer is a 1x1 convolutional layer with 128 channels, 1 padding, and a stride of 1. The input of the MP-1-2 convolutional layer is the output of the first ELAN submodule.
[0052] The MP-1-3 convolution layer is a 3x3 convolution layer with 128 channels, 1 padding, and a stride of 2. The input of the MP-1-3 convolution layer is the output of the MP-1-2 convolution layer.
[0053] The second splicing layer is used to splice the output of the MP-1-1 convolutional layer and the output of the MP-1-3 convolutional layer to obtain a second splicing result.
[0054] Furthermore, the second ELAN submodule includes: a C1' layer, a C2' layer, a C3' layer, a C4' layer, a third splicing layer, and a C5' layer, specifically:
[0055] The C1' layer is a 1x1 convolutional layer with 128 channels, 1 padding, and a stride of 1. The input of the C1' layer is the output of the first MP-1 submodule.
[0056] The C2' layer is a 1x1 convolutional layer with 128 channels, 1 padding, and a stride of 1. The input of the C2' layer is the output of the first MP-1 submodule.
[0057] The C3' layer includes: a C3'-1 sublayer and a C3'-2 sublayer;
[0058] The C3'-1 sublayer is a 3x3 convolutional layer with 128 channels, 1 padding, and a stride of 1. The input of the C3'-1 sublayer is the output of the C2' layer.
[0059] The C3'-2 sublayer is a 3x3 convolutional layer with 128 channels, 1 padding, and a stride of 1. The input of the C3'-2 sublayer is the output of the C3'-1 sublayer.
[0060] The C4' layer includes: a C4'-1 sublayer and a C4'-2 sublayer;
[0061] The C4'-1 sublayer is a 3x3 convolutional layer with 128 channels, 1 padding, and a stride of 1. The input of the C4'-1 sublayer is the output of the C3'-2 sublayer.
[0062] The C4'-2 sublayer is a 3x3 convolutional layer with 128 channels, 1 padding, and a stride of 1. The input of the C4'-2 sublayer is the output of the C4'-1 sublayer.
[0063] The third splicing layer is used to splice the outputs of the C1', C2', C3', and C4' layers to obtain a third splicing result;
[0064] The C5' layer is a 1x1 convolution layer with a channel number of 512, a padding of 1, and a stride of 1; the input of the C5' layer is the third splicing result.
[0065] Furthermore, the first neck module includes: a first SPPCSPC submodule, a 12th convolutional layer, a 13th convolutional layer, a 14th convolutional layer, a first upsampling layer, a sixth splicing layer, a first E-ELAN submodule, a 22nd convolutional layer, a second upsampling layer, an eighth splicing layer, a second E-ELAN submodule, a first MP-2 submodule, a third E-ELAN submodule, a second MP-2 submodule, a fourth E-ELAN submodule, a 26th convolutional layer, a 27th convolutional layer, and a 28th convolutional layer, specifically:
[0066] The first SPPCSPC submodule includes: the 5th convolutional layer, the 6th convolutional layer, the 7th convolutional layer, the 2nd maximum pooling layer, the 3rd maximum pooling layer, the 4th maximum pooling layer, the 4th splicing layer, the 8th convolutional layer, the 9th convolutional layer, the 10th convolutional layer, the 5th splicing layer, and the 11th convolutional layer, specifically:
[0067] The fifth convolutional layer is a 1x1 convolutional layer with 64 channels, 1 padding, and a stride of 1. The input of the fifth convolutional layer is the updated tower crack image feature map corresponding to the simple tower crack image.
[0068] The sixth convolutional layer is a 3x3 convolutional layer; the input of the sixth convolutional layer is the output of the fifth convolutional layer;
[0069] The seventh convolutional layer is a 1x1 convolutional layer; the input of the seventh convolutional layer is the output of the sixth convolutional layer;
[0070] The size of the second maximum pooling layer is 5x5; the input of the second maximum pooling layer is the output of the 7th convolutional layer;
[0071] The size of the third maximum pooling layer is 9x9; the input of the third maximum pooling layer is the output of the 7th convolutional layer;
[0072] The size of the fourth maximum pooling layer is 13x13; the input of the fourth maximum pooling layer is the output of the seventh convolutional layer;
[0073] The fourth splicing layer is used to splice the outputs of the second maximum pooling layer, the third maximum pooling layer, the fourth maximum pooling layer and the seventh convolutional layer to obtain a fourth splicing result;
[0074] The eighth convolutional layer is a 1x1 convolutional layer with 64 channels, 1 padding, and a stride of 3; the input of the eighth convolutional layer is the fourth splicing result;
[0075] The 9th convolutional layer is a 3x3 convolutional layer; the input of the 9th convolutional layer is the output of the 8th convolutional layer;
[0076] The tenth convolutional layer is a 1x1 convolutional layer; the input of the tenth convolutional layer is the updated tower crack image feature map corresponding to the simple tower crack image;
[0077] The fifth splicing layer is used to splice the output of the tenth convolutional layer and the output of the ninth convolutional layer to obtain a fifth splicing result;
[0078] The 11th convolutional layer is a 1x1 convolutional layer; the input of the 11th convolutional layer is the fifth splicing result;
[0079] The 12th convolutional layer is a 1x1 convolutional layer with 256 channels, 1 padding, and a stride of 1. The input of the 12th convolutional layer is the output of the second ELAN submodule.
[0080] The 13th convolutional layer is a 1x1 convolutional layer with 256 channels, 1 padding, and a stride of 1. The input of the 13th convolutional layer is the output of the third ELAN submodule.
[0081] The 14th convolutional layer is a 1x1 convolutional layer with 256 channels, 1 padding, and a stride of 1. The input of the 14th convolutional layer is the output of the first SPPCSPC submodule.
[0082] The input of the first upsampling layer is the output of the 14th convolutional layer;
[0083] The sixth splicing layer is used to splice the output of the 13th convolutional layer and the output of the first upsampling layer to obtain a sixth splicing result;
[0084] The first E-ELAN submodule includes: the 15th convolution layer, the 16th convolution layer, the 17th convolution layer, the 18th convolution layer, the 19th convolution layer, the 20th convolution layer, the seventh splicing layer, and the 21st convolution layer; the input of the first E-ELAN submodule is the sixth splicing result, specifically:
[0085] The 15th convolutional layer is a 1x1 convolutional layer with 256 channels, 1 padding, and a stride of 1. The input of the 15th convolutional layer is the sixth concatenation result.
[0086] The 16th convolutional layer is a 1x1 convolutional layer with 256 channels, 1 padding, and a stride of 1. The input of the 16th convolutional layer is the sixth concatenation result.
[0087] The 17th convolutional layer is a 3x3 convolutional layer with 256 channels, 1 padding, and a stride of 1. The input of the 17th convolutional layer is the output of the 16th convolutional layer.
[0088] The 18th convolutional layer is a 3x3 convolutional layer with 256 channels, 1 padding, and a stride of 1. The input of the 18th convolutional layer is the output of the 17th convolutional layer.
[0089] The 19th convolutional layer is a 3x3 convolutional layer with 256 channels, 1 padding, and a stride of 1. The input of the 19th convolutional layer is the output of the 18th convolutional layer.
[0090] The 20th convolutional layer is a 3x3 convolutional layer with 256 channels, 1 padding, and a stride of 1. The input of the 20th convolutional layer is the output of the 19th convolutional layer.
[0091] The seventh splicing layer splices the output of the 15th convolutional layer, the output of the 16th convolutional layer, the output of the 18th convolutional layer, and the output of the 20th convolutional layer to obtain a seventh splicing result;
[0092] The 21st convolutional layer is a 1x1 convolutional layer with 256 channels, 1 padding, and a stride of 1. The input of the 21st convolutional layer is the seventh concatenation result.
[0093] The 22nd convolutional layer is a 1x1 convolutional layer with 256 channels, 1 padding, and a stride of 1. The input of the 22nd convolutional layer is the output of the first E-ELAN submodule.
[0094] The input of the second upsampling layer is the output of the 22nd convolutional layer;
[0095] The eighth splicing layer splices the output of the second upsampling layer and the output of the 12th convolutional layer to obtain an eighth splicing result;
[0096] The second E-ELAN submodule has the same structure as the first E-ELAN submodule; the input of the second E-ELAN submodule is the eighth splicing result;
[0097] The first MP-2 submodule includes: a fifth maximum pooling layer, a 23rd convolutional layer, a 24th convolutional layer, a 25th convolutional layer, and a ninth concatenation layer; the input of the first MP-2 submodule is the output of the second E-ELAN submodule and the output of the first E-ELAN submodule; the first MP-2 submodule is specifically:
[0098] The size of the fifth maximum pooling layer is 2x2; the input of the fifth maximum pooling layer is the output of the second E-ELAN submodule;
[0099] The 23rd convolutional layer is a 1x1 convolutional layer; the input of the 23rd convolutional layer is the output of the second E-ELAN submodule;
[0100] The 24th convolutional layer is a 1x1 convolutional layer; the input of the 24th convolutional layer is the output of the fifth maximum pooling layer;
[0101] The 25th convolutional layer is a 3x3 convolutional layer; the input of the 25th convolutional layer is the output of the 23rd convolutional layer;
[0102] The ninth splicing layer is used to splice the output of the 24th convolutional layer, the output of the 25th convolutional layer and the eighth splicing result to obtain a ninth splicing result;
[0103] The third E-ELAN submodule has the same structure as the first E-ELAN submodule; the input of the third E-ELAN submodule is the first MP-2 submodule;
[0104] The second MP-2 submodule has the same structure as the first MP-2 submodule; the input of the second MP-2 submodule is the output of the third E-ELAN submodule and the output of the first SPPCSPC submodule;
[0105] The fourth E-ELAN submodule has the same structure as the first E-ELAN submodule; the input of the fourth E-ELAN submodule is the output of the second MP-2 submodule;
[0106] The 26th convolutional layer is a 3x3 convolutional layer with 256 channels, 1 padding, and a stride of 3; the input of the 26th convolutional layer is the output of the second E-ELAN submodule;
[0107] The 27th convolutional layer is a 3x3 convolutional layer with 512 channels, a padding of 1, and a stride of 3. The input of the 27th convolutional layer is the output of the third E-ELAN submodule.
[0108] The 28th convolutional layer is a 3x3 convolutional layer with 1024 channels, 1 padding, and a stride of 3. The input of the 28th convolutional layer is the output of the fourth E-ELAN submodule.
[0109] Furthermore, the second neck module includes: a second SPPCSPC submodule, a 29th convolutional layer, a 30th convolutional layer, a 31st convolutional layer, a third upsampling layer, a tenth splicing layer, a fifth E-ELAN submodule, a 32nd convolutional layer, a fourth upsampling layer, an eleventh splicing layer, a sixth E-ELAN submodule, a third MP-2 submodule, a 33rd convolutional layer, a seventh E-ELAN submodule, a fourth MP-2 submodule, a 34th convolutional layer, an eighth E-ELAN submodule, a 35th convolutional layer, a 36th convolutional layer, and a 37th convolutional layer, specifically:
[0110] The second SPPCSPC submodule has the same structure as the first SPPCSPC submodule; the second SPPCSPC submodule has the same structure as the first SPPCSPC submodule; the second SPPCSPC submodule input is the updated tower body crack image feature map corresponding to the difficult tower body crack image;
[0111] The 29th convolutional layer is a 1x1 convolutional layer with 256 channels, 1 padding, and a stride of 1. The input of the 29th convolutional layer is the output of the second ELAN submodule.
[0112] The 30th convolutional layer is a 1x1 convolutional layer with 256 channels, 1 padding, and a stride of 1. The input of the 30th convolutional layer is the output of the third ELAN submodule.
[0113] The 31st convolutional layer is a 1x1 convolutional layer with 256 channels, 1 padding, and a stride of 1. The input of the 31st convolutional layer is the output of the second SPPCSPC submodule.
[0114] The third upsampling layer input is the output of the 31st convolutional layer;
[0115] The tenth splicing layer is used to splice the output of the 30th convolutional layer and the output of the third upsampling layer to obtain a tenth splicing result;
[0116] The fifth E-ELAN submodule has the same structure as the first E-ELAN submodule; the input of the fifth E-ELAN submodule is the tenth splicing result;
[0117] The 32nd convolutional layer is a 1x1 convolutional layer with 256 channels, 1 padding, and a stride of 1. The input of the 32nd convolutional layer is the output of the fifth E-ELAN submodule.
[0118] The input of the fourth upsampling layer is the output of the 32nd convolutional layer;
[0119] The eleventh splicing layer is used to splice the output of the fourth upsampling layer and the output of the 29th convolutional layer to obtain an eleventh splicing result;
[0120] The sixth E-ELAN submodule has the same structure as the second E-ELAN submodule; the input of the sixth E-ELAN submodule is the eleventh splicing result;
[0121] The third MP-2 submodule has the same structure as the first MP-2 submodule; the input of the third MP-2 submodule is the output of the sixth E-ELAN submodule and the output of the fifth E-ELAN submodule;
[0122] The 33rd convolutional layer is a 1x1 convolutional layer with 512 channels, 1 padding, and a stride of 1. The input of the 33rd convolutional layer is the output of the third MP-2 submodule.
[0123] The seventh E-ELAN submodule has the same structure as the first E-ELAN submodule; the input of the seventh E-ELAN submodule is the output of the 33rd convolutional layer;
[0124] The fourth MP-2 submodule has the same structure as the first MP-2 submodule; the input of the fourth MP-2 submodule is the output of the second SPPCSPC submodule and the output of the seventh E-ELAN submodule;
[0125] The 34th convolutional layer is a 1x1 convolutional layer with 256 channels, 1 padding, and a stride of 1. The input of the 34th convolutional layer is the output of the fourth MP-2 submodule.
[0126] The eighth E-ELAN submodule structure is the same as the first E-ELAN submodule structure; the input of the eighth E-ELAN submodule structure is the output of the 34th convolutional layer;
[0127] The 35th convolutional layer is a 3x3 convolutional layer with 256 channels, 1 padding, and a stride of 3. The input of the 35th convolutional layer is the output of the sixth E-ELAN submodule.
[0128] The 36th convolutional layer is a 3x3 convolutional layer with 512 channels, 1 padding, and a stride of 3. The input of the 36th convolutional layer is the output of the seventh E-ELAN submodule.
[0129] The 37th convolutional layer is a 3x3 convolutional layer with 1024 channels, 1 padding, and a stride of 3. The input of the 37th convolutional layer is the output of the eighth E-ELAN submodule.
[0130] Furthermore, the first head module includes: a first Conv2d layer, a second Conv2d layer, and a third Conv2d layer;
[0131] The input of the first Conv2d layer is the output of the 26th convolutional layer. The output of the first Conv2d layer is the tower crack image containing the tower crack target detection frame and the tower crack category. The input of the first Conv2d layer is a feature map of size 80x80x256.
[0132] The input of the second Conv2d layer is the output of the 27th convolutional layer; the output of the second Conv2d layer is the tower crack image containing the tower crack target detection frame and the tower crack category; the input of the first Conv2d layer is a feature map of size 40x40x512;
[0133] The input of the third Conv2d layer is the output of the 28th convolutional layer; the output of the third Conv2d layer includes the tower body crack image and the tower body crack category containing the tower body crack target detection frame; the input of the third Conv2d layer is a feature map of size 20x20x1024.
[0134] Furthermore, the second head module includes: a fourth Conv2d layer, a fifth Conv2d layer, and a sixth Conv2d layer;
[0135] The input of the fourth Conv2d layer is the output of the 35th convolutional layer; the output of the fourth Conv2d layer is the tower crack image and the tower crack category containing the tower crack target detection frame; the input of the fourth Conv2d layer is a feature map of size 80x80x256;
[0136] The input of the fifth Conv2d layer is the output of the 36th convolutional layer; the output of the fifth Conv2d layer is the tower crack image and the tower crack category containing the tower crack target detection frame; the input of the fifth Conv2d layer is a feature map of size 20x20x1024;
[0137] The input of the sixth Conv2d layer is the output of the 37th convolutional layer; the output of the sixth Conv2d layer includes the tower body crack image and the tower body crack category containing the tower body crack target detection frame; the input of the sixth Conv2d layer is a feature map of size 20x20x1024.
[0138] The beneficial effects of the present invention are:
[0139] This paper classifies a dataset of tower cracks into four types: connecting plate cracks, tower column cracks, platform cracks, and web member cracks. During crack identification, the present invention uses a dynamic attention mechanism and a dynamic target detector to improve the speed and accuracy of tower crack detection. The present invention also classifies tower crack images into simple and difficult images based on the number of cracks. Different neck and head modules are then used to process tower crack images of varying difficulty levels. This improves the speed and performance of the dynamic target detection network, thereby enhancing the efficiency of tower crack detection. BRIEF DESCRIPTION OF THE DRAWINGS
[0140] Figure 1 This is a network structure diagram of the present invention;
[0141] Figure 2(a) is a schematic diagram of the crack in the connecting plate;
[0142] Figure 2(b) is a schematic diagram of the tower column crack;
[0143] Figure 2(c) is a schematic diagram of platform cracking;
[0144] Figure 2(d) is a schematic diagram of the web crack;
[0145] Figure 3 Processing flow chart for deformable attention mechanism;
[0146] Figure 4(a) shows a simple tower crack image;
[0147] Figure 4(b) shows the image of the difficult tower crack;
[0148] Figure 5 is a schematic diagram of a first neck module and a second neck module; DETAILED DESCRIPTION
[0149] Specific implementation method 1: This implementation method is a method for identifying cracks in a tower body based on a deformable attention mechanism. The specific process is as follows:
[0150] Obtaining a crack image of the tower body to be tested, inputting the crack image of the tower body to be tested into a dynamic target detection network, and obtaining a tower body crack detection result;
[0151] The dynamic target detection network is obtained by:
[0152] Step 1: Obtain the tower body crack dataset:
[0153] The tower body crack dataset includes: tower body crack images, crack type labels, image difficulty labels, and crack target detection frame position labels;
[0154] The crack target detection frame position label includes: the coordinates of the upper left corner and the lower right corner of the crack target detection frame;
[0155] The tower body crack dataset was obtained through the "Tower Inspection Report", which contains real report information on approximately 1,500 towers in Heilongjiang Province. The dataset contains more than 30,000 images, including approximately 8,000 images of tower body cracks.
[0156] The crack types include: 1) connection plate cracks, 2) tower column cracks, 3) platform cracks, and 4) web member cracks.
[0157] Among them, the cracks of the connecting plate are usually cracks in the surface paint, the cracks of the tower column are longitudinal cracks in the supporting column of the tower, the cracks of the platform are longitudinal cracks in the connection of the steel frame of the tower body, and the cracks of the web bars will normally appear as small notch-shaped cracks. There are four types of cracks such as Figure 2(a)-Figure 2(d) shown.
[0158] The classification is based on reviewing all tower reports and classifying and analyzing typical cracks, dividing all tower body crack data into the above four categories;
[0159] If the number of cracks in the current tower body image is 1, the image difficulty is set to easy. If the number of cracks in the current tower body image is greater than 1, the image difficulty is set to difficult. Figure 4(a)-Figure 4(b) shown.
[0160] Step 2: Divide the tower body crack dataset into a training set and a test set, use the training set and the test set to train and test the tower body crack recognition model, and obtain a dynamic target detection network;
[0161] like Figure 1 As shown, the tower crack recognition model includes: a backbone module, a dynamic router module, a deformable attention mechanism module, an image input judgment module, a first neck module, a second neck module, a first head module and a second head module;
[0162] The backbone module includes: a first convolutional layer, a second convolutional layer, a third convolutional layer, a fourth convolutional layer, a first ELAN submodule, a first MP-1 submodule, a second ELAN submodule, a second MP-1 submodule, a third ELAN submodule, a third MP-1 submodule and a fourth ELAN submodule;
[0163] The first convolutional layer is a 3x3 convolutional layer with 32 channels, 1 padding, and a stride of 1. The input data of the first convolutional layer is a 640x640x3 image of the cracks in the tower. The output of the first convolutional layer is input to the second convolutional layer.
[0164] The second convolutional layer is a 3x3 convolutional layer with 64 channels, a padding of 1, and a stride of 2. The input of the second convolutional layer is the output of the first convolutional layer. The output data of the first layer is a 320x320x64 feature map.
[0165] The third convolutional layer is a 3x3 convolutional layer with 64 channels, 1 padding, and a stride of 1. The input of the third layer is the output of the second convolutional layer.
[0166] The fourth convolutional layer is a 3x3 convolutional layer with 128 channels, a padding of 1, and a stride of 2. The input of the fourth convolutional layer is the output of the third convolutional layer. The output data is a 160x160x128 feature map.
[0167] The first ELAN submodule includes: C1 layer, C2 layer, C3 layer, C4 layer, first splicing layer and C5 layer;
[0168] The C1 layer is a 1x1 convolutional layer with 64 channels, 1 padding, and a stride of 1. The input of the C1 layer is the output of the 4th convolutional layer.
[0169] The C2 layer is a 1x1 convolutional layer with 64 channels, 1 padding, and a stride of 1. The input of the C2 layer is the output of the 4th convolutional layer.
[0170] The C3 layer includes: C3-1 sublayer and C3-2 sublayer;
[0171] The C3-1 sublayer is a 3x3 convolutional layer with 64 channels, 1 padding, and a stride of 1. The input of the C3-1 sublayer is the output of the C2 layer.
[0172] The C3-2 sublayer is a 3x3 convolutional layer with 64 channels, 1 padding, and a stride of 1. The input of the C3-2 sublayer is the output of the C3-1 sublayer.
[0173] The C4 layer includes: C4-1 sublayer and C4-2 sublayer;
[0174] The C4-1 sublayer is a 3x3 convolutional layer with 64 channels, 1 padding, and a stride of 1. The input of the C4-1 sublayer is the output of the C3-2 sublayer.
[0175] The C4-2 sublayer is a 3x3 convolutional layer with 64 channels, 1 padding, and a stride of 1. The input of the C4-2 sublayer is the output of the C4-1 sublayer.
[0176] The first splicing layer is used to splice the outputs of layers C1, C2, C3, and C4 to obtain a first splicing result;
[0177] The C5 layer is a 1x1 convolutional layer with 256 channels, 1 padding, and a stride of 1. The input of the C5 layer is the first concatenation result. The output data of the C5 layer is a 160x160x256 feature map.
[0178] The first MP-1 submodule includes: the first maximum pooling layer, the MP-1-1 convolutional layer, the MP-1-2 convolutional layer, the MP-1-3 convolutional layer, and the second splicing layer;
[0179] The first maximum pooling sublayer is a 2x2 maximum pooling layer; the input of the first maximum pooling layer is the output of the first ELAN submodule;
[0180] The MP-1-1 convolution layer is a 1x1 convolution layer with 128 channels, 1 padding, and a stride of 1. The input of the MP-1-1 convolution layer is the output of the first maximum pooling layer.
[0181] The MP-1-2 convolutional layer is a 1x1 convolutional layer with 128 channels, 1 padding, and a stride of 1. The input of the MP-1-2 convolutional layer is the output of the first ELAN submodule.
[0182] The MP-1-3 convolution layer is a 3x3 convolution layer with 128 channels, 1 padding, and a stride of 2. The input of the MP-1-3 convolution layer is the output of the MP-1-2 convolution layer. The output data is a 80x80x256 feature map.
[0183] The second splicing layer is used to splice the output of the MP-1-1 convolutional layer and the output of the MP-1-3 convolutional layer to obtain a second splicing result;
[0184] The second ELAN submodule includes: a C1' layer, a C2' layer, a C3' layer, a C4' layer, a third splicing layer, and a C5' layer;
[0185] The C1' layer is a 1x1 convolutional layer with 128 channels, 1 padding, and a stride of 1. The input of the C1' layer is the output of the first MP-1 submodule.
[0186] The C2' layer is a 1x1 convolutional layer with 128 channels, 1 padding, and a stride of 1. The input of the C2' layer is the output of the first MP-1 submodule.
[0187] The C3' layer includes: a C3'-1 sublayer and a C3'-2 sublayer;
[0188] The C3'-1 sublayer is a 3x3 convolutional layer with 128 channels, 1 padding, and a stride of 1. The input of the C3'-1 sublayer is the output of the C2' layer.
[0189] The C3'-2 sublayer is a 3x3 convolutional layer with 128 channels, 1 padding, and a stride of 1. The input of the C3'-2 sublayer is the output of the C3'-1 sublayer.
[0190] The C4' layer includes: a C4'-1 sublayer and a C4'-2 sublayer;
[0191] The C4'-1 sublayer is a 3x3 convolutional layer with 128 channels, 1 padding, and a stride of 1. The input of the C4'-1 sublayer is the output of the C3'-2 sublayer.
[0192] The C4'-2 sublayer is a 3x3 convolutional layer with 128 channels, 1 padding, and a stride of 1. The input of the C4'-2 sublayer is the output of the C4'-1 sublayer.
[0193] The third splicing layer is used to splice the outputs of the C1', C2', C3', and C4' sub-layers to obtain a third splicing result;
[0194] The C5' layer is a 1x1 convolution layer with 512 channels, 1 padding, and a stride of 1. The input of the C5' layer is the third concatenation result. The data of the C5' layer is a feature map of 80x80x512.
[0195] The second MP-1 submodule has the same structure as the first MP-1 submodule; the input of the second MP-1 submodule is the output of the second ELAN submodule; the output data is a 40x40x512 feature map;
[0196] The third ELAN submodule has the same structure as the second ELAN submodule; the input of the third ELAN submodule is the output of the second MP-1 submodule; the output data is a 40x40x1024 feature map;
[0197] The third MP-1 submodule has the same structure as the first MP-1 submodule; the input of the third MP-1 submodule is the output of the third ELAN submodule; the output data is a 20x20x1024 feature map;
[0198] The fourth ELAN submodule has the same structure as the second ELAN submodule; the input of the fourth ELAN submodule is the output of the third MP-1 submodule; the output data is a 20x20x1024 feature map;
[0199] The dynamic router module is used to judge the difficulty of the tower body crack image according to the tower body crack image feature map, and send the difficulty of the tower body crack image to the image input judgment module;
[0200] The deformable attention mechanism module is used to process the tower body crack image feature map output by the backbone module, obtain the updated tower body crack image feature map, and send the updated tower body crack image feature map to the image input judgment module, such as Figure 3 As shown;
[0201] The image input judgment module is used to input the updated tower body crack image feature map output by the deformable attention mechanism module into the first neck module or the second neck module according to the difficulty of the tower body crack image;
[0202] If the dynamic router module determines that the input tower body crack image is simple, the updated tower body crack image feature map is input to the first neck module; if the dynamic router module determines that the input tower body crack image is difficult, the updated tower body crack image feature map is input to the second neck module, such as Figure 5 As shown;
[0203] The first neck module processes the updated tower body crack image feature map determined to correspond to the simple tower body crack image to obtain a first multi-scale feature map, and sends the first multi-scale feature map to the first head module;
[0204] The first neck module includes: the first SPPCSPC submodule, the 12th convolutional layer, the 13th convolutional layer, the 14th convolutional layer, the first upsampling layer, the sixth splicing layer, the first E-ELAN submodule, the 22nd convolutional layer, the second upsampling layer, the eighth splicing layer, the second E-ELAN submodule, the first MP-2 submodule, the third E-ELAN submodule, the second MP-2 submodule, the fourth E-ELAN submodule, the 26th convolutional layer, the 27th convolutional layer, and the 28th convolutional layer;
[0205] The first SPPCSPC submodule includes: the 5th convolutional layer, the 6th convolutional layer, the 7th convolutional layer, the second maximum pooling layer, the third maximum pooling layer, the fourth maximum pooling layer, the fourth splicing layer, the 8th convolutional layer, the 9th convolutional layer, the 10th convolutional layer, the fifth splicing layer, and the 11th convolutional layer;
[0206] The fifth convolutional layer is a 1x1 convolutional layer with 64 channels, 1 padding, and a stride of 1. The input of the fifth convolutional layer is the updated tower crack image feature map corresponding to the simple tower crack image.
[0207] The sixth convolutional layer is a 3x3 convolutional layer; the input of the sixth convolutional layer is the output of the fifth convolutional layer;
[0208] The seventh convolutional layer is a 1x1 convolutional layer; the input of the seventh convolutional layer is the output of the sixth convolutional layer;
[0209] The size of the second maximum pooling layer is 5x5; the input of the second maximum pooling layer is the output of the 7th convolutional layer;
[0210] The size of the third maximum pooling layer is 9x9; the input of the third maximum pooling layer is the output of the 7th convolutional layer;
[0211] The size of the fourth maximum pooling layer is 13x13; the input of the fourth maximum pooling layer is the output of the seventh convolutional layer;
[0212] The fourth splicing layer is used to splice the outputs of the second maximum pooling layer, the third maximum pooling layer, the fourth maximum pooling layer and the seventh convolutional layer to obtain a fourth splicing result;
[0213] The eighth convolutional layer is a 1x1 convolutional layer with 64 channels, 1 padding, and a stride of 3; the input of the eighth convolutional layer is the fourth splicing result;
[0214] The 9th convolutional layer is a 3x3 convolutional layer; the input of the 9th convolutional layer is the output of the 8th convolutional layer;
[0215] The tenth convolutional layer is a 1x1 convolutional layer; the input of the tenth convolutional layer is the updated tower crack image feature map corresponding to the simple tower crack image;
[0216] The fifth splicing layer is used to splice the output of the tenth convolutional layer and the output of the ninth convolutional layer to obtain a fifth splicing result;
[0217] The 11th convolutional layer is a 1x1 convolutional layer; the input of the 11th convolutional layer is the fifth splicing result; and the output data is a 20x20x512 feature map.
[0218] The 12th convolutional layer is a 1x1 convolutional layer with 256 channels, 1 padding, and a stride of 1. The input of the 12th convolutional layer is the output of the second ELAN submodule. The output data of the 12th convolutional layer is a feature map of 80x80x128.
[0219] The 13th convolutional layer is a 1x1 convolutional layer with 256 channels, 1 padding, and a stride of 1. The input of the 13th convolutional layer is the output of the third ELAN submodule. The output data of the 13th convolutional layer is a 40x40x256 feature map.
[0220] The 14th convolutional layer is a 1x1 convolutional layer with 256 channels, 1 padding, and a stride of 1. The input of the 14th convolutional layer is the output of the first SPPCSPC submodule.
[0221] The input of the first upsampling layer is the output of the 14th convolutional layer;
[0222] The sixth splicing layer is used to splice the output of the 13th convolutional layer and the output of the first upsampling layer to obtain a sixth splicing result; the sixth splicing result is a 40x40x512 feature map;
[0223] The first E-ELAN submodule includes: a 15th convolutional layer, a 16th convolutional layer, a 17th convolutional layer, an 18th convolutional layer, a 19th convolutional layer, a 20th convolutional layer, a seventh splicing layer, and a 21st convolutional layer; the input of the first E-ELAN submodule is the sixth splicing result;
[0224] The 15th convolutional layer is a 1x1 convolutional layer with 256 channels, 1 padding, and a stride of 1. The input of the 15th convolutional layer is the sixth concatenation result.
[0225] The 16th convolutional layer is a 1x1 convolutional layer with 256 channels, 1 padding, and a stride of 1. The input of the 16th convolutional layer is the sixth concatenation result.
[0226] The 17th convolutional layer is a 3x3 convolutional layer with 256 channels, 1 padding, and a stride of 1. The input of the 17th convolutional layer is the output of the 16th convolutional layer.
[0227] The 18th convolutional layer is a 3x3 convolutional layer with 256 channels, 1 padding, and a stride of 1. The input of the 18th convolutional layer is the output of the 17th convolutional layer.
[0228] The 19th convolutional layer is a 3x3 convolutional layer with 256 channels, 1 padding, and a stride of 1. The input of the 19th convolutional layer is the output of the 18th convolutional layer.
[0229] The 20th convolutional layer is a 3x3 convolutional layer with 256 channels, 1 padding, and a stride of 1. The input of the 20th convolutional layer is the output of the 19th convolutional layer.
[0230] The seventh splicing layer splices the output of the 15th convolutional layer, the output of the 16th convolutional layer, the output of the 18th convolutional layer, and the output of the 20th convolutional layer to obtain a seventh splicing result;
[0231] The 21st convolutional layer is a 1x1 convolutional layer with 256 channels, 1 padding, and a stride of 1. The input of the 21st convolutional layer is the seventh concatenation result. The output data of the 21st convolutional layer is a 40x40x256 feature map.
[0232] The 22nd convolutional layer is a 1x1 convolutional layer with 256 channels, 1 padding, and a stride of 1. The input of the 22nd convolutional layer is the output of the first E-ELAN submodule.
[0233] The input of the second upsampling layer is the output of the 22nd convolutional layer;
[0234] The eighth splicing layer splices the output of the second upsampling layer and the output of the 12th convolutional layer to obtain an eighth splicing result;
[0235] The second E-ELAN submodule has the same structure as the first E-ELAN submodule; the input of the second E-ELAN submodule is the eighth splicing result; the output feature map of the second E-ELAN submodule is a feature map of 80x80x128;
[0236] The first MP-2 submodule includes: a fifth maximum pooling layer, a 23rd convolutional layer, a 24th convolutional layer, a 25th convolutional layer, and a ninth splicing layer; the input of the first MP-2 submodule is the output of the second E-ELAN submodule and the output of the first E-ELAN submodule;
[0237] The size of the fifth maximum pooling layer is 2x2; the input of the fifth maximum pooling layer is the output of the second E-ELAN submodule;
[0238] The 23rd convolutional layer is a 1x1 convolutional layer; the input of the 23rd convolutional layer is the output of the second E-ELAN submodule;
[0239] The 24th convolutional layer is a 1x1 convolutional layer; the input of the 24th convolutional layer is the output of the fifth maximum pooling layer;
[0240] The 25th convolutional layer is a 3x3 convolutional layer; the input of the 25th convolutional layer is the output of the 23rd convolutional layer;
[0241] The ninth splicing layer is used to splice the output of the 24th convolutional layer, the output of the 25th convolutional layer and the eighth splicing result to obtain a ninth splicing result;
[0242] The third E-ELAN submodule has the same structure as the first E-ELAN submodule; the input of the third E-ELAN submodule is the first MP-2 submodule; the output feature map of the third E-ELAN submodule is a 40x40x256 feature map;
[0243] The second MP-2 submodule has the same structure as the first MP-2 submodule; the input of the second MP-2 submodule is the output of the third E-ELAN submodule and the output of the first SPPCSPC submodule;
[0244] The output of the first SPPCSPC submodule is used as the input of the splicing layer in the second MP-2 submodule;
[0245] The fourth E-ELAN submodule has the same structure as the first E-ELAN submodule; the input of the fourth E-ELAN submodule is the output of the second MP-2 submodule; the output feature map of the fourth E-ELAN submodule is a 20x20x512 feature map;
[0246] The 26th convolutional layer is a 3x3 convolutional layer with 256 channels, 1 padding, and a stride of 3. The input of the 26th convolutional layer is the output of the second E-ELAN submodule. The output feature map of the 26th convolutional layer is a feature map of 80x80x256.
[0247] The 27th convolutional layer is a 3x3 convolutional layer with 512 channels, a padding of 1, and a stride of 3. The input of the 27th convolutional layer is the output of the third E-ELAN submodule. The output feature map of the 27th convolutional layer is a 40x40x512 feature map.
[0248] The 28th convolutional layer is a 3x3 convolutional layer with a channel number of 1024, a padding of 1, and a stride of 3; the input of the 28th convolutional layer is the output of the fourth E-ELAN submodule; the output feature map of the 28th convolutional layer is a feature map of 20x20x1024;
[0249] The second neck module processes the updated tower body crack image feature map corresponding to the difficult tower body crack image to obtain a second multi-scale feature map, and sends the second multi-scale feature map to the second head module;
[0250] The second neck module includes the following contents: a second SPPCSPC submodule, a 29th convolutional layer, a 30th convolutional layer, a 31st convolutional layer, a third upsampling layer, a tenth splicing layer, a fifth E-ELAN submodule, a 32nd convolutional layer, a fourth upsampling layer, an eleventh splicing layer, a sixth E-ELAN submodule, a third MP-2 submodule, a 33rd convolutional layer, a seventh E-ELAN submodule, a fourth MP-2 submodule, a 34th convolutional layer, an eighth E-ELAN submodule, a 35th convolutional layer, a 36th convolutional layer, and a 37th convolutional layer;
[0251] The second SPPCSPC submodule has the same structure as the first SPPCSPC submodule; the second SPPCSPC submodule has the same structure as the first SPPCSPC submodule; the second SPPCSPC submodule input is the updated tower body crack image feature map corresponding to the difficult tower body crack image;
[0252] The 29th convolutional layer is a 1x1 convolutional layer with 256 channels, 1 padding, and a stride of 1. The input of the 29th convolutional layer is the output of the second ELAN submodule.
[0253] The 30th convolutional layer is a 1x1 convolutional layer with 256 channels, 1 padding, and a stride of 1. The input of the 30th convolutional layer is the output of the third ELAN submodule.
[0254] The 31st convolutional layer is a 1x1 convolutional layer with 256 channels, 1 padding, and a stride of 1. The input of the 31st convolutional layer is the output of the second SPPCSPC submodule.
[0255] The third upsampling layer input is the output of the 31st convolutional layer;
[0256] The tenth splicing layer is used to splice the output of the 30th convolutional layer and the output of the third upsampling layer to obtain a tenth splicing result;
[0257] The fifth E-ELAN submodule has the same structure as the first E-ELAN submodule; the input of the fifth E-ELAN submodule is the tenth splicing result;
[0258] The 32nd convolutional layer is a 1x1 convolutional layer with 256 channels, 1 padding, and a stride of 1. The input of the 32nd convolutional layer is the output of the fifth E-ELAN submodule.
[0259] The input of the fourth upsampling layer is the output of the 32nd convolutional layer;
[0260] The eleventh splicing layer is used to splice the output of the fourth upsampling layer and the output of the 29th convolutional layer to obtain an eleventh splicing result;
[0261] The sixth E-ELAN submodule has the same structure as the second E-ELAN submodule; the input of the sixth E-ELAN submodule is the eleventh splicing result;
[0262] The third MP-2 submodule has the same structure as the first MP-2 submodule; the input of the third MP-2 submodule is the output of the sixth E-ELAN submodule and the output of the fifth E-ELAN submodule;
[0263] The 33rd convolutional layer is a 1x1 convolutional layer with 512 channels, 1 padding, and a stride of 1. The input of the 33rd convolutional layer is the output of the third MP-2 submodule.
[0264] The seventh E-ELAN submodule has the same structure as the first E-ELAN submodule; the input of the seventh E-ELAN submodule is the output of the 33rd convolutional layer;
[0265] The fourth MP-2 submodule has the same structure as the first MP-2 submodule; the input of the fourth MP-2 submodule is the output of the second SPPCSPC submodule and the output of the seventh E-ELAN submodule;
[0266] The 34th convolutional layer is a 1x1 convolutional layer with 256 channels, 1 padding, and a stride of 1. The input of the 34th convolutional layer is the output of the fourth MP-2 submodule.
[0267] The eighth E-ELAN submodule structure is the same as the first E-ELAN submodule structure; the input of the eighth E-ELAN submodule structure is the output of the 34th convolutional layer;
[0268] The 35th convolutional layer is a 3x3 convolutional layer with 256 channels, 1 padding, and a stride of 3. The input of the 35th convolutional layer is the output of the sixth E-ELAN submodule.
[0269] The 36th convolutional layer is a 3x3 convolutional layer with 512 channels, 1 padding, and a stride of 3. The input of the 36th convolutional layer is the output of the seventh E-ELAN submodule.
[0270] The 37th convolutional layer is a 3x3 convolutional layer with 1024 channels, 1 padding, and a stride of 3. The input of the 37th convolutional layer is the output of the eighth E-ELAN submodule.
[0271] The first head module is used to obtain the tower body crack category and the tower body crack target detection frame in the image judged as a simple tower body crack;
[0272] The first head module includes: a first Conv2d layer, a second Conv2d layer, and a third Conv2d layer;
[0273] The input of the first Conv2d layer is the output of the 26th convolutional layer. The output of the first Conv2d layer is the tower crack image containing the tower crack target detection frame and the tower crack category. The input of the first Conv2d layer is a feature map of size 80x80x256.
[0274] The input of the second Conv2d layer is the output of the 27th convolutional layer; the output of the second Conv2d layer is the tower crack image containing the tower crack target detection frame and the tower crack category; the input of the first Conv2d layer is a feature map of size 40x40x512;
[0275] The input of the third Conv2d layer is the output of the 28th convolutional layer; the output of the third Conv2d layer is the tower crack image and the tower crack category containing the tower crack target detection frame; the input of the third Conv2d layer is a feature map of size 20x20x1024;
[0276] Each Conv2d layer in the tower crack recognition model contains a normalization sublayer and an activation function sublayer; the normalization sublayer uses Batch Normalization (BN), and the activation function sublayer uses Scaled Exponential Linear Unit (SiLu) activation function.
[0277] The first head module is used to obtain the tower body crack category and the tower body crack target detection frame in the image judged as a simple tower body crack;
[0278] The second head module includes: a fourth Conv2d layer, a fifth Conv2d layer, and a sixth Conv2d layer;
[0279] The input of the fourth Conv2d layer is the output of the 35th convolutional layer; the output of the fourth Conv2d layer is the tower crack image and the tower crack category containing the tower crack target detection frame; the input of the fourth Conv2d layer is a feature map of size 80x80x256;
[0280] The input of the fifth Conv2d layer is the output of the 36th convolutional layer; the output of the fifth Conv2d layer is the tower crack image and the tower crack category containing the tower crack target detection frame; the input of the fifth Conv2d layer is a feature map of size 20x20x1024;
[0281] The input of the sixth Conv2d layer is the output of the 37th convolutional layer; the output of the sixth Conv2d layer is the tower body crack image and the tower body crack category containing the tower body crack target detection frame; the input of the sixth Conv2d layer is a feature map of size 20x20x1024;
[0282] Specific embodiment 2: The deformable attention mechanism module is used to process the feature map output by the dynamic router module to obtain an updated feature map, specifically:
[0283] S1. Obtain the query vector using the feature map output by the backbone module:
[0284] Z q =X q W q
[0285] Among them, W q is the query weight matrix, Z q is the query vector, X q =X v =X, X is the query feature graph output by the dynamic router module, X v Represents the value feature map, X q Represents the query feature map;
[0286] S2. Use the query vector obtained in S1 to obtain the output of the deformable convolutional attention mechanism module:
[0287]
[0288] Δp mpk =Z q W (2)
[0289] V q =W′ m X q (p q +Δp mqk ) = W′ m X v (p q +Δp mqk ) (3)
[0290] A mqk =softmax(Δp mpk ) (4)
[0291] Among them, p q =(p qx ,p qy ) represents the feature graph X q The two-dimensional coordinates of any grid after rasterization, p qx It is p q The horizontal axis, p qy It is p q The vertical coordinate of W m Represents the calculation weight of the mth attention head, W is Z q The weight matrix, Δp mpk Represents the offset of the kth point in the feature map of the mth attention head (point p is obtained after the offset q ), X q (p q +Δp mqk ) is p in the query feature graph q +Δp mqkThe query feature value corresponding to the coordinate of the position, X v (p q +Δp mqk ) is the value feature map p q +Δp mqk The value eigenvalue corresponding to the coordinate of the position, V q Represents X q (p q +Δp mqk ) is X q In the feature map, p q +Δp mqk The eigenvalue corresponding to the coordinate is mapped to the eigenvector of the linear layer (also X v (p q +Δp mqk ) is X v In the feature map, p q +Δp mqk The eigenvalues corresponding to the coordinates are mapped to the eigenvectors by the linear layer), A mqk It's W m 'X v (p q +Δp mqk ) weight, by normalizing Δp mpk We get, m is the number of attention heads, M is the total number of attention heads, k is the number of points on the feature map, K is the total number of points that are offset on the feature map, and W′ m It's X q (p q +Δp mqk ), X v (p q +Δp mqk )’s weight matrix;
[0292] The specific process of formula (1) is expressed as follows: 1) For the mth attention head: Input feature map X q , through W q The linear map is z q 2) Z q After linear mapping W, we get the feature map X q The offset Δp of the grid two-dimensional coordinate (kth point) mqk 3) According to the feature map X q The nth grid two-dimensional coordinate p q , plus the offset of its k points is p q +Δp mqk , got X q The coordinates of the k offset points of the nth grid 2D coordinate point 3)X q (p q +Δp mqk) The corresponding k offset coordinate points are removed from the corresponding feature map X q (X q =X v ) After taking out the eigenvalue, pass W m ′The linear layer mapping obtains the V of the point q Vector 4) V of k offset points of nth point q Vector according to the corresponding weight A mqk The sum is the attention of the nth point 5) The attention of the nth point in the M heads is calculated according to W m The weights are added together. Note: The above weights can all be obtained through the linear layer
[0293] Specific implementation method three: the loss function of the tower crack recognition model trained with the training set in step two is a Laplace loss function.
[0294] The present invention passes the image of the tower to be inspected through the backbone module and then into the dynamic router module to determine the difficulty level of the tower image. If the image is judged to be "easy," the feature map is fed into the first neck module and the first head module. If the image is judged to be "difficult," the feature map is fed into the second neck module and the second head module to obtain the detection result. Through this judgment process, the image is inspected using convolution with different parameters. Considering that adjusting the convolution parameters will introduce redundant noise to the results, the present invention uses the Laplace damage function to train the tower crack recognition model.
Claims
1. A tower crack recognition method based on a deformable attention mechanism, characterized by The specific process of the method is as follows: obtaining a crack image of the tower body to be tested, inputting the crack image of the tower body to be tested into a dynamic target detection network, and obtaining a tower body crack detection result; The dynamic target detection network is obtained by: Step 1: Obtain the tower body crack dataset: Step 2: Divide the tower body crack dataset into a training set and a test set, use the training set and the test set to train and test the tower body crack recognition model, and obtain a dynamic target detection network; The tower crack recognition model includes: a backbone module, a dynamic router module, a deformable attention mechanism module, an image input judgment module, a first neck module, a second neck module, a first head module and a second head module; The backbone module is used to process the tower body crack image, obtain the tower body crack image feature map, and input the tower body crack image feature map into the deformable attention mechanism module; The dynamic router module is used to judge the difficulty of the tower body crack image according to the tower body crack image feature map, and send the difficulty of the tower body crack image to the image input judgment module; If there is only one crack in the tower body crack image, it means that the tower body crack image is a simple tower body crack image; if there is more than one crack in the tower body crack image, it means that the tower body crack image is a difficult tower body crack image; The deformable attention mechanism module is used to process the tower body crack image feature map output by the backbone module, obtain an updated tower body crack image feature map, and send the updated tower body crack image feature map to the image input judgment module; The image input judgment module is used to input the updated tower body crack image feature map into the first neck module or the second neck module according to the difficulty of the tower body crack image; The first neck module processes the updated tower body crack image feature map determined to correspond to the simple tower body crack image to obtain a first multi-scale feature map, and sends the first multi-scale feature map to the first head module; The second neck module processes the updated tower body crack image feature map corresponding to the difficult tower body crack image to obtain a second multi-scale feature map, and sends the second multi-scale feature map to the second head module; The first head module is used to obtain the tower body crack category and the tower body crack target detection frame in the image judged as a simple tower body crack; The second head module is used to obtain the tower crack category and the tower crack target detection frame in the image judged as difficult tower crack.
2. The method for identifying cracks in an iron tower body based on a deformable attention mechanism according to claim 1, characterized in that: The tower body crack data set in step 1 includes: The tower body crack dataset includes: tower body crack images, crack type labels, image difficulty labels, and crack target detection frame position labels; The crack target detection frame position label includes: the coordinates of the upper left corner and the lower right corner of the crack target detection frame; Crack types include: connection plate cracks, tower column cracks, platform cracks, and web cracks; If there is only one crack in the tower crack image, it means that the tower crack image is a simple tower crack image, and the image difficulty label is set to simple; if there is more than one crack in the tower crack image, it means that the tower crack image is a difficult tower crack image, and the image difficulty label is set to difficult.
3. The method for identifying cracks in an iron tower body based on a deformable attention mechanism according to claim 2, characterized in that: The backbone module includes: a first convolutional layer, a second convolutional layer, a third convolutional layer, a fourth convolutional layer, a first ELAN submodule, a first MP-1 submodule, a second ELAN submodule, a second MP-1 submodule, a third ELAN submodule, a third MP-1 submodule and a fourth ELAN submodule; The first convolutional layer is a 3x3 convolutional layer with 32 channels, 1 padding, and 1 stride. The second convolutional layer is a 3x3 convolutional layer with 64 channels, a padding of 1, and a stride of 2; the input of the second convolutional layer is the output of the first convolutional layer; The third convolutional layer is a 3x3 convolutional layer with 64 channels, 1 padding, and a stride of 1; the input of the third layer is the output of the second convolutional layer; The fourth convolutional layer is a 3x3 convolutional layer with 128 channels, 1 padding, and a stride of 2. The input of the fourth convolutional layer is the output of the third convolutional layer. The first ELAN submodule includes: a C1 layer, a C2 layer, a C3 layer, a C4 layer, a first concatenation layer, and a C5 layer; the input of the first ELAN submodule is the output of the fourth convolutional layer; The first MP-1 submodule includes: a first maximum pooling layer, an MP-1-1 convolutional layer, an MP-1-2 convolutional layer, an MP-1-3 convolutional layer, and a second concatenation layer; the input of the first MP-1 submodule is the output of the first ELAN submodule; The second ELAN submodule includes: a C1' layer, a C2' layer, a C3' layer, a C4' layer, a third splicing layer, and a C5' layer; the input of the second ELAN submodule is the output of the first MP-1 submodule; The second MP-1 submodule has the same structure as the first MP-1 submodule; the input of the second MP-1 submodule is the output of the second ELAN submodule; The third ELAN submodule has the same structure as the second ELAN submodule; the input of the third ELAN submodule is the output of the second MP-1 submodule; The third MP-1 submodule has the same structure as the first MP-1 submodule; the input of the third MP-1 submodule is the output of the third ELAN submodule; The fourth ELAN submodule has the same structure as the second ELAN submodule; the input of the fourth ELAN submodule is the output of the third MP-1 submodule.
4. The method for identifying cracks in an iron tower body based on a deformable attention mechanism according to claim 3, characterized in that: The first ELAN submodule includes: C1 layer, C2 layer, C3 layer, C4 layer, first splicing layer and C5 layer, specifically: The C1 layer is a 1x1 convolutional layer with 64 channels, 1 padding, and a stride of 1. The input of the C1 layer is the output of the 4th convolutional layer. The C2 layer is a 1x1 convolutional layer with 64 channels, 1 padding, and a stride of 1. The input of the C2 layer is the output of the 4th convolutional layer. The C3 layer includes: C3-1 sublayer and C3-2 sublayer; The C3-1 sublayer is a 3x3 convolutional layer with 64 channels, 1 padding, and a stride of 1. The input of the C3-1 sublayer is the output of the C2 layer. The C3-2 sublayer is a 3x3 convolutional layer with 64 channels, 1 padding, and a stride of 1. The input of the C3-2 sublayer is the output of the C3-1 sublayer. The C4 layer includes: C4-1 sublayer and C4-2 sublayer; The C4-1 sublayer is a 3x3 convolutional layer with 64 channels, 1 padding, and a stride of 1. The input of the C4-1 sublayer is the output of the C3-2 sublayer. The C4-2 sublayer is a 3x3 convolutional layer with 64 channels, 1 padding, and a stride of 1. The input of the C4-2 sublayer is the output of the C4-1 sublayer. The first splicing layer is used to splice the outputs of layers C1, C2, C3, and C4 to obtain a first splicing result; The C5 layer is a 1x1 convolutional layer with 256 channels, 1 padding, and a stride of 1. The input of the C5 layer is the first concatenation result.
5. The method for identifying cracks in an iron tower body based on a deformable attention mechanism according to claim 4, characterized in that: The first MP-1 submodule includes: a first maximum pooling layer, an MP-1-1 convolutional layer, an MP-1-2 convolutional layer, an MP-1-3 convolutional layer, and a second splicing layer, specifically: The first maximum pooling sublayer is a 2x2 maximum pooling layer; the input of the first maximum pooling layer is the output of the first ELAN submodule; The MP-1-1 convolution layer is a 1x1 convolution layer with 128 channels, 1 padding, and a stride of 1. The input of the MP-1-1 convolution layer is the output of the first maximum pooling layer. The MP-1-2 convolutional layer is a 1x1 convolutional layer with 128 channels, 1 padding, and a stride of 1. The input of the MP-1-2 convolutional layer is the output of the first ELAN submodule. The MP-1-3 convolution layer is a 3x3 convolution layer with 128 channels, 1 padding, and a stride of 2. The input of the MP-1-3 convolution layer is the output of the MP-1-2 convolution layer. The second splicing layer is used to splice the output of the MP-1-1 convolutional layer and the output of the MP-1-3 convolutional layer to obtain a second splicing result.
6. The method for identifying cracks in an iron tower body based on a deformable attention mechanism according to claim 5, characterized in that: The second ELAN submodule includes: C1' layer, C2' layer, C3' layer, C4' layer, third splicing layer, C5' layer, specifically: The C1' layer is a 1x1 convolutional layer with 128 channels, 1 padding, and a stride of 1. The input of the C1' layer is the output of the first MP-1 submodule. The C2' layer is a 1x1 convolutional layer with 128 channels, 1 padding, and a stride of 1. The input of the C2' layer is the output of the first MP-1 submodule. The C3' layer includes: a C3'-1 sublayer and a C3'-2 sublayer; The C3'-1 sublayer is a 3x3 convolutional layer with 128 channels, 1 padding, and a stride of 1. The input of the C3'-1 sublayer is the output of the C2' layer. The C3'-2 sublayer is a 3x3 convolutional layer with 128 channels, 1 padding, and a stride of 1. The input of the C3'-2 sublayer is the output of the C3'-1 sublayer. The C4' layer includes: a C4'-1 sublayer and a C4'-2 sublayer; The C4'-1 sublayer is a 3x3 convolutional layer with 128 channels, 1 padding, and a stride of 1. The input of the C4'-1 sublayer is the output of the C3'-2 sublayer. The C4'-2 sublayer is a 3x3 convolutional layer with 128 channels, 1 padding, and a stride of 1. The input of the C4'-2 sublayer is the output of the C4'-1 sublayer. The third splicing layer is used to splice the outputs of the C1', C2', C3', and C4' layers to obtain a third splicing result; The C5' layer is a 1x1 convolution layer with a channel number of 512, a padding of 1, and a stride of 1; the input of the C5' layer is the third splicing result.
7. The method for identifying cracks in an iron tower body based on a deformable attention mechanism according to claim 6, characterized in that: The first neck module includes: a first SPPCSPC submodule, a 12th convolutional layer, a 13th convolutional layer, a 14th convolutional layer, a first upsampling layer, a sixth splicing layer, a first E-ELAN submodule, a 22nd convolutional layer, a second upsampling layer, an eighth splicing layer, a second E-ELAN submodule, a first MP-2 submodule, a third E-ELAN submodule, a second MP-2 submodule, a fourth E-ELAN submodule, a 26th convolutional layer, a 27th convolutional layer, and a 28th convolutional layer, specifically: The first SPPCSPC submodule includes: the 5th convolutional layer, the 6th convolutional layer, the 7th convolutional layer, the 2nd maximum pooling layer, the 3rd maximum pooling layer, the 4th maximum pooling layer, the 4th splicing layer, the 8th convolutional layer, the 9th convolutional layer, the 10th convolutional layer, the 5th splicing layer, and the 11th convolutional layer, specifically: The fifth convolutional layer is a 1x1 convolutional layer with 64 channels, 1 padding, and a stride of 1. The input of the fifth convolutional layer is the updated tower crack image feature map corresponding to the simple tower crack image. The sixth convolutional layer is a 3x3 convolutional layer; the input of the sixth convolutional layer is the output of the fifth convolutional layer; The seventh convolutional layer is a 1x1 convolutional layer; the input of the seventh convolutional layer is the output of the sixth convolutional layer; The size of the second maximum pooling layer is 5x5; the input of the second maximum pooling layer is the output of the 7th convolutional layer; The size of the third maximum pooling layer is 9x9; the input of the third maximum pooling layer is the output of the 7th convolutional layer; The size of the fourth maximum pooling layer is 13x13; the input of the fourth maximum pooling layer is the output of the seventh convolutional layer; The fourth splicing layer is used to splice the outputs of the second maximum pooling layer, the third maximum pooling layer, the fourth maximum pooling layer and the seventh convolutional layer to obtain a fourth splicing result; The eighth convolutional layer is a 1x1 convolutional layer with 64 channels, 1 padding, and a stride of 3; the input of the eighth convolutional layer is the fourth splicing result; The 9th convolutional layer is a 3x3 convolutional layer; the input of the 9th convolutional layer is the output of the 8th convolutional layer; The tenth convolutional layer is a 1x1 convolutional layer; the input of the tenth convolutional layer is the updated tower crack image feature map corresponding to the simple tower crack image; The fifth splicing layer is used to splice the output of the tenth convolutional layer and the output of the ninth convolutional layer to obtain a fifth splicing result; The 11th convolutional layer is a 1x1 convolutional layer; the input of the 11th convolutional layer is the fifth splicing result; The 12th convolutional layer is a 1x1 convolutional layer with 256 channels, 1 padding, and a stride of 1. The input of the 12th convolutional layer is the output of the second ELAN submodule. The 13th convolutional layer is a 1x1 convolutional layer with 256 channels, 1 padding, and a stride of 1. The input of the 13th convolutional layer is the output of the third ELAN submodule. The 14th convolutional layer is a 1x1 convolutional layer with 256 channels, 1 padding, and a stride of 1. The input of the 14th convolutional layer is the output of the first SPPCSPC submodule. The input of the first upsampling layer is the output of the 14th convolutional layer; The sixth splicing layer is used to splice the output of the 13th convolutional layer and the output of the first upsampling layer to obtain a sixth splicing result; The first E-ELAN submodule includes: the 15th convolution layer, the 16th convolution layer, the 17th convolution layer, the 18th convolution layer, the 19th convolution layer, the 20th convolution layer, the seventh splicing layer, and the 21st convolution layer; the input of the first E-ELAN submodule is the sixth splicing result, specifically: The 15th convolutional layer is a 1x1 convolutional layer with 256 channels, 1 padding, and a stride of 1. The input of the 15th convolutional layer is the sixth concatenation result. The 16th convolutional layer is a 1x1 convolutional layer with 256 channels, 1 padding, and a stride of 1. The input of the 16th convolutional layer is the sixth concatenation result. The 17th convolutional layer is a 3x3 convolutional layer with 256 channels, 1 padding, and a stride of 1. The input of the 17th convolutional layer is the output of the 16th convolutional layer. The 18th convolutional layer is a 3x3 convolutional layer with 256 channels, 1 padding, and a stride of 1. The input of the 18th convolutional layer is the output of the 17th convolutional layer. The 19th convolutional layer is a 3x3 convolutional layer with 256 channels, 1 padding, and a stride of 1. The input of the 19th convolutional layer is the output of the 18th convolutional layer. The 20th convolutional layer is a 3x3 convolutional layer with 256 channels, 1 padding, and a stride of 1. The input of the 20th convolutional layer is the output of the 19th convolutional layer. The seventh splicing layer splices the output of the 15th convolutional layer, the output of the 16th convolutional layer, the output of the 18th convolutional layer, and the output of the 20th convolutional layer to obtain a seventh splicing result; The 21st convolutional layer is a 1x1 convolutional layer with 256 channels, 1 padding, and a stride of 1. The input of the 21st convolutional layer is the seventh concatenation result. The 22nd convolutional layer is a 1x1 convolutional layer with 256 channels, 1 padding, and a stride of 1. The input of the 22nd convolutional layer is the output of the first E-ELAN submodule. The input of the second upsampling layer is the output of the 22nd convolutional layer; The eighth splicing layer splices the output of the second upsampling layer and the output of the 12th convolutional layer to obtain an eighth splicing result; The second E-ELAN submodule has the same structure as the first E-ELAN submodule; the input of the second E-ELAN submodule is the eighth splicing result; The first MP-2 submodule includes: a fifth maximum pooling layer, a 23rd convolutional layer, a 24th convolutional layer, a 25th convolutional layer, and a ninth concatenation layer; the input of the first MP-2 submodule is the output of the second E-ELAN submodule and the output of the first E-ELAN submodule; the first MP-2 submodule is specifically: The size of the fifth maximum pooling layer is 2x2; the input of the fifth maximum pooling layer is the output of the second E-ELAN submodule; The 23rd convolutional layer is a 1x1 convolutional layer; the input of the 23rd convolutional layer is the output of the second E-ELAN submodule; The 24th convolutional layer is a 1x1 convolutional layer; the input of the 24th convolutional layer is the output of the fifth maximum pooling layer; The 25th convolutional layer is a 3x3 convolutional layer; the input of the 25th convolutional layer is the output of the 23rd convolutional layer; The ninth splicing layer is used to splice the output of the 24th convolutional layer, the output of the 25th convolutional layer and the eighth splicing result to obtain a ninth splicing result; The third E-ELAN submodule has the same structure as the first E-ELAN submodule; the input of the third E-ELAN submodule is the first MP-2 submodule; The second MP-2 submodule has the same structure as the first MP-2 submodule; the input of the second MP-2 submodule is the output of the third E-ELAN submodule and the output of the first SPPCSPC submodule; The fourth E-ELAN submodule has the same structure as the first E-ELAN submodule; the input of the fourth E-ELAN submodule is the output of the second MP-2 submodule; The 26th convolutional layer is a 3x3 convolutional layer with 256 channels, 1 padding, and a stride of 3; the input of the 26th convolutional layer is the output of the second E-ELAN submodule; The 27th convolutional layer is a 3x3 convolutional layer with 512 channels, a padding of 1, and a stride of 3. The input of the 27th convolutional layer is the output of the third E-ELAN submodule. The 28th convolutional layer is a 3x3 convolutional layer with 1024 channels, 1 padding, and a stride of 3. The input of the 28th convolutional layer is the output of the fourth E-ELAN submodule.
8. The method for identifying cracks in an iron tower body based on a deformable attention mechanism according to claim 6, characterized in that: The second neck module includes: a second SPPCSPC submodule, a 29th convolutional layer, a 30th convolutional layer, a 31st convolutional layer, a third upsampling layer, a tenth splicing layer, a fifth E-ELAN submodule, a 32nd convolutional layer, a fourth upsampling layer, an eleventh splicing layer, a sixth E-ELAN submodule, a third MP-2 submodule, a 33rd convolutional layer, a seventh E-ELAN submodule, a fourth MP-2 submodule, a 34th convolutional layer, an eighth E-ELAN submodule, a 35th convolutional layer, a 36th convolutional layer, and a 37th convolutional layer, specifically: The second SPPCSPC submodule has the same structure as the first SPPCSPC submodule; the second SPPCSPC submodule has the same structure as the first SPPCSPC submodule; the second SPPCSPC submodule input is the updated tower body crack image feature map corresponding to the difficult tower body crack image; The 29th convolutional layer is a 1x1 convolutional layer with 256 channels, 1 padding, and a stride of 1. The input of the 29th convolutional layer is the output of the second ELAN submodule. The 30th convolutional layer is a 1x1 convolutional layer with 256 channels, 1 padding, and a stride of 1. The input of the 30th convolutional layer is the output of the third ELAN submodule. The 31st convolutional layer is a 1x1 convolutional layer with 256 channels, 1 padding, and a stride of 1. The input of the 31st convolutional layer is the output of the second SPPCSPC submodule. The third upsampling layer input is the output of the 31st convolutional layer; The tenth splicing layer is used to splice the output of the 30th convolutional layer and the output of the third upsampling layer to obtain a tenth splicing result; The fifth E-ELAN submodule has the same structure as the first E-ELAN submodule; the input of the fifth E-ELAN submodule is the tenth splicing result; The 32nd convolutional layer is a 1x1 convolutional layer with 256 channels, 1 padding, and a stride of 1. The input of the 32nd convolutional layer is the output of the fifth E-ELAN submodule. The input of the fourth upsampling layer is the output of the 32nd convolutional layer; The eleventh splicing layer is used to splice the output of the fourth upsampling layer and the output of the 29th convolutional layer to obtain an eleventh splicing result; The sixth E-ELAN submodule has the same structure as the second E-ELAN submodule; the input of the sixth E-ELAN submodule is the eleventh splicing result; The third MP-2 submodule has the same structure as the first MP-2 submodule; the input of the third MP-2 submodule is the output of the sixth E-ELAN submodule and the output of the fifth E-ELAN submodule; The 33rd convolutional layer is a 1x1 convolutional layer with 512 channels, 1 padding, and a stride of 1. The input of the 33rd convolutional layer is the output of the third MP-2 submodule. The seventh E-ELAN submodule has the same structure as the first E-ELAN submodule; the input of the seventh E-ELAN submodule is the output of the 33rd convolutional layer; The fourth MP-2 submodule has the same structure as the first MP-2 submodule; the input of the fourth MP-2 submodule is the output of the second SPPCSPC submodule and the output of the seventh E-ELAN submodule; The 34th convolutional layer is a 1x1 convolutional layer with 256 channels, 1 padding, and a stride of 1. The input of the 34th convolutional layer is the output of the fourth MP-2 submodule. The eighth E-ELAN submodule structure is the same as the first E-ELAN submodule structure; the input of the eighth E-ELAN submodule structure is the output of the 34th convolutional layer; The 35th convolutional layer is a 3x3 convolutional layer with 256 channels, 1 padding, and a stride of 3. The input of the 35th convolutional layer is the output of the sixth E-ELAN submodule. The 36th convolutional layer is a 3x3 convolutional layer with 512 channels, 1 padding, and a stride of 3. The input of the 36th convolutional layer is the output of the seventh E-ELAN submodule. The 37th convolutional layer is a 3x3 convolutional layer with 1024 channels, 1 padding, and a stride of 3. The input of the 37th convolutional layer is the output of the eighth E-ELAN submodule.
9. The method for identifying cracks in an iron tower body based on a deformable attention mechanism according to claim 7, characterized in that: The first head module includes: a first Conv2d layer, a second Conv2d layer, and a third Conv2d layer; The input of the first Conv2d layer is the output of the 26th convolutional layer. The output of the first Conv2d layer is the tower crack image containing the tower crack target detection frame and the tower crack category. The input of the first Conv2d layer is a feature map of size 80x80x256. The input of the second Conv2d layer is the output of the 27th convolutional layer; the output of the second Conv2d layer is the tower crack image containing the tower crack target detection frame and the tower crack category; the input of the first Conv2d layer is a feature map of size 40x40x512; The input of the third Conv2d layer is the output of the 28th convolutional layer; the output of the third Conv2d layer includes the tower body crack image and the tower body crack category containing the tower body crack target detection frame; the input of the third Conv2d layer is a feature map of size 20x20x1024.
10. The method for identifying cracks in an iron tower body based on a deformable attention mechanism according to claim 8, characterized in that: The second head module includes: a fourth Conv2d layer, a fifth Conv2d layer, and a sixth Conv2d layer; The input of the fourth Conv2d layer is the output of the 35th convolutional layer; the output of the fourth Conv2d layer is the tower crack image and the tower crack category containing the tower crack target detection frame; the input of the fourth Conv2d layer is a feature map of size 80x80x256; The input of the fifth Conv2d layer is the output of the 36th convolutional layer; the output of the fifth Conv2d layer is the tower crack image and the tower crack category containing the tower crack target detection frame; the input of the fifth Conv2d layer is a feature map of size 20x20x1024; The input of the sixth Conv2d layer is the output of the 37th convolutional layer; the output of the sixth Conv2d layer includes the tower body crack image and the tower body crack category containing the tower body crack target detection frame; the input of the sixth Conv2d layer is a feature map of size 20x20x1024.
Citation Information
Patent Citations
Bridge concrete crack detection method under complex background based on deep learning
CN116823800A
Lightweight crack segmentation method based on convolutional neural network
CN116993737A