# 多物件追蹤

---
## SORT
全名為"Simple Online And Realtime Tracking"
[Github](https://github.com/abewley/sort)

----
主要原理是
卡爾曼濾波器(Kalman Filter)+
匈牙利演算法(Hungarian algorithm)
----
#### 這是偵測流程

----
#### 這是加上SORT

用偵測結果的座標預測下一偵的位置(Kalman Filter)
給每個偵測框ID後,新的目標框跟這些ID做配對(Hungarian algorithm)
----
### 基本流程
1. 檢測器得到 t 時間的 detection bbox,更新track set
2. 經過卡爾曼濾波器預測 t + 1 時的prediction bbox
3. 檢測器得到 t + 1的detection
4. 使用匈牙利算法配對 t + 1的detection和prediction的bbox
5. 更新track set
---
### Kalman Filter
當前狀態+上個狀態 -> 預測下的狀態

[詳細解釋](https://zhuanlan.zhihu.com/p/48876718)
----
### Hungarian algorithm
解決最大權重完美二分匹配
(參考資料1)[https://youtu.be/bSoZQkxc1Zw?t=41]
(參考資料2)[https://youtu.be/bSoZQkxc1Zw?t=41]
---
## DeepSORT
[Github](https://github.com/nwojke/deep_sort)

----
DeepSORT是SORT的進階版本,多了一個特徵萃取的步驟

----
| | SORT | DeepSORT |
| -------- | -------- | -------- |
| 卡爾曼濾波 | BBox | BBox |
| 匈牙利演算法 |IoU+Class | IoU+Class+Feature |
---
{"contributors":"[{\"id\":\"8563c208-7f7f-4bea-90b4-ccf166190995\",\"add\":3134,\"del\":1691}]","title":"Week 13 - AI影像辨識","description":"地獄貓旅行團第 19 週心得分享"}