## 3 Proposed Vehicle Detection and Tracking Scheme
### Deep SORT Algorithm for Vehicle Tracking
Here, A denotes the unmatched detections; B denotes the unmatched trackers; t denotes the detection list; t \(-\) 1 denotes the tracking list from the previous frame; i denotes the tracking variable; j denotes the detection variable; IOU_max denotes the maximum IOU threshold for matching; IOU_other denotes the IOU threshold for handling unmatched cases; IOU_matrix denotes the matrix storing the IOU scores; Matched_id(x) denotes the result of the linear assignment algorithm applied to the IOUmatrix; trackers denotes the list of trackers with associated IDs; detections denotes the list of detections with associated IDs; unmatched_trackers denotes the trackers that do not have a corresponding match; unmatched_detections denotes the detections that do not have a corresponding match; and Matches denotes the list to store matched pairs. ```
Input: n by n square matrix, Detection A, Detection B, Detection C,, IDs: 0,1,2,.........) Output: (Unmatched detections, Unmatched tracking)
1. Initialization:
2.\(A\leftarrow\) Unmatched_detections
3.\(B\leftarrow\) Unmatched_tracker's
4.\(t\leftarrow\) detection list
5.\(t-1\leftarrow\) tracking list
6.\(i\leftarrow\) tracking variable
7.\(j\leftarrow\) detection variable
8. begin:
9. Set IOU_max \(\leftarrow\) 1
10. Set IOU_other \(\leftarrow\) 0
11. Computer IOU and convolutional score
12. Stores the IOU score in a matrix. 13. Matched_id (x) = linear-assignment (IOU_matrix)
14. A,B = [L]
15. for \(t\), \(i\) in trackers do
16. if \(i\) not in match_id (x) then
17. append t to unmatched_trackers
18. end
19. end for
20. for \(d\), \(j\) in detections do
21. if \(d\) not in matched_id (x) then
22. append d to unmatched_detections
23. end if
24. end for
25. Create a list: Matches = [L]
26. for m in matched_id (x) do
27. if IOU_mat [m[0],m[1] < IOU_third then
28. add m[0] to unmatched_trackers
29. add m[1] to unmatched_detections
30. else Add m.reshape (1,2) to matches
31. end
```  
**Algorithm 2**Hungarian algorithm for unmatched detection and tracking. IOU tracking (Algorithm 3) effectively handles situations where objects undergo various transformations, such as scale changes, occlusions, or partial visibility. IOU tracking can maintain object identities and track objects through time by comparing the spatial overlap between bounding boxes across frames. The intersection over union (IOU) metric quantifies the overlap between two bounding boxes by calculating the ratio of their intersection area to their union area. This measures the spatial overlap between detections and serves as a similarity metric for tracking associations. Here, \(T_{l}\) denotes the low detection threshold; \(T_{h}\) denotes the high detection threshold; \(T_{iou}\) denotes the IOU threshold; \(min_{track\_size}\) denotes the minimum track size in frames; \(Track_{a}\) denotes the activated tracks; \(Track_{f}\) denotes the finishing tracks; f denotes the frame variable; d denotes the detection variable; detections denotes the list of detections; Track_u denotes the unmatched tracks; \(t_{i}\) denotes the iteration variable for activated tracks; \(b_{iou}\) denotes the maximum IOU value; \(b_{box}\) denotes the bounding box associated with the maximum IOU; max_score denotes the maximum score associated with a bounding box; class denotes the class of the bounding box; and new_track denotes the newly created track from a detection.