# Lightweight Crack Automatic Detection Algorithm Based on TF-MobileNet
## 1 Introduction  
Pavement cracking is one of the most common forms of transportation infrastructure failure [1]. After prolonged or excessive use, most pavement distresses first manifest as cracks. If not repaired promptly, these cracks can expand and worsen due to external environmental or human factors [2]. Driving at high speeds on such roads not only affects driving comfort but can also contribute to serious traffic accidents. The continued expansion of small cracks can lead to potential hazards. Repairing cracks before they deteriorate can significantly reduce maintenance costs, prevent accidents, and extend the lifespan of the road [3, 4]. Crack detection has become a crucial component of concrete structure maintenance to evaluate the safety and durability of these structures [1].  
Traditional crack detection relied on either manual visual inspection or various technological methods such as electromagnetic [5], infrared [6], ultrasonic [7], or radioactive detection [8]. Manual inspection not only suffers from low efficiency but also incurs high labor costs and faces geographical constraints, making it unsuitable for areas like viaduct pavements and bridge piers. Despite continuous advancements in detection techniques using external equipment, these methods are still susceptible to subjective influences.  
These drawbacks have driven researchers and road maintenance companies to explore more efficient and comprehensive crack detection methods. With the continuous advancements in computer hardware, computer vision, and artificial intelligence, image-based crack detection has become a mainstream trend. Current image-based deep learning crack detection methods require a significant quantity of data to train the algorithmic models.  
It takes time to collect the crack data and upload it to the computing side. Additionally, cloud computing has high latency and cannot respond quickly to incidents generated by cracks. Edge computing, characterized by low latency and fast response, can detect cracks immediately and assist road operation and maintenance companies in completing subsequent repair work. Considering the limitations of traditional crack detection methods and leveraging the benefits of edge computing technologies and deep learning, this research aims to propose a lightweight crack detection model that can be easily deployed on edge devices to achieve a fast response to cracks. The following are the specific outcomes derived from this research:  
We have developed a novel deep learning algorithm, TF-MobileNet, specifically designed for crack detection.  
We combined the lightweight network MobileNetV3 with a Transformer to build the backbone network for tiny crack feature extraction and introduced the attention mechanism into the backbone network, which effectively allows the network to place greater emphasis on identifying the characteristics of cracks.  
We combined BoTNet and PANet to build a crack feature fusion network and introduced a parameter-free attention mechanism: SimAM, which emphasizes the crack features without imposing excessive computational effort on the network. We performed ablation experiments to confirm the efficacy of each individual module.  
We have deployed the model to edge devices and performed crack detection at the edge side under two different environmental conditions, verifying the feasibility of the lightweight model.  
The organization of this paper is laid out as follows. In Section 2, we review the outstanding previous research in the field of crack detection. In Section 3, we provide an overview of the overall structure of the proposed lightweight model. In Section 4, we train the models and conduct comparative experiments, reporting various evaluation criteria for all models in the experiments. In Section 5, we deploy the proposed model on edge devices and perform both image and video tests. In Section 6, we summarize the overall work.