# A Fast Dynamic Dim Target Tracking Approach for UAVs Using Improved Lightweight Siamese Networks
## 4 Simulation and Experiment
### Simulation
#### 4.1.2 Training  
The feature extraction backbone network was pre-trained using the ImageNet dataset to obtain better feature extraction network weights first. The overall network is trained offline using the ILSVRC2015_VID [24] dataset, which contains 3862 video sequences. The training process was performed by the stochastic gradient descent (SGD) method, by randomly selecting two images from a video sequence in the dataset as the target image and the search region into ILSN, respectively. The outputs of the classification and regression branches were obtained to calculate the losses separately, and the losses of the classification and regression branches were fused linearly to the overall loss to backpropagate. The loss weight of the categorical branch is 1.0, and the loss weight of the regression branch is 1.2. The learning rate was warmed up using a warm-up learning rate approach, where the learning rate was warmed up for 5 rounds, decreasing from \(10^{-2}\) to \(10^{-6}\). Within each round, it started with 0.05 times the overall learning rate and gradually grew to the overall learning rate. The overall training has 20 rounds, the first 10 rounds train only the similarity measure network structure of multilayer fusion, and the last 10 rounds train the overall network. The model was trained 150,000 times overall, with 80 pairs of images each time.  
Then, four commonly used evaluation indicators were used to quantify the algorithm performance:  
(1) Accuracy  
Accuracy refers to the ratio of the overlap area between the predicted frame and the actual target frame to the total area of the predicted frame and the actual target frame in the video sequence, which is calculated as follows:  
\[S=\frac{B_{c}}{B_{A}+B_{P}-B_{c}} \tag{7}\]  
where \(S\) is the accuracy rate, \(B_{A}\) is the actual target frame, \(B_{P}\) is the prediction frame, and \(B_{c}\) is the overlap region of \(B_{A}\) and \(B_{P}\).  
Figure 4: Sample images of the experiment dataset. (**a**) car; (**b**) Grape leaf blight; (**c**) Powdery mildew; (**d**) car; (**e**) road; (**f**) girl; (**g**) Bacterial leaf blight; (**h**) Brown spot; (**i**) Leaf smut.  
2. Tracking Precision  
Tracking precision refers to the Euclidean distance between the center of the predicted frame pixel and the center of the actual target frame pixel in the video sequence, which is calculated as follows:  
\[P=\sqrt{\left(c_{A}x-c_{p}x\right)^{2}+\left(c_{A}y-c_{p}y\right)^{2}} \tag{8}\]  
where \(P\) is the tracking accuracy, and \(c_{A}x\), \(c_{A}y\), \(c_{p}x\), \(c_{p}y\) denote the horizontal and vertical coordinates of the center of the actual target frame and the prediction frame, respectively.
3. Tracking speed  
Tracking speed refers to the number of video sequence frames per second that the tracking algorithm completes, in frames per second, and is used to measure the algorithm's computing speed. As the playback speed of the video sequence frames is controlled by the UAV in the real-time experiments, only this metric is counted and analyzed in the non-real-time experiments.
4. Expected average overlap (EAO)  
All video sequences are sorted by length, so that the algorithm can be tested on a sequence of length \(N_{s}\). The accuracy \(\phi_{t}\) of each frame is obtained, and the accuracy \(\phi N_{s}\) of that video sequence is obtained by taking the average value to obtain the EAO value on a video sequence of length \(N_{s}\).  
\[\overline{\phi}N_{s}=\frac{1}{N_{s}}\sum_{i=1}^{N_{s}}\phi N_{s} \tag{9}\]