A crack identification method, device, medium and equipment
By combining the Swing Transformer network and the inverse residual network, the crack identification method solves the problems of difficulty in extracting global features and easy loss of local features in the existing technology, and improves the accuracy and robustness of crack identification.
Patent Information
- Application Number
- CN202210789782.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-07-06
- Publication Date
- 2026-01-13
- Estimated Expiration
- 2042-07-06
AI Technical Summary
In existing crack recognition methods, semantic segmentation methods based on convolutional neural networks have difficulty capturing the global features of cracks, resulting in low model accuracy and poor robustness. On the other hand, methods based on self-attention mechanisms are prone to losing local features, leading to low recognition accuracy.
A crack identification method combining self-attention mechanism and convolutional neural network is adopted. Deep and shallow features of cracks are extracted by Swing Transformer network and inverse residual network. Feature fusion and decoding modules are used to fuse and enhance features, thereby improving the crack identification accuracy and robustness.
It effectively improves the accuracy and robustness of crack identification, can accurately extract global and local features of cracks, reduces missed detections and false detections, and improves detection efficiency.
Smart Images

Figure CN115187539B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the field of structural disease detection, in particular to a crack identification method, device, medium and equipment. BACKGROUND
[0002] Under the action of complex operating environment, such as surrounding rock pressure variation, groundwater, long-term differential settlement, temperature change, internal vehicle load, adjacent engineering disturbance, various types of diseases will occur in various types of infrastructure. Among them, crack is one of the most common diseases, if the crack is not treated in time, it will be very likely to cause structural deformation, water leakage, concrete spalling and other hazards, and further affect the operation safety of the tunnel. Therefore, scientific detection and treatment of crack disease is of great significance to ensure the operation safety of infrastructure.
[0003] At present, the traditional infrastructure surface crack detection method is mainly manual inspection, which is not only low in efficiency, but also seriously affected by the subjective influence of the detection personnel, and often appears the phenomenon of missed detection and wrong detection in the actual detection process.
[0004] With the rapid development of computer technology, deep learning algorithm is gradually applied to the detection of structural surface crack disease, among which the semantic segmentation method based on convolutional neural network has been widely applied. The core of convolutional neural network is convolution kernel, which has inductive bias such as translation invariance and local sensitivity, and can capture local space-time information, but the convolution kernel has locality and cannot fully utilize the context information, resulting in that this kind of method is difficult to capture the global features of crack, which is specifically manifested in crack identification as low model precision and poor robustness. The self-attention mechanism is not limited by local interaction and can mine long-distance dependency, which can better extract the global semantic information of crack image when applied to crack identification. However, compared with the semantic segmentation method based on convolutional neural network, the semantic segmentation method based on self-attention mechanism has the problem of easy loss of local features in crack identification.
[0005] It can be seen that it is urgent to propose a crack identification method combining self-attention mechanism and convolutional neural network to play the advantages of the two structures, so as to accurately improve the local features and global semantic features of crack and improve the precision and robustness of crack identification. SUMMARY
[0006] The present application provides a crack identification method, device, medium and equipment, which aims to effectively extract the detail features such as corner points and edges of cracks, and also accurately extract the global features such as color and shape of cracks, thereby partially solving the problems of low recognition accuracy and poor robustness in the prior art.
[0007] In order to achieve the above object, the application provides a crack identification method, comprising:
[0008] Step 1, obtaining a crack image to be identified;
[0009] Step 2, inputting the crack image to be identified into a crack semantic segmentation network for crack identification to obtain a crack identification result;
[0010] The crack semantic segmentation network comprises a double-branch feature extraction module, a feature fusion module and a decoding module connected in sequence.
[0011] Further, step 2 further comprises:
[0012] preprocessing the crack image to be identified;
[0013] inputting the preprocessed crack image into the crack semantic segmentation network for crack identification to obtain a crack identification result.
[0014] Further, the double-branch feature extraction module comprises a Swin Transformer network and a reverse residual network;
[0015] The Swin Transformer network is used to extract a deep feature layer of the preprocessed crack image;
[0016] The reverse residual network is used to extract a shallow feature layer of the preprocessed crack image;
[0017] The output end of the Swin Transformer network and the output end of the reverse residual network are both connected with the input end of the feature fusion module.
[0018] Further, the Swin Transformer network comprises four layers, the first layer is composed of a Patch Patition module, the second layer comprises a linear mapping module and two Swin Transformer Blocks connected in sequence, the third layer comprises a Patch Merging module and six Swin Transformer Blocks connected in sequence, and the fourth layer comprises a Patch Merging module and eight Swin Transformer Blocks connected in sequence; the preprocessed crack image is input into the Swin Transformer network for feature extraction through the first layer, the second layer, the third layer and the fourth layer connected in sequence, and a first deep feature layer is output after the third layer, and a second deep feature layer is output after the fourth layer.
[0019] The inverse residual network comprises two layers, each layer comprising three inverse residual modules, the inverse residual module comprising a standard convolution layer, a depth separable convolution layer and an ECA attention module connected in sequence; the preprocessed crack image is input into the inverse residual network to extract features through the first layer and the second layer connected in sequence, and a shallow feature layer is output.
[0020] Further, the feature fusion module comprises a first feature fusion submodule and a second feature fusion submodule; the input end of the first feature fusion submodule is connected with the output end of the second layer in the inverse residual network, the output end of the third layer in the Swin Transformer network and the output end of the fourth layer in the Swin Transformer network respectively, and the first deep feature layer, the second deep feature layer and the shallow feature layer are sequentially up-sampled and fused to output a preliminary fused shallow feature layer, a preliminary fused first deep feature layer and a preliminary fused second deep feature layer; the input end of the second feature fusion submodule is connected with the output end of the first feature fusion submodule, the preliminary fused shallow feature layer is subjected to convolution processing, and a fused shallow feature layer is output, and the preliminary fused first deep feature layer and the preliminary fused second deep feature layer are down-sampled and fused to output a fused deep feature layer.
[0021] Further, the first feature fusion submodule comprises a first CDEC module, a second CDEC module, a first up-sampling layer, a second up-sampling layer and a first convolution layer; the input end of the first convolution layer is connected with the output end of the fourth layer in the Swin Transformer network, the output end of the first convolution layer is connected with the input end of the first up-sampling layer, the output end of the first up-sampling layer is connected with the input end of the first CDEC module, the input end of the first CDEC module is connected with the output end of the third layer in the Swin Transformer network, the output end of the first CDEC module is connected with the input end of the second up-sampling layer, the output end of the second up-sampling layer is connected with the input end of the second CDEC module, the input end of the second CDEC module is connected with the output end of the second layer in the inverse residual network, and the output end of the second CDEC module is connected with the second feature fusion submodule.
[0022] Further, the second feature fusion sub-module comprises a third CDEC module, a fourth CDEC module, a first down-sampling layer, a second down-sampling layer and a second convolutional layer; the input end of the second convolutional layer is connected with the output end of the second CDEC module, the output end of the second convolutional layer is connected with the input end of the decoding module, the output end of the second convolutional layer is connected with the input end of the first down-sampling layer, the output end of the first down-sampling layer is connected with the input end of the third CDEC module, the input end of the third CDEC module is connected with the output end of the first CDEC module, the output end of the third CDEC module is connected with the input end of the second down-sampling layer, the output end of the second down-sampling layer is connected with the input end of the fourth CDEC module, and the input end of the fourth CDEC module is connected with the output end of the first convolutional layer.
[0023] Further, the semantic segmentation network further comprises a feature enhancement module, the input end of the feature enhancement module is connected with the output end of the fourth CDEC module, and the output end of the feature enhancement module is connected with the output end of the decoding module; the feature enhancement module comprises an ASPP feature pyramid, an ECA attention module and a standard convolutional layer connected in sequence; the input end of the ASPP feature pyramid is connected with the output end of the fourth CDEC module in the feature fusion module, and the output end of the standard convolutional layer is connected with the decoding module; the deep feature layer input is input into the feature enhancement module, and the deep feature layer is enhanced through the ASPP feature pyramid, the ECA attention module and the standard convolutional layer to obtain an enhanced deep feature layer and is input into the decoding module for decoding.
[0024] The application further provides a crack identification device, comprising:
[0025] an image acquisition module, configured to acquire a crack image to be identified;
[0026] a crack identification module, configured to input the crack image to be identified into a crack semantic segmentation network for crack identification to obtain a crack identification result.
[0027] The application further provides a computer readable storage medium having a computer program stored thereon, when the computer program is executed, the crack identification method is realized.
[0028] The application further provides a crack identification device based on a semantic segmentation network, comprising a memory and a processor; the memory is configured to store a computer program and intermediate data during program processing, and the processor is configured to execute the computer program to realize the crack identification method.
[0029] The above scheme of the application has the following advantages:
[0030] Compared with the prior art, the problems of difficulty in extracting global features and poor model robustness in the crack segmentation method based on the convolutional neural network and the problems of data dependency and easy loss of local features in the crack segmentation method based on the self-attention mechanism are solved, so that the recognition accuracy of the crack is effectively improved.
[0031] Other benefits of the present application will be described in detail in the subsequent specific embodiment part. BRIEF DESCRIPTION OF DRAWINGS
[0032] Figure 1 The flowchart of the embodiment of the present application is shown in the figure;
[0033] Figure 2 The crack semantic segmentation network structure diagram in the embodiment of the present application is shown in the figure;
[0034] Figure 3 The Swin Transformer network structure diagram in the embodiment of the present application is shown in the figure;
[0035] Figure 4 The inverse residual network structure diagram in the embodiment of the present application is shown in the figure;
[0036] Figure 5 The ECA attention module structure diagram in the inverse residual network in the embodiment of the present application is shown in the figure;
[0037] Figure 6 The feature fusion module structure diagram in the embodiment of the present application is shown in the figure;
[0038] Figure 7 The original image and the crack segmentation result comparison diagram in the embodiment of the present application are shown in the figure. DETAILED DESCRIPTION
[0039] In order to make the technical problems, technical solutions and advantages of the present application clearer, the following will be described in detail in combination with the drawings and specific embodiments. Obviously, the described embodiments are part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative labor belong to the scope of protection of the present application.
[0040] In the description of the present application, it should be noted that the terms "center", "upper", "lower", "left", "right", "vertical", "horizontal", "inner", "outer" and the like indicate the orientation or positional relationship shown in the drawings, and are only for the convenience of describing the present application and simplifying the description, and do not indicate or imply that the devices or elements referred to must have a particular orientation, be constructed and operated in a particular orientation, and therefore cannot be understood as limiting the present application. In addition, the terms "first", "second", "third" are only for descriptive purposes and cannot be understood as indicating or implying relative importance.
[0041] In the description of the present application, it should be noted that unless otherwise explicitly specified and limited, the terms "mounting", "connecting", "connecting" should be understood broadly, for example, it can be a locking connection, or a detachable connection, or an integral connection; it can be a mechanical connection, or an electrical connection; it can be directly connected, or indirectly connected through an intermediate medium, or the internal communication of two elements. For those skilled in the art, the specific meaning of the above terms in the present application can be understood according to the specific circumstances.
[0042] In addition, the technical features involved in the different embodiments of the application described below can be combined with each other as long as there is no conflict.
[0043] The present application aims at the existing problems, and provides a crack identification method, device, medium and equipment, which can be applied to the crack identification process in the infrastructure detection scene.
[0044] As Figure 1 shown, the embodiment of the present application provides a crack identification method, comprising:
[0045] Step 1, acquiring a crack image to be identified;
[0046] Step 2, inputting the crack image to be identified into a crack semantic segmentation network for crack identification to obtain a crack identification result.
[0047] Specifically, the crack image is obtained by taking a picture of the crack existing on the surface of the infrastructure structure, the crack image data is artificially labeled by using a pixel-level labeling method to generate a crack label, the crack image and the crack label jointly constitute a crack dataset, and the crack dataset is divided into a training set and a test set according to a certain proportion.
[0048] Specifically, the crack semantic segmentation network comprises a double-branch feature extraction module, a feature fusion module and a decoding module connected in sequence.
[0049] Specifically, step 2 further comprises pre-processing the crack image to be identified, and adjusting the size of the crack image to be uniform to 512*512 through an image pre-processing module; inputting the pre-processed crack image into the crack semantic segmentation network for crack identification to obtain a crack identification result.
[0050] Specifically, as shown in Figure 2 The dual-branch feature extraction module includes a SwinTransformer network based on a self-attention mechanism and a reverse residual network based on a convolutional neural network, the SwinTransformer network based on the self-attention mechanism is used to extract a deep feature layer containing global semantic information of the crack, and the reverse residual network based on the convolutional neural network is used to extract a shallow feature layer containing detailed features such as corner points and edges of the crack.
[0051] As shown in Figure 3 The SwinTransformer network contains four layers, the first layer is composed of a PatchPatition module, the second layer includes a linear mapping module and two SwinTransformerBlock modules connected in sequence, the third layer includes a PatchMerging module and six SwinTransformerBlock modules connected in sequence, and the fourth layer includes a PatchMerging module and eight SwinTransformerBlock modules connected in sequence.
[0052] Specifically, the pre-processed crack image is input into the SwinTransformer network for feature extraction through the first layer, the second layer, the third layer and the fourth layer connected in sequence, and a first deep feature layer is output after the third layer, and a second deep feature layer is output after the fourth layer.
[0053] It should be clear to those skilled in the art that the Swin Transformer is a Shifted window Transformer, which is a deep learning model based on the Transformer, the Patch Patition module is used to segment the collected crack image, the PatchMerging module is used to down-sample before each step, which is used to reduce the resolution, adjust the number of channels and form a hierarchical design, and the Swin TransformerBlock is composed of a normalization layer, a window multi-head self-attention, a shifted window multi-head self-attention and a multi-layer perception.
[0054] As shown in Figure 4As shown, the inverse residual network based on the convolutional neural network comprises two layers, each of which includes three inverse residual modules, and each inverse residual module includes a standard convolutional layer, a depth separable convolutional layer and an ECA attention module connected in sequence.
[0055] The preprocessed crack image is input into the inverse residual network for feature extraction through the first layer and the second layer connected in sequence, and a shallow feature layer is output.
[0056] More specifically, as shown in Figure 5 The ECA attention module is composed of a global average pooling layer, an adaptive one-dimensional convolutional layer and a Sigmoid activation function, and is used to enhance the semantic information of the crack and suppress the interference of complex background information.
[0057] Specifically, the feature fusion module is used to fuse the deep feature layer and the shallow feature layer extracted by the double-branch feature extraction module, so as to combine the advantages of the two types of feature layers, solve the scale problem in crack recognition and enhance the robustness of the model.
[0058] More specifically, as shown in Figure 6 The feature fusion module includes a first feature fusion sub-module and a second feature fusion sub-module; the input end of the first feature fusion sub-module is connected to the output end of the second layer in the inverse residual network, the output end of the third layer in the SwinTransformer network and the output end of the fourth layer in the SwinTransformer network, respectively, and the first deep feature layer, the second deep feature layer and the shallow feature layer are sequentially up-sampled and fused, and the preliminarily fused shallow feature layer, the preliminarily fused first deep feature layer and the preliminarily fused second deep feature layer are output; the input end of the second feature fusion sub-module is connected to the output end of the first feature fusion sub-module, and the preliminarily fused shallow feature layer is subjected to convolution processing, and the fused shallow feature layer is output; the preliminarily fused first deep feature layer and the preliminarily fused second deep feature layer are down-sampled and fused, and the fused deep feature layer is output.
[0059] More specifically, the first feature fusion sub-module comprises a first CDEC module, a second CDEC module, a first up-sampling layer, a second up-sampling layer and a first convolutional layer; the input end of the first convolutional layer is connected to the output end of the fourth layer in the Swin Transformer network, the output end of the first convolutional layer is connected to the input end of the first up-sampling layer, the output end of the first up-sampling layer is connected to the input end of the first CDEC module, the input end of the first CDEC module is connected to the output end of the third layer in the Swin Transformer network, the output end of the first CDEC module is connected to the input end of the second up-sampling layer, the output end of the second up-sampling layer is connected to the input end of the second CDEC module, the input end of the second CDEC module is connected to the output end of the second layer in the inverse residual network, and the output end of the second CDEC module is connected to the input end of the second feature fusion sub-module.
[0060] More specifically, the second feature fusion sub-module comprises a third CDEC module, a fourth CDEC module, a first down-sampling layer, a second down-sampling layer and a second convolutional layer; the input end of the second convolutional layer is connected to the output end of the second CDEC module to obtain a fused shallow feature layer, the output end of the second convolutional layer is connected to the input end of the first down-sampling layer, the output end of the first down-sampling layer is connected to the input end of the third CDEC module, the input end of the third CDEC module is connected to the output end of the first CDEC module, the output end of the third CDEC module is connected to the input end of the second down-sampling layer, the output end of the second down-sampling layer is connected to the input end of the fourth CDEC module, and the input end of the fourth CDEC module is connected to the output end of the first convolutional layer.
[0061] More specifically, the CDEC module is composed of a Concat layer, a depth separable convolutional layer with a convolution kernel size of 3x3, an ECA attention module and a standard convolutional layer with a convolution kernel size of 1x1 connected in sequence.
[0062] Specifically, the semantic segmentation network further comprises a feature enhancement module, the input end of the feature enhancement module is connected to the output end of the fourth CDEC module, and the output end of the feature enhancement module is connected to the output end of the decoding module.
[0063] More specifically, the feature enhancement module comprises an ASPP feature pyramid, an ECA attention module and a standard convolutional layer connected in sequence; the input end of the ASPP feature pyramid is connected to the output end of the fourth CDEC module in the feature fusion module, the output end of the standard convolutional layer is connected to the decoding module; the fused deep feature layer is input into the feature enhancement module, and the feature enhancement module performs feature enhancement on the fused deep feature layer through the ASPP feature pyramid, the ECA attention module and the standard convolutional layer to obtain an enhanced deep feature layer and input the enhanced deep feature layer into the decoding module for decoding.
[0064] Specifically, the decoding module adopts the decoding structure of the DeepLabv3+ network, which is used to decode the feature layers to obtain the crack identification result.
[0065] Specifically, step 11, the crack semantic segmentation network is trained by loading the crack images in the ImageNet-1K training set, and the pre-trained weight is obtained as the initial weight of the SwinTransformer network.
[0066] Step 12, input the crack images in the training set into the image preprocessing module for preprocessing; first, keep the aspect ratio of the image unchanged, and perform equal scaling on the image, and then fill it with pure color pixels to unify the image size to 512x512.
[0067] Step 13, input the preprocessed crack image into the SwinTransformer network and the inverse residual network for feature extraction, extract the deep feature layer with a size of 32x32 and 64x64 through the Swin Transformer network, and obtain the shallow feature layer with a size of 128x128 through the inverse residual network.
[0068] Step 14, input the deep feature layer and the shallow feature layer into the feature fusion module for feature fusion, first, the input end of the first convolutional layer is connected to the output end of the fourth layer in the SwinTransformer network to input the deep feature layer with a size of 32x32 into the first convolutional layer for convolution processing, the output end of the first convolutional layer is connected to the input end of the first upsampling layer, the output end of the first upsampling layer is connected to the input end of the first CDEC module, the input end of the first CDEC module is connected to the output end of the third layer in the SwinTransformer network to input the deep feature layer with a size of 64x64 into the first CDEC module for preliminary fusion, the output end of the first CDEC module is connected to the input end of the second upsampling layer, the output end of the second upsampling layer is connected to the input end of the second CDEC module, the input end of the second CDEC module is connected to the output end of the second layer in the inverse residual network to input the shallow feature layer with a size of 128x128 into the second CDEC module for preliminary fusion, and obtain the deep feature layer with a size of 32x32, the deep feature layer with a size of 64x64 and the shallow feature layer with a size of 128x128 after preliminary fusion.
[0069] The output end of the second convolutional layer is connected to the input end of the first down-sampling layer, the output end of the first down-sampling layer is connected to the input end of the third CDEC module, the input end of the third CDEC module is connected to the output end of the first CDEC module to input the 64*64 deep feature layer after preliminary fusion to the third CDEC module for fusion, the output end of the third CDEC module is connected to the input end of the second down-sampling layer, the output end of the second down-sampling layer is connected to the input end of the fourth CDEC module, and the input end of the fourth CDEC module is connected to the output end of the first convolutional layer to input the 32*32 deep feature layer after preliminary fusion to the fourth CDEC module, and the final 32*32 fusion deep feature layer is obtained through feature fusion.
[0070] Step 15: input the 32*32 fusion deep feature layer into the feature enhancement module, and sequentially perform feature enhancement through the ASPP feature pyramid, the ECA attention module and the standard convolutional layer, to obtain a 32*32 enhanced deep feature layer and input the 32*32 enhanced deep feature layer into the decoding module for decoding;
[0071] Step 16: input the 128*128 fusion shallow feature layer and the 32*32 enhanced deep feature layer into the decoding module for up-sampling decoding to obtain a crack image recognition result, and calculate the crack image recognition result and the crack label to obtain a prediction error Loss_D;
[0072] Step 17: perform back propagation on the prediction error Loss_D, and adjust the structure parameters of the crack semantic segmentation network itself;
[0073] Step 18: repeat steps 13 to 17 until the prediction error Loss_D converges, the training is completed, and the optimal network weight is obtained, and the optimal network weight is saved as a crack semantic segmentation model.
[0074] The prediction error Loss_D is used to solve the serious imbalance problem between the crack region and the background region in crack segmentation, and the formula is:
[0075]
[0076] Wherein, X represents the image region of the crack label, and Y represents the predicted image region.
[0077] Finally, the crack image in the test set is input into the crack segmentation model for testing to verify the crack image segmentation result.
[0078] The partial crack image obtained by using the crack segmentation model in the embodiment of the present application is as shown in the figure Figure 7 The crack segmentation model can accurately identify the position and shape of the crack, and can better resist the interference of the complex background, and has good segmentation effect.
[0079] The embodiment of the present application also provides a crack identification device, comprising:
[0080] An image acquisition module is configured to acquire a crack image to be identified.
[0081] A crack identification module is configured to input the crack image to be identified into a crack semantic segmentation network for crack identification, and obtain a crack identification result.
[0082] The embodiment of the present application also provides a computer readable storage medium having a computer program stored thereon, when the computer program is executed, the crack identification method as described above is realized.
[0083] The embodiment of the present application also provides a crack identification device based on a semantic segmentation network, comprising a memory and a processor, the memory is configured to store a computer program and intermediate data during program processing, and the processor is configured to execute the computer program to realize the crack identification method as described above.
[0084] Compared with the prior art, the embodiment of the present application solves the problems of difficulty in extracting global features and poor model robustness in the crack segmentation method based on the convolutional neural network, and the problems of data dependency and easy loss of local features in the crack segmentation method based on the self-attention mechanism, thereby effectively improving the crack identification accuracy.
[0085] The above is the preferred embodiment of the present application, it should be pointed out that, for the ordinary skilled in the art, without departing from the principles of the present application, can make a number of improvements and refinements, these improvements and refinements should also be considered as the protection scope of the present application.
Claims
1. A crack identification method characterized by, include: Step 1: Obtain the image of the crack to be identified; Step 2: Input the crack image to be identified into the crack semantic segmentation network for crack identification to obtain the crack identification result; The crack semantic segmentation network includes a dual-branch feature extraction module, a feature fusion module, and a decoding module connected in sequence. The dual-branch feature extraction module includes a Swing Transformer network and an inverse residual network. The Swing Transformer network is used to extract deep feature layers from the preprocessed crack image; The inverse residual network is used to extract the shallow feature layer of the preprocessed crack image; The output of the Swin Transformer network and the output of the inverse residual network are both connected to the input of the feature fusion module. The Swin Transformer network consists of four layers. The first layer is composed of a Patch Patition module. The second layer includes a linear mapping module and two Swin Transformer Blocks connected in sequence. The third layer includes a PatchMerging module and six Swin Transformer Blocks connected in sequence. The fourth layer includes a Patch Merging module and eight Swin Transformer Blocks connected in sequence. The preprocessed crack image is input into the Swin Transformer network for feature extraction through the first, second, third and fourth layers connected in sequence. The first deep feature layer is output after the third layer, and the second deep feature layer is output after the fourth layer. The inverse residual network consists of two layers, each layer including three inverse residual modules. Each inverse residual module includes a standard convolutional layer, a depthwise separable convolutional layer, and an ECA attention module connected in sequence. The preprocessed crack image is input into the inverse residual network for feature extraction through the first and second layers connected in sequence, and the output is a shallow feature layer. The feature fusion module includes a first feature fusion submodule and a second feature fusion submodule; The input of the first feature fusion submodule is connected to the output of the second layer of the inverse residual network, the output of the third layer of the Swin Transformer network, and the output of the fourth layer of the Swin Transformer network, respectively. It performs upsampling and feature fusion on the first deep feature layer, the second deep feature layer, and the shallow feature layer in sequence, and outputs a preliminarily fused shallow feature layer, a preliminarily fused first deep feature layer, and a preliminarily fused second deep feature layer. The input of the second feature fusion submodule is connected to the output of the first feature fusion submodule. The shallow feature layer that has been initially fused is subjected to convolution processing to obtain a fused shallow feature layer. The first deep feature layer and the second deep feature layer that have been initially fused are downsampled and feature fused to obtain a fused deep feature layer.
2. The crack identification method according to claim 1, characterized by, Step 2 also includes: The crack image to be identified is preprocessed; The preprocessed crack image is input into the crack semantic segmentation network for crack recognition, and the crack recognition result is obtained.
3. The crack identification method according to claim 2, characterized in that, The first feature fusion submodule includes a first CDEC module, a second CDEC module, a first upsampling layer, a second upsampling layer, and a first convolutional layer; the input of the first convolutional layer is connected to the output of the fourth layer in the Swing Transformer network, the output of the first convolutional layer is connected to the input of the first upsampling layer, the output of the first upsampling layer is connected to the input of the first CDEC module, the input of the first CDEC module is connected to the output of the third layer in the Swing Transformer network, the output of the first CDEC module is connected to the input of the second upsampling layer, the output of the second upsampling layer is connected to the input of the second CDEC module, the input of the second CDEC module is connected to the output of the second layer in the inverse residual network, and the output of the second CDEC module is connected to the input of the second feature fusion submodule. The second feature fusion submodule includes a third CDEC module, a fourth CDEC module, a first downsampling layer, a second downsampling layer, and a second convolutional layer. The input of the second convolutional layer is connected to the output of the second CDEC module, the output of the second convolutional layer is connected to the input of the decoding module, the output of the second convolutional layer is connected to the input of the first downsampling layer, the output of the first downsampling layer is connected to the input of the third CDEC module, the input of the third CDEC module is connected to the output of the first CDEC module, the output of the third CDEC module is connected to the input of the second downsampling layer, the output of the second downsampling layer is connected to the input of the fourth CDEC module, and the input of the fourth CDEC module is connected to the output of the first convolutional layer.
4. The crack identification method according to claim 3, characterized in that, The semantic segmentation network further includes a feature enhancement module, the input of which is connected to the output of the fourth CDEC module, and the output of which is connected to the input of the decoding module. The feature enhancement module includes an ASPP feature pyramid, an ECA attention module, and a standard convolutional layer connected in sequence; the input of the ASPP feature pyramid is connected to the output of the fourth CDEC module in the feature fusion module, and the output of the standard convolutional layer is connected to the input of the decoding module. The fused deep feature layer is input into the feature enhancement module, and after passing through the ASPP feature pyramid, ECA attention module, and standard convolutional layer for feature enhancement, the enhanced deep feature layer is obtained and input into the decoding module for decoding.
5. A crack identification device for executing the crack identification method according to claim 1, characterized by, include: The image acquisition module is used to acquire images of the cracks to be identified. The crack recognition module is used to input the crack image to be recognized into the crack semantic segmentation network for crack recognition and obtain the crack recognition result.
6. A computer-readable storage medium having stored thereon a computer program, characterized in that, When the computer program is executed, it implements the crack identification method as described in any one of claims 1 to 4.
7. A crack identification apparatus characterized by comprising: It includes a memory and a processor; the memory is used to store computer programs and intermediate data during program processing, and the processor is used to execute the computer programs to implement the crack identification method as described in any one of claims 1 to 4.
Citation Information
Patent Citations
CT image small crack segmentation device and method based on classification branches
CN113516640A
Methods of using microfluidic positional encoding devices
WO2020176548A1