# Smart Logistics Warehouse Moving-Object Tracking Based on YOLOv5 and DeepSORT
## 4 Logistics Warehouse Target Tracking
### Object-Tracking Evaluation Metrics  
The object-tracking evaluation metrics utilized in our study are derived from the MOT Challenge competition [31]. The main object-tracking evaluation indicators of the MOT Challenge competition are MOTA (Multi-Object Tracking Accuracy), MOTP (Multiple Object Tracking Precision), RclI (Recall), MT (Mostly Tracked), ML (Mostly Lost), IDF1 (Identification F-Score), IDP (Identification Precision), IDR (Identification Recall), IDSW (ID Switch), etc., as shown in Figure 15. The MOT Challenge competition employs a set of comprehensive evaluation metrics to evaluate object-tracking performance. These metrics are as shown in Figure 15.  
1. MOTA The formula for calculating MOTA is as follows: \[MOTA=1-\frac{FN+FP+IDSW}{GT}\] (1) GT (ground truth) signifies the accurate target bounding box information of the tracking target, which is often obtained by manual annotation or automatic annotation  
Figure 14: Comparison of DeepSORT with YOLOv5.  
Figure 15: Evaluation indicators for the MOT Challenge competition.  
software in practical problems. MOTA quantifies the proportion of tracking information except false negative (FN), false positive (FP) and ID switching (IDSW) among all true target information.  
FN represents the true samples that are identified by the tracking algorithm as false samples; FP represents the false samples that are identified by the tracking algorithm as true samples [32]. The samples here can be interpreted as the tracking bounding boxes of the target for each frame in the video stream. IDSW represents the number of times that the same tracking target ID undergoes changes during the tracking process.  
(2) MOTP  
MOTP is a metric employed to evaluate the effectiveness of detection during tracking. The calculation formula is as follows.  
\[MOTP=\frac{\sum\limits_{t,j}D_{t,j}}{\sum\limits_{t}c_{t}} \tag{2}\]  
where \(t\) signifies the current number of frames in the tracked video stream; the variable \(c_{t}\) corresponds to the count of successful pairings between the tracked tracks and the Ground Truth (GT) tracks at frame \(t\). \(D_{t,j}\) denotes the distance between the successfully paired two tracks at frame \(t\) (generally calculated by Euclidean distance or IOU, Euclidean distance is employed in this paper). The better the detection effect, the shorter the Euclidean distance between the paired tracks. An increased number of successful pairings results in a higher MOTP value.  
(3) Rcll  
Rcll gauges the proportion of successful target tracking, calculated by dividing the number of successfully paired targets by the number of real targets.  
(4) MT and ML  
MT indicates the number of tracks that have been successfully paired for over 80% of the total frames during the whole tracking process; ML indicates the number of tracks that have been successfully paired for less than 20% of the total frames during the whole tracking process.  
(5) IDP  
IDP is similar to the calculation of precision. Accuracy is defined as the proportion of true positive samples among all positive samples, while IDP refers to the proportion of all samples assigned correctly to the target ID.  
(6) IDR  
IDR is akin to the calculation of recall. Recall refers to the proportion of all true positive samples for which the predictor offers a positive prediction, while IDR refers to the proportion of all samples for which the tracking algorithm has correctly assigned the target ID.  
(7) IDF1  
IDF1 is then the harmonic mean of IDP and IDR. The calculation formula is as follows.  
\[IDF1=1-\frac{2}{\frac{1}{IDP}+\frac{1}{IDR}} \tag{3}\]  
(8) FM  
FM refers to the number of tracked target tracks that are mistakenly terminated by the tracker in the video stream.  
IDSW
* IDSW serves as a distinctive form of FM, so the value of FM is generally larger than IDSW.