# Deep Learning in Left and Right Footprint Image Detection Based on Plantar Pressure
## 2 Materials and Methods  
In this study, we used the plantar pressure to present the footprint. The data used to develop this study were gathered from the AIdea website by the Industrial Technology Research Institute (ITRI) of Taiwan ([[https://aidea-web.tw](https://aidea-web.tw)]([https://aidea-web.tw](https://aidea-web.tw)), accessed on 21 February 2021). We randomly split 974 plantar pressure images into 70% (681 images) for the training set and 30% (293 images) for the validation set. Each image is sized 120 \(\times\) 400 pixels. Furthermore, a senior expert in plantar pressure images determined the left and right foot, set as ground truth.  
Based on our dataset that contained image features, this study used various object detection models: Residual Neural Network with 50 layers (ResNet-50), Dense Convolutional Network (DenseNet), and You Only Look Once (YOLO) v3, v4, v5s, v5m, v5l, and v5x to compare the network performances. As the most popular model used for plantar pressure images, the ResNet-50 used the deeper networks that support the feature extraction and achieved high accuracy in recognizing the plantar pressure images in different conditions [24] (Figure 1A). DenseNet is a deep neural network model which transmits the input data features from the convolution layer to the following layers that are popularly used in plantar pressure images [25] (Figure 1B). To classify images, [PERSON] et al. [26] introduced that multiscale feature maps can be effectively combined for YOLOv2 detection and classification of DenseNet and ResNet-50 to prevent performance loss. In this study, we used DarkNet-19 as the backbone to support DenseNet and ResNet-50 as a classifier with a YOLOv2 detector.  
Figure 1: Illustration of object detection Network Architecture; (**A**) Residual Neural Network 50 (ResNet-50) network architecture. (**B**) Dense Convolutional Network (DenseNet) network architecture.  
YOLO is a state-of-the-art deep learning framework for real-time object recognition with single-stage detection. YOLO supports real-time object detection and precision in predicting the bounding box based on footprint images [18]. YOLO has several versions, including YOLOv1, v2, v3, v4, and v5 series. However, the current, more popular object detection algorithms are YOLOv3, YOLOv4, and YOLOv5 (YOLOv5l, YOLOv5m, YOLOv5s, YOLO5x) models [21].  
YOLOv3 has advantages in its three detectors that affect the prediction more precisely [27] (Figure 2A). YOLOv4 with its spatial pyramid pooling and path aggregation network may improve feature extraction to localize and classify the object [28] (Figure 2B). The latest YOLO series is the YOLOv5 algorithm, divided into four models named YOLOv5s, YOLOv5m, YOLOv5l, and YOLOv5x, according to the depth and width of the network [21]. Unlike other versions, YOLOv5 uses an adaptive anchor strategy; the backbone part uses a focus structure and cross-stage partial connections (CSP) structure. In addition, the YOLOv5 series has an advantage in terms of run speed that may affect real-time detection in clinical workload [29] (Figure 2C).  
Furthermore, this study used manual labeling of the left and right feet regarding the foot pressure profiles. After the manual labeling, we input the data into ResNet-50,  
Figure 2: YOLO series Network Architecture; (**A**) YOLOv3 Network Architecture. (**B**) YOLOv4 Network Architecture. (**C**) YOLOv5 Network Architecture. Note: YOLO, You Only Look Once.  
DenseNet, YOLOv3, YOLOv4, and YOLOv5 series models to obtain a suitable model for detecting foot profiles (Figure 3). The detection was built in Windows 10 using Python 3.7.6 (YOLOv3, YOLOv4, DenseNet, and ResNet-50) and PyTorch 1.7.0. (YOLOv5 series). The model's parameters were as follows: The batch size was 8; the momentum and weight decay were 0.937 and 0.0005, respectively; the initial learning rate was 0.01, and the epoch was 100. All experiments were carried out using a computer configured with the following hardware: Core I7 10,700 CPU, 32 GB RAM, and an NVIDIA RTX 3080 GPU.