# detr2tracking
## Installation
For train/evaluate DETR models, mmcv and another common packages are needed.
For generate tracking results and calculate metrics(mota/idf1, etc.) on validation dataset, following the installation of [Neural Solver](https://github.com/dvl-tum/mot_neural_solver)
## Running Process
### Datasets
```python
# train
mot17_data=['MOT17-02-FRCNN','MOT17-05-FRCNN','MOT17-09-FRCNN','MOT17-10-FRCNN','MOT17-13-FRCNN']
mot15_data=['KITTI-17','ETH-Sunnyday','ETH-Bahnhof','PETS09-S2L1','TUD-Stadtmitte']
# validation
mot17_data_eval=['MOT17-11-FRCNN', 'MOT17-04-FRCNN']
```
### Pretrain ReID model
[TorchReID](https://kaiyangzhou.github.io/deep-person-reid/user_guide) is used for training ReID model and generating reid features on the validation set. Model *resnet50_fc512* is used.
### Prepare ReID and Position Encoding Features
```python
# associate the name of ReID feature with its corresponding ground-truth bbox.
# For validation:
python feats_extract/reid2gtbbox.py # or python reid2gtbbox_traindata.py for training data
# generate position encoding feature and concat ground-truth bbox infomation with it
python feats_extract/pos_encoding.py
# merge ReID feature with concated position encoding feature. The merged feature is used for construct
# dataset which is further used for DETR train/test.
python feats_extract/reid_posfeat_merge.py
```
### Train
```python
# training of DETR model
cd mot_trainer
scripts/dis_train.sh
```
### Evaluation
```python
# generate matched label infomation (Pandas DataFrame) on validation set based on trained DETR model
scripts/dis_eval.sh
# generate txt file of tracking results and calculate metrics (mota/idf1, etc.)
cd mot_tracker
python tracker.py
# The above tracker.py does the following roughly for each dataset sequence: (modified from the evaluation process of Neural Solver)
# 1) construct node info: read from gt.txt and construct pandas.DataFrame, filter invalid gt bbox (visible<0.2 or clss id not in [1,2])
# 2) merge matched/associated info (or called edge info, inferred from trained DETR model) with DataFrame in 1)
# 3) construct graph
# 4) graph projecting (same to Neural Solver) to constrain the in/out degree <=1 for each node
# 5) connected components calculation, tracking results generation and metrics calculation
```
没有合适的资源?快使用搜索试试~ 我知道了~
资源推荐
资源详情
资源评论
收起资源包目录
多目标跟踪_基于DETR目标检测算法的多目标跟踪实现_附流程教程+项目源码_优质项目实战.zip (25个子文件)
多目标跟踪_基于DETR目标检测算法的多目标跟踪实现_附流程教程+项目源码_优质项目实战
mot_tracker
projectors.py 2KB
utils.py 3KB
tracker.py 8KB
seq_processor.py 5KB
mot_graph_dataset.py 5KB
vis
vis.py 4KB
image_viewer.py 10KB
vis_video.py 3KB
mot_graph.py 8KB
mot17loader.py 2KB
mot_trainer
dis_train.py 9KB
utils_.py 3KB
dataset.py 12KB
feats_extract
reid2gtbbox_traindata.py 4KB
reid2gtbbox.py 5KB
reid_posfeat_merge.py 4KB
pos_encoding.py 9KB
dis_eval.py 11KB
models
model.py 3KB
transformer.py 9KB
criterion.py 1KB
scripts
dis_eval.sh 188B
dis_train.sh 273B
requirements.txt 2KB
README.md 2KB
共 25 条
- 1
资源评论
极智视界
- 粉丝: 2w+
- 资源: 1468
下载权益
C知道特权
VIP文章
课程特权
开通VIP
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功