Tunnel crack segmentation based on lightweight Transformer
Crack detection is crucial to ensuring the safety of the tunnel structure,and the timely detection of tunnel crack defects is conducive to reducing the project maintenance cost and guaranteeing traffic safety. However,the traditional convolutional neural network in tunnel crack detection tasks mainly focuses on improving detection accuracy and algorithm complexity. How to balance accuracy and real-time crack detection is a difficult point in the current research. To address this problem,this paper proposed a crack segmentation method called CrackViT based on a lightweight Transformer. First,the MobileViT network,which is a hybrid of convolutional neural networks and Transformer,was used to construct a crack feature extraction network. It reduced the parameters of the network model and the amount of computation and efficiently extracts the global information and the local feature information of the crack image. Then,an improved atrous spatial pyramid pooling decoder was proposed to realize feature extraction and information fusion at different scales and achieve pixel-level probability distribution. Meanwhile,the crack image suffers from the problem of missing detail information,and an efficient channel attention module was introduced to enhance the extraction ability of the crack feature information. In addition,for the problem of imbalance between crack and background categories,an online difficult sample mining loss function was designed to mitigate it. The experimental results show that the CrackViT algorithm finally achieves 75.62% IoU on the crack dataset with 63 FPS on a single 3050Ti GPU,with a model parameter count of only 2.43 M. The CrackViT-L model accuracy IoU is 76.83%,with a model parameter count of 3.56 M,and the model inference speed reaches 61 FPS. The algorithm's tested accuracy is better than most mainstream models and requires fewer model parameters. The results show that the edges of the tunnel crack segmentation images predicted by CrackViT are clearer and more complete,and the cracks can be effectively detected while maintaining the inference speed,which makes the algorithm useful for practical applications in tunnel crack detection.
crack segmentationTransformerMobileViTatrous spatial pyramid poollightweight model