# A Deep Learning-Based Approach for Extraction of Positioning Feature Points in Lifting Holes
## 3 Experiment and Model Training  
Based on the actual position parameters at the site, a variety of experiments were designed in different environments. The visual effects of the dataset images are illustrated in the accompanying Figure 9. To ensure that the camera can capture the lifting holes completely, the camera setup at the site is shown in Figure 10b.  
Figure 9: Different acquisition modes of images from the same perspective. (**a**) Normal illumination. (**b**) Color jittering. (**c**) Gaussian blur. (**d**) Low-light conditions. (**e**) Low-light color jittering. (**f**) Partial darkness. (**g**) Lighting shadows. (**h**) Image inversion.  
\begin{table}
\begin{tabular}{c c c c c c} \hline \(D\) & \(D\) = 0 & 0\(<\)\(D\)\(\leq\)1 & 1\(<\)\(D\)\(\leq\)2 & 2\(<\)\(D\)\(\leq\)5 & 5\(<\)\(D\)\(\leq\)10 & \(D\)\(>\)10 \\ \hline \(\psi(D)\) & 3 & 2.5 & 1.5 & 1.0 & 0.5 & 0 \\ \hline \end{tabular}
\end{table}
Table 3: Mapping relationship between \(D\) and \(\psi\).  
To simulate a greater range of environmental variations, dataset creation process revolves around altering other conditions based on changes in perspective. When capturing images from specific angles, we introduce variations in lighting angles and intensity. Furthermore, for 20% of the original images, we apply 1 to 3 random augmentation techniques, including Gaussian blur, color jittering, and image rotation, to accommodate diverse scenarios. This approach ensures both the authenticity of the training set and the diversity of images within the dataset. Ultimately, after subjecting the initial set of 3102 images to partial augmentation processes, a total of 4083 images were obtained.  
These images were randomly divided into training, testing, and validation sets in an 8:1:1 ratio. The training set was used for training the YOLOv5s model, and the cropped images of the holes were used as the training set for the ADD model. The software environment for model training was Windows 10 operating system with Python 3.7 and PyTorch 1.12. The hardware setup included an AMD Ryzen9 5900X CPU, an RTX 3080 (10 G) GPU, and DDR4 RAM (64 G). The camera model used for capture is HikVision MV-CH120-10 GC, with a frame rate of 9.4 FPS and an image resolution of 4096 \(\times\) 3000. The training process used the SGD optimizer with a batch size of 16 and 100 epochs. The learning rate was adjusted using cosine annealing, starting at 0.01. A momentum of 0.9 and a weight decay of 0.0004 were utilized.  
To validate the effectiveness of the proposed method, it was compared with existing pixel-based classification methods, as well as DeepLabV3+-MobileNetV3. The evaluation criteria included model parameter size, mIoU, mPA, and segmentation result images. For pixel binary classification problems, mIoU and mPA scores are calculated using the following formulas:  
\[\text{mTou}=(\frac{\text{TP}}{\text{TP}+\text{FP}+\text{FN}}+\frac{\text{TN}} {\text{TN}+\text{FP}+\text{FN}})/2 \tag{22}\]  
\[\text{mPA}=(\frac{\text{TP}}{\text{TP}+\text{FP}}+\frac{\text{TN}}{\text{TN}+ \text{FP}})/2 \tag{23}\]  
where TP denotes the number of pixels correctly classified as positive class (Lifting holes), TN refers to the number of pixels correctly classified as negative class (Background), FP corresponds to the number of pixels incorrectly classified as positive class, and FN represents the number of pixels incorrectly classified as negative class.  
Furthermore, in evaluating the fitting performance of the vertices, a comparison was made between the Hough line detector, line segmentation detection (LSD), LS, and VLFGM. In examining the centroid coordinate error, the proposed method was compared to the LS, minimum bounding rectangle method (MBR), edge centroid (EC), and connected domain centroid (CD). The aforementioned methods are compared based on the Euclidean distance error in terms of pixel points.  
Figure 10: Experimental equipment. (**a**) Simulation model; (**b**) experimental scenario.