# A Lightweight Method for Detecting Sewer Defects Based on Improved YOLOv5
###### Abstract  
In response to the issues of the existing Sewer defect detection models, which are not applicable to small computing platforms due to their complex structure and large computational volume, as well as the low detection accuracy, a lightweight detection model based on YOLOv5, named YOLOv5-GBC, is proposed. Firstly, to address the computational redundancy problem of the traditional convolutional approach, GhostNet, which is composed of Ghost modules, is used to replace the original backbone network. Secondly, aiming at the problem of low detection accuracy of small defects, more detailed spatial information is introduced by fusing shallow features in the neck network, and weighted feature fusion is used to improve the feature fusion efficiency. Finally, to improve the sensitivity of the model to key feature information, the coordinate attention mechanism is introduced into the Ghost module and replaced the traditional convolution approach in the neck network. Experimental results show that compared with the YOLOv5 model, the model size and floating point of operations (FLOPs) of YOLOv5-GBC are reduced by 74.01% and 74.78%, respectively; the mean average precision (MAP) and recall are improved by 0.88% and 1.51%, respectively; the detection speed is increased by 63.64%; and the model size and computational volume are significantly reduced under the premise of ensuring the detection accuracy, which can effectively meet the needs of sewer defect detection on small computing platforms. sewer defect detection; YOLOv5; GhostNet; lightweight; coordinate attention mechanism +
Footnote †: journal: Medical and Computer Science  
instance, a drainage group in Beijing city needs to inspect about 1500 to 2000 km of sewers every year and watch 15,000 G to 20,000 G of assessment video, on average [3]. Therefore, there is an urgent need to develop an automated method for detecting sewer defects. With the development of deep learning technology, object detection technology that can perform both classification and detection is widely used for vehicle recognition [4], hand script counterfeit detection [5], and automatic detection of drainage sewers in China and abroad [6; 7]. The most commonly used methods include Single Shot Multibox Detector (SSD) [8], You Only Look Once (YOLO) [9], and Faster RCNN [10], which effectively improve the detection accuracy by using neural networks to automatically extract features. For example, [PERSON] et al. [11] used the YOLOv3 model to construct a sewer defect automatic detection system, achieving efficient detection of six types of defects such as cracks. [PERSON] et al. [12] used the Faster R-CNN algorithm to detect defects such as tree roots and sediment in CCTV videos and studied the influence of different network structures and dataset sizes on model performance. [PERSON] et al. [3] used the YOLOv5 algorithm for automatic detection of six kinds of defects including blockages and constructed a rating system for the sewer status, proving the feasibility of the YOLOv5 model in sewer defect detection tasks. [PERSON] et al. [13] used an improved Faster R-CNN model to fuse global contextual features with local defect features for sewer defect localization and fine-grained classification. The focus of the above-mentioned method aims to improve the detection accuracy of the model, which also leads to increasingly complex model structures and higher hardware requirements. In actual detection operations, the terminal control device operated by field personnel is usually a low-performance industrial computer, with limited computational resources such as graphics cards and memory. This makes it impossible to deploy complex and computationally intensive detection models, thereby failing to meet the real-time detection needs of sewer defects. In actual sewer defect detection tasks, due to the complex and numerous sewers, a large number of detection videos are produced, while professional detection personnel are very limited [14].