## 2 Materials and Methods
### Model Training  
The training process for the model began with a hip detection experiment utilizing the YOLOv4 architecture. This step aimed to locate the hip joints within the VDHE radiographic images accurately. The dataset of 7967 images was divided into three subsets: 70% allocated for training, 15% reserved for validation to save checkpoints and verify early stopping, and 15% for testing. The training utilized images resized to 416 \(\times\) 416 pixels, processed over 300 iterations with a learning rate of 0.001 and a batch size of 4. Data augmentation was applied to improve the model's generalizability and reduce the risk of overfitting. By introducing controlled variability into the training data, augmentation helps simulate real-world differences that may arise from variations in imaging equipment, patient positioning, or acquisition settings. Specifically, transformations involving zoom, horizontal flip, perspective adjustments, and brightness alterations were applied, each with a probability of 0.5 of being executed. These operations not only enhance robustness to minor geometric and photometric variations but also support effective training under limited data conditions, reducing dependence on large annotated datasets.  
Upon completing the training, the YOLOv4 model was applied to the dataset of 571 images, producing 1142 cropped images resized to 224 \(\times\) 224 pixels, each representing one of the two hip joints. The cropped images were then used in the keypoints regression experiment to identify the specific anatomical landmarks for FHC detection. The dataset was partitioned, with 80% allocated for training, 10% reserved for validation, and 10% for testing. The ResNet50v2 architecture, pre-trained on the ImageNet dataset, was selected as the backbone network due to its robust feature extraction capabilities. The architecture was modified to suit the regression task by replacing its final layer with a two-dimensional Global Average Pooling layer, which produced a vector comprising 2048 features. This was followed by two dense layers with 1024 and 512 neurons, respectively, each incorporating a dropout regularization factor of 0.1. Finally, a dense layer with 8 neurons was used to compute the coordinates of the four keypoints: \(P1_{x}\), \(P1_{y}\), \(P2_{x}\), \(P2_{y}\), \(P3_{x}\), \(P3_{y}\), \(P4_{x}\), \(P4_{y}\).  
Figure 2: Illustration of boundary boxes demarcating the hip joints on a ventrodorsal hip-extended (VDHE) radiographic image, representing the regions of interest.  
The regression model was trained for a maximum of 500 epochs with early stopping, utilizing an initial learning rate of 0.001 and a batch size of 8. If no improvement was observed over 25 consecutive epochs, the learning rate was halved to facilitate convergence. The Adam optimizer was employed to update the network's parameters, and the Euclidean distance was used as the loss function. Data augmentation techniques were applied during training to improve the model's robustness and generalization. These included horizontal flipping, shear transformation (\(-15^{\circ}\) to \(15^{\circ}\)), rotation (\(-5^{\circ}\) to \(5^{\circ}\)), scaling (0.75 to 1.15), translation (\(-0.05\) to 0.05), perspective adjustment (0.02 to 0.05), and Gaussian blur (0 to 0.5). Each transformation was applied with a probability of 0.5.  
After the training phase, the FHC for each hip joint was determined by calculating the centroid of the three keypoints (P1, P2, P3) predicted by the model (Figure 3).