## 3 Proposed Method
### Experiments Details  
#### 3.4.1 The Dataset  
Because a deep learning data set is quite important, when calibration was carried out on the collection of data, we needed to accurately measure and emphasize the singular data and ambiguous data. The corresponding size in the image we used was 0.1 mm for the actual width of each pixel. In the actual observation, the hole-wall crack was not observed if the width was less than 2 mm, and the pixel width needed to be 20 pixels. At the same time, in the actual ground cracks, there was relatively complete structural information in a crack that was 0.2-cm long. Therefore, the crack pixel length in the cut image block was 64 pixels long. The system's light would not change; therefore, the gamma error of the light was the same and it was easy to coordinate. Considering the actual situation of long and wide cracks, the patch size was set as \(64\times 64\) pixels. As for whether there was a crack in the divided patch and the marking judgment was carried out, the collected patch was binarized with a dynamic threshold value. Through adaptive local binarization processing (LPB) [26], the processing of the pixel depth in the image was segmented to obtain the high-gray value crack. The connected domain operation was used to extract the crack information. In order to ensure the confidence of the crack image data in the patch, we proposed the use of a ground truth calibration method using a patch for guidance. When more than 20% of the pixels in the ground truth marker patch were read, the image in the patch was learned anyway. If it was less than 20% and classified as ambiguous data image, it will not be learned. As shown in Figure 11, this was the method used to process the contour image and mark the patch with the local binarization method. Through the pre-screening of the data in the above IOU, we transformed what was originally a classification problem into a regression problem without reducing the efficiency and speed of learning. As for the final trained model, we also evaluated it by comparing the image in the patch with the ground truth. Figure 10: Three-dimensional visualization of cracks corresponding to spatial coordinates. Figure 11: (**a**) Expansion diagram of the inner wall of the pipe. (**b**) The effect diagram of the mean value binarization. (**c**) The effect diagram of local binarization (range \(5\times 5\)). (**d**) The schematic diagram of data label is made according to the ground truth in the patch. (**e**) The ground truth accounted for more than 20% of all pixels in the patch, which was denoted as a crack patch. (**f**) The ground truth and all pixels in the patch accounted for less than 20%, this was recorded as suspected data and not sent to the network for learning. (**g**) Ground truth mapping for the whole image. According to the label mechanism assisted by the IOU, we could get a good performance of connect domain area segmentation of the crack data and produced the effect diagram. Through this method, we labelled the data used to identify the crack in the patch. To make up for the shortage of measurement data, we searched many cracked image data from the Internet and adjusted the corresponding size. We selected pictures with long continuous cracks in the whole inner wall and adjusted the size of all test pictures to \(3264\times 4544\). We used 6000 images with cracks for distortion learning and randomly divided them into 258 patches. In addition, cracks were detected with \(64\times 64\) patch sizes from the image data. In order to synthesize and enhance our data as authentically as possible, we enhanced the data learned in the recognition network and selected random parameters to process the image. We rotated the images in the patch in equal proportion such that the learning speed would be slower than the reasoning speed. At the same time, it was flipped horizontally and upside down to increase the number of images, to make the cracks clearer, and to improve the accuracy of the training model. Figures 12 and 13 show how we augmented the data.