This commit is contained in:
chunyuwang 2020-04-14 18:57:38 +08:00
Родитель 404da00f93
Коммит 5d44d6208f
40 изменённых файлов: 152840 добавлений и 0 удалений

157
README.md
Просмотреть файл

@ -1,3 +1,160 @@
# FairMOT
A simple baseline for one-shot multi-object tracking:
![](assets/pipeline.png)
> [**A Simple Baseline for Multi-Object Tracking**](http://arxiv.org/abs/2004.01888),
> Yifu Zhang, Chunyu Wang, Xinggang Wang, Wenjun Zeng, Wenyu Liu,
> *arXiv technical report ([arXiv 2004.01888](http://arxiv.org/abs/2004.01888))*
## Abstract
There has been remarkable progress on object detection and re-identification in recent years which are the core components for multi-object tracking. However, little attention has been focused on accomplishing the two tasks in a single network to improve the inference speed. The initial attempts along this path ended up with degraded results mainly because the re-identification branch is not appropriately learned. In this work, we study the essential reasons behind the failure, and accordingly present a simple baseline to addresses the problems. It remarkably outperforms the state-of-the-arts on the MOT challenge datasets at 30 FPS. We hope this baseline could inspire and help evaluate new ideas in this field.
## Tracking performance
### Results on MOT challenge test set
| Dataset | MOTA | IDF1 | IDS | MT | ML | FPS |
|--------------|-----------|--------|-------|----------|----------|--------|
|2DMOT15 | 59.0 | 62.2 | 582 | 45.6% | 11.5% | 30.5 |
|MOT16 | 68.7 | 70.4 | 953 | 39.5% | 19.0% | 25.9 |
|MOT17 | 67.5 | 69.8 | 2868 | 37.7% | 20.8% | 25.9 |
|MOT20 | 58.7 | 63.7 | 6013 | 66.3% | 8.5% | 13.2 |
All of the results are obtained on the [MOT challenge](https://motchallenge.net) evaluation server under the “private detector” protocol. We rank first among all the trackers on 2DMOT15, MOT17 and the recently released (2020.02.29) MOT20. Note that our IDF1 score remarkably outperforms other one-shot MOT trackers by more than **10 points**. The tracking speed of the entire system can reach up to **30 FPS**.
### Video demos on MOT challenge test set
<img src="assets/MOT15.gif" width="400"/> <img src="assets/MOT16.gif" width="400"/>
<img src="assets/MOT17.gif" width="400"/> <img src="assets/MOT20.gif" width="400"/>
## Installation
* Clone this repo, and we'll call the directory that you cloned as ${FAIRMOT_ROOT}
* Install dependencies. We use python 3.7 and pytorch >= 1.2.0
```
conda create -n FairMOT
conda activate FairMOT
conda install pytorch==1.2.0 torchvision==0.4.0 cudatoolkit=10.0 -c pytorch
cd ${FAIRMOT_ROOT}
pip install -r requirements.txt
cd src/lib/models/networks/DCNv2 sh make.sh
```
* We use [DCNv2](https://github.com/CharlesShang/DCNv2) in our backbone network and more details can be found in their repo.
* In order to run the code for demos, you also need to install [ffmpeg](https://www.ffmpeg.org/).
## Data preparation
We use the same training data as [JDE](https://github.com/Zhongdao/Towards-Realtime-MOT). Please refer to their [DATA ZOO](https://github.com/Zhongdao/Towards-Realtime-MOT/blob/master/DATASET_ZOO.md) to download and prepare all the training data including Caltech Pedestrian, CityPersons, CUHK-SYSU, PRW, ETHZ, MOT17 and MOT16.
[2DMOT15](https://motchallenge.net/data/2D_MOT_2015/) and [MOT20](https://motchallenge.net/data/MOT20/) can be downloaded from the official webpage of MOT challenge. After downloading, you should prepare the data in the following structure:
```
MOT15
|——————images
| └——————train
| └——————test
└——————labels_with_ids
└——————train(empty)
MOT20
|——————images
| └——————train
| └——————test
└——————labels_with_ids
└——————train(empty)
```
Then, you can change the seq_root and label_root in src/gen_labels_15.py and src/gen_labels_20.py and run:
```
cd src
python gen_labels_15.py
python gen_labels_20.py
```
to generate the labels of 2DMOT15 and MOT20. The seqinfo.ini files of 2DMOT15 can be downloaded here [[Google]](https://drive.google.com/open?id=1kJYySZy7wyETH4fKMzgJrYUrTfxKlN1w), [[Baidu],code:8o0w](https://pan.baidu.com/s/1zb5tBW7-YTzWOXpd9IzS0g).
## Pretrained models and baseline model
* **Pretrained models**
DLA-34 COCO pretrained model: [DLA-34 official](https://drive.google.com/file/d/1pl_-ael8wERdUREEnaIfqOV_VF2bEVRT/view).
HRNetV2 ImageNet pretrained model: [HRNetV2-W18 official](https://1drv.ms/u/s!Aus8VCZ_C_33cMkPimlmClRvmpw), [HRNetV2-W32 official](https://1drv.ms/u/s!Aus8VCZ_C_33dYBMemi9xOUFR0w).
After downloading, you should put the pretrained models in the following structure:
```
${FAIRMOT_ROOT}
└——————models
└——————ctdet_coco_dla_2x.pth
└——————hrnetv2_w32_imagenet_pretrained.pth
└——————hrnetv2_w18_imagenet_pretrained.pth
```
* **Baseline model**
Our baseline FairMOT model can be downloaded here: DLA-34: [[Google]](https://drive.google.com/open?id=1udpOPum8fJdoEQm6n0jsIgMMViOMFinu) [[Baidu, code: 88yn]](https://pan.baidu.com/s/1YQGulGblw_hrfvwiO6MIvA). HRNetV2_W18: [[Google]](https://drive.google.com/open?id=1hxqE5QuzGCa6sgyBvNYhywmyohmioVAO) [[Baidu, code: 7jb1]](https://pan.baidu.com/s/1yQxXh0FuPLoFfeupHGZlCw).
After downloading, you should put the baseline model in the following structure:
```
${FAIRMOT_ROOT}
└——————models
└——————all_dla34.pth
└——————all_hrnet_v2_w18.pth
└——————...
```
## Training
* Download the training data
* Change the dataset root directory 'root' in src/lib/cfg/data.json and 'data_dir' in src/lib/opts.py
* Run:
```
sh experiments/all_dla34.sh
```
## Tracking
* The default settings run tracking on the validation dataset from 2DMOT15. You can run:
```
cd src
python track.py mot --load_model ../models/all_dla34.pth --conf_thres 0.6
```
to see the tracking results. You can also set save_images=True in src/track.py to save the visualization results of each frame.
* To get the txt results of the test set of MOT16 or MOT17, you can run:
```
cd src
python track.py mot --test_mot17 True --load_model ../models/all_dla34.pth --conf_thres 0.4
python track.py mot --test_mot16 True --load_model ../models/all_dla34.pth --conf_thres 0.4
```
and send the txt files to the [MOT challenge](https://motchallenge.net) evaluation server to get the results.
* To get the SOTA results of 2DMOT15 and MOT20, you need to finetune the baseline model on the specific dataset because our training set do not contain them. You can run:
```
sh experiments/ft_mot15_dla34.sh
sh experiments/ft_mot20_dla34.sh
```
and then run the tracking code:
```
cd src
python track.py mot --test_mot15 True --load_model your_mot15_model.pth --conf_thres 0.3
python track.py mot --test_mot20 True --load_model your_mot20_model.pth --conf_thres 0.3
```
Results of the test set all need to be evaluated on the MOT challenge server. You can see the tracking results on the training set by setting --val_motxx True and run the tracking code. We set 'conf_thres' 0.4 for MOT16 and MOT17. We set 'conf_thres' 0.3 for 2DMOT15 and MOT20.
## Demo
You can input a raw video and get the demo video by running src/demo.py and get the mp4 format of the demo video:
```
cd src
python demo.py mot --load_model ../models/all_dla34.pth --conf_thres 0.4
```
You can change --input-video and --output-root to get the demos of your own videos.
If you have difficulty building DCNv2 and thus cannot use the DLA-34 baseline model, you can run the demo with the HRNetV2_w18 baseline model:
```
cd src
python demo.py mot --load_model ../models/all_hrnet_v2_w18.pth --arch hrnet_18 --reid_dim 128 --conf_thres 0.4
```
--conf_thres can be set from 0.3 to 0.7 depending on your own videos.
## Acknowledgement
A large part of the code is borrowed from [Zhongdao/Towards-Realtime-MOT](https://github.com/Zhongdao/Towards-Realtime-MOT) and [xingyizhou/CenterNet](https://github.com/xingyizhou/CenterNet). Thanks for their wonderful works.
## Citation
```
@article{zhang2020simple,
title={A Simple Baseline for Multi-Object Tracking},
author={Zhang, Yifu and Wang, Chunyu and Wang, Xinggang and Zeng, Wenjun and Liu, Wenyu},
journal={arXiv preprint arXiv:2004.01888},
year={2020}
}
```
# Contributing

Двоичные данные
assets/MOT15.gif Normal file

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 3.1 MiB

Двоичные данные
assets/MOT16.gif Normal file

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 5.1 MiB

Двоичные данные
assets/MOT17.gif Normal file

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 4.3 MiB

Двоичные данные
assets/MOT20.gif Normal file

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 5.5 MiB

Двоичные данные
assets/pipeline.png Normal file

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 270 KiB

3
experiments/all_dla34.sh Normal file
Просмотреть файл

@ -0,0 +1,3 @@
cd src
python train.py mot --exp_id all_dla34 --gpus 0,1 --batch_size 8 --load_model '../models/ctdet_coco_dla_2x.pth'
cd ..

3
experiments/all_hrnet.sh Normal file
Просмотреть файл

@ -0,0 +1,3 @@
cd src
python train.py mot --exp_id all_hrnet --gpus 0,1 --batch_size 8 --reid_dim 128 --arch 'hrnet_32'
cd ..

3
experiments/all_res50.sh Normal file
Просмотреть файл

@ -0,0 +1,3 @@
cd src
python train.py mot --exp_id all_res50 --gpus 0,1 --batch_size 8 --reid_dim 128 --arch 'resdcn_50'
cd ..

Просмотреть файл

@ -0,0 +1,3 @@
cd src
python train.py mot --exp_id ft_mot15_dla34 --gpus 0,1 --batch_size 8 --load_model '../models/all_dla34.pth' --data_cfg '../src/lib/cfg/mot15.json' --num_epochs 10 --lr 1e-5
cd ..

Просмотреть файл

@ -0,0 +1,3 @@
cd src
python train.py mot --exp_id ft_mot20_dla34 --gpus 0,1 --batch_size 8 --load_model '../models/all_dla34.pth' --data_cfg '../src/lib/cfg/mot20.json' --num_epochs 20 --lr_step '15' --K 500
cd ..

13
requirements.txt Normal file
Просмотреть файл

@ -0,0 +1,13 @@
yacs
opencv-python
cython-bbox
scipy
numba
progress
motmetrics
numba
matplotlib
lap
openpyxl
Pillow==6.2.2
tensorboardX

17
src/_init_paths.py Normal file
Просмотреть файл

@ -0,0 +1,17 @@
# ------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation
# Licensed under MIT License
# ------------------------------------------------------------------------------
import os.path as osp
import sys
def add_path(path):
if path not in sys.path:
sys.path.insert(0, path)
this_dir = osp.dirname(__file__)
# Add lib to PYTHONPATH
lib_path = osp.join(this_dir, 'lib')
add_path(lib_path)

9998
src/data/caltech.10k.val Normal file

Разница между файлами не показана из-за своего большого размера Загрузить разницу

26915
src/data/caltech.all Normal file

Разница между файлами не показана из-за своего большого размера Загрузить разницу

26729
src/data/caltech.train Normal file

Разница между файлами не показана из-за своего большого размера Загрузить разницу

29905
src/data/caltech.val Normal file

Разница между файлами не показана из-за своего большого размера Загрузить разницу

2500
src/data/citypersons.train Normal file

Разница между файлами не показана из-за своего большого размера Загрузить разницу

441
src/data/citypersons.val Normal file
Просмотреть файл

@ -0,0 +1,441 @@
Cityscapes/images/val/frankfurt/frankfurt_000001_066574_leftImg8bit.png
Cityscapes/images/val/frankfurt/frankfurt_000001_067474_leftImg8bit.png
Cityscapes/images/val/frankfurt/frankfurt_000001_077092_leftImg8bit.png
Cityscapes/images/val/frankfurt/frankfurt_000001_028590_leftImg8bit.png
Cityscapes/images/val/frankfurt/frankfurt_000001_028335_leftImg8bit.png
Cityscapes/images/val/frankfurt/frankfurt_000001_050149_leftImg8bit.png
Cityscapes/images/val/frankfurt/frankfurt_000001_043395_leftImg8bit.png
Cityscapes/images/val/frankfurt/frankfurt_000001_059119_leftImg8bit.png
Cityscapes/images/val/frankfurt/frankfurt_000000_005543_leftImg8bit.png
Cityscapes/images/val/frankfurt/frankfurt_000001_010156_leftImg8bit.png
Cityscapes/images/val/frankfurt/frankfurt_000001_064130_leftImg8bit.png
Cityscapes/images/val/frankfurt/frankfurt_000000_001016_leftImg8bit.png
Cityscapes/images/val/frankfurt/frankfurt_000000_003025_leftImg8bit.png
Cityscapes/images/val/frankfurt/frankfurt_000001_071288_leftImg8bit.png
Cityscapes/images/val/frankfurt/frankfurt_000001_055062_leftImg8bit.png
Cityscapes/images/val/frankfurt/frankfurt_000000_012868_leftImg8bit.png
Cityscapes/images/val/frankfurt/frankfurt_000001_048196_leftImg8bit.png
Cityscapes/images/val/frankfurt/frankfurt_000001_044658_leftImg8bit.png
Cityscapes/images/val/frankfurt/frankfurt_000001_080391_leftImg8bit.png
Cityscapes/images/val/frankfurt/frankfurt_000001_080091_leftImg8bit.png
Cityscapes/images/val/frankfurt/frankfurt_000000_007365_leftImg8bit.png
Cityscapes/images/val/frankfurt/frankfurt_000001_013710_leftImg8bit.png
Cityscapes/images/val/frankfurt/frankfurt_000000_013942_leftImg8bit.png
Cityscapes/images/val/frankfurt/frankfurt_000001_007973_leftImg8bit.png
Cityscapes/images/val/frankfurt/frankfurt_000001_020693_leftImg8bit.png
Cityscapes/images/val/frankfurt/frankfurt_000000_016286_leftImg8bit.png
Cityscapes/images/val/frankfurt/frankfurt_000001_073088_leftImg8bit.png
Cityscapes/images/val/frankfurt/frankfurt_000001_066438_leftImg8bit.png
Cityscapes/images/val/frankfurt/frankfurt_000001_030067_leftImg8bit.png
Cityscapes/images/val/frankfurt/frankfurt_000001_067178_leftImg8bit.png
Cityscapes/images/val/frankfurt/frankfurt_000000_014480_leftImg8bit.png
Cityscapes/images/val/frankfurt/frankfurt_000001_073464_leftImg8bit.png
Cityscapes/images/val/frankfurt/frankfurt_000000_011810_leftImg8bit.png
Cityscapes/images/val/frankfurt/frankfurt_000001_005898_leftImg8bit.png
Cityscapes/images/val/frankfurt/frankfurt_000001_019854_leftImg8bit.png
Cityscapes/images/val/frankfurt/frankfurt_000001_055709_leftImg8bit.png
Cityscapes/images/val/frankfurt/frankfurt_000001_002512_leftImg8bit.png
Cityscapes/images/val/frankfurt/frankfurt_000001_007622_leftImg8bit.png
Cityscapes/images/val/frankfurt/frankfurt_000001_054077_leftImg8bit.png
Cityscapes/images/val/frankfurt/frankfurt_000001_060545_leftImg8bit.png
Cityscapes/images/val/frankfurt/frankfurt_000001_063045_leftImg8bit.png
Cityscapes/images/val/frankfurt/frankfurt_000001_032556_leftImg8bit.png
Cityscapes/images/val/frankfurt/frankfurt_000001_064305_leftImg8bit.png
Cityscapes/images/val/frankfurt/frankfurt_000001_049698_leftImg8bit.png
Cityscapes/images/val/frankfurt/frankfurt_000001_007857_leftImg8bit.png
Cityscapes/images/val/frankfurt/frankfurt_000001_012519_leftImg8bit.png
Cityscapes/images/val/frankfurt/frankfurt_000001_034816_leftImg8bit.png
Cityscapes/images/val/frankfurt/frankfurt_000001_032018_leftImg8bit.png
Cityscapes/images/val/frankfurt/frankfurt_000001_019969_leftImg8bit.png
Cityscapes/images/val/frankfurt/frankfurt_000001_025713_leftImg8bit.png
Cityscapes/images/val/frankfurt/frankfurt_000001_065617_leftImg8bit.png
Cityscapes/images/val/frankfurt/frankfurt_000000_017228_leftImg8bit.png
Cityscapes/images/val/frankfurt/frankfurt_000001_062016_leftImg8bit.png
Cityscapes/images/val/frankfurt/frankfurt_000001_009504_leftImg8bit.png
Cityscapes/images/val/frankfurt/frankfurt_000000_010763_leftImg8bit.png
Cityscapes/images/val/frankfurt/frankfurt_000001_030669_leftImg8bit.png
Cityscapes/images/val/frankfurt/frankfurt_000001_002646_leftImg8bit.png
Cityscapes/images/val/frankfurt/frankfurt_000001_001464_leftImg8bit.png
Cityscapes/images/val/frankfurt/frankfurt_000001_062396_leftImg8bit.png
Cityscapes/images/val/frankfurt/frankfurt_000000_008206_leftImg8bit.png
Cityscapes/images/val/frankfurt/frankfurt_000001_004327_leftImg8bit.png
Cityscapes/images/val/frankfurt/frankfurt_000001_075984_leftImg8bit.png
Cityscapes/images/val/frankfurt/frankfurt_000001_052120_leftImg8bit.png
Cityscapes/images/val/frankfurt/frankfurt_000001_020046_leftImg8bit.png
Cityscapes/images/val/frankfurt/frankfurt_000001_046504_leftImg8bit.png
Cityscapes/images/val/frankfurt/frankfurt_000001_078803_leftImg8bit.png
Cityscapes/images/val/frankfurt/frankfurt_000001_011835_leftImg8bit.png
Cityscapes/images/val/frankfurt/frankfurt_000001_038418_leftImg8bit.png
Cityscapes/images/val/frankfurt/frankfurt_000001_012699_leftImg8bit.png
Cityscapes/images/val/frankfurt/frankfurt_000001_031266_leftImg8bit.png
Cityscapes/images/val/frankfurt/frankfurt_000000_022254_leftImg8bit.png
Cityscapes/images/val/frankfurt/frankfurt_000001_068208_leftImg8bit.png
Cityscapes/images/val/frankfurt/frankfurt_000001_007285_leftImg8bit.png
Cityscapes/images/val/frankfurt/frankfurt_000001_039895_leftImg8bit.png
Cityscapes/images/val/frankfurt/frankfurt_000001_073243_leftImg8bit.png
Cityscapes/images/val/frankfurt/frankfurt_000001_038245_leftImg8bit.png
Cityscapes/images/val/frankfurt/frankfurt_000001_046779_leftImg8bit.png
Cityscapes/images/val/frankfurt/frankfurt_000001_025921_leftImg8bit.png
Cityscapes/images/val/frankfurt/frankfurt_000000_016005_leftImg8bit.png
Cityscapes/images/val/frankfurt/frankfurt_000001_044787_leftImg8bit.png
Cityscapes/images/val/frankfurt/frankfurt_000001_054415_leftImg8bit.png
Cityscapes/images/val/frankfurt/frankfurt_000001_033655_leftImg8bit.png
Cityscapes/images/val/frankfurt/frankfurt_000001_049209_leftImg8bit.png
Cityscapes/images/val/frankfurt/frankfurt_000001_061763_leftImg8bit.png
Cityscapes/images/val/frankfurt/frankfurt_000000_022797_leftImg8bit.png
Cityscapes/images/val/frankfurt/frankfurt_000001_028232_leftImg8bit.png
Cityscapes/images/val/frankfurt/frankfurt_000001_083852_leftImg8bit.png
Cityscapes/images/val/frankfurt/frankfurt_000001_058057_leftImg8bit.png
Cityscapes/images/val/frankfurt/frankfurt_000001_020287_leftImg8bit.png
Cityscapes/images/val/frankfurt/frankfurt_000001_012738_leftImg8bit.png
Cityscapes/images/val/frankfurt/frankfurt_000001_043564_leftImg8bit.png
Cityscapes/images/val/frankfurt/frankfurt_000000_005898_leftImg8bit.png
Cityscapes/images/val/frankfurt/frankfurt_000001_049770_leftImg8bit.png
Cityscapes/images/val/frankfurt/frankfurt_000001_065850_leftImg8bit.png
Cityscapes/images/val/frankfurt/frankfurt_000001_044525_leftImg8bit.png
Cityscapes/images/val/frankfurt/frankfurt_000001_009854_leftImg8bit.png
Cityscapes/images/val/frankfurt/frankfurt_000001_077434_leftImg8bit.png
Cityscapes/images/val/frankfurt/frankfurt_000001_062250_leftImg8bit.png
Cityscapes/images/val/frankfurt/frankfurt_000001_038645_leftImg8bit.png
Cityscapes/images/val/frankfurt/frankfurt_000001_057181_leftImg8bit.png
Cityscapes/images/val/frankfurt/frankfurt_000001_062509_leftImg8bit.png
Cityscapes/images/val/frankfurt/frankfurt_000000_020215_leftImg8bit.png
Cityscapes/images/val/frankfurt/frankfurt_000000_020321_leftImg8bit.png
Cityscapes/images/val/frankfurt/frankfurt_000001_016029_leftImg8bit.png
Cityscapes/images/val/frankfurt/frankfurt_000001_068063_leftImg8bit.png
Cityscapes/images/val/frankfurt/frankfurt_000000_017476_leftImg8bit.png
Cityscapes/images/val/frankfurt/frankfurt_000001_011162_leftImg8bit.png
Cityscapes/images/val/frankfurt/frankfurt_000000_011461_leftImg8bit.png
Cityscapes/images/val/frankfurt/frankfurt_000000_013240_leftImg8bit.png
Cityscapes/images/val/frankfurt/frankfurt_000001_079206_leftImg8bit.png
Cityscapes/images/val/frankfurt/frankfurt_000001_018113_leftImg8bit.png
Cityscapes/images/val/frankfurt/frankfurt_000001_066092_leftImg8bit.png
Cityscapes/images/val/frankfurt/frankfurt_000001_051807_leftImg8bit.png
Cityscapes/images/val/frankfurt/frankfurt_000001_058176_leftImg8bit.png
Cityscapes/images/val/frankfurt/frankfurt_000000_015676_leftImg8bit.png
Cityscapes/images/val/frankfurt/frankfurt_000000_018797_leftImg8bit.png
Cityscapes/images/val/frankfurt/frankfurt_000001_012870_leftImg8bit.png
Cityscapes/images/val/frankfurt/frankfurt_000001_064925_leftImg8bit.png
Cityscapes/images/val/frankfurt/frankfurt_000001_023235_leftImg8bit.png
Cityscapes/images/val/frankfurt/frankfurt_000001_010600_leftImg8bit.png
Cityscapes/images/val/frankfurt/frankfurt_000001_077233_leftImg8bit.png
Cityscapes/images/val/frankfurt/frankfurt_000001_067735_leftImg8bit.png
Cityscapes/images/val/frankfurt/frankfurt_000001_014221_leftImg8bit.png
Cityscapes/images/val/frankfurt/frankfurt_000000_021879_leftImg8bit.png
Cityscapes/images/val/frankfurt/frankfurt_000001_041664_leftImg8bit.png
Cityscapes/images/val/frankfurt/frankfurt_000001_003588_leftImg8bit.png
Cityscapes/images/val/frankfurt/frankfurt_000000_009561_leftImg8bit.png
Cityscapes/images/val/frankfurt/frankfurt_000001_062793_leftImg8bit.png
Cityscapes/images/val/frankfurt/frankfurt_000001_014565_leftImg8bit.png
Cityscapes/images/val/frankfurt/frankfurt_000001_083029_leftImg8bit.png
Cityscapes/images/val/frankfurt/frankfurt_000000_013067_leftImg8bit.png
Cityscapes/images/val/frankfurt/frankfurt_000000_009688_leftImg8bit.png
Cityscapes/images/val/frankfurt/frankfurt_000001_055387_leftImg8bit.png
Cityscapes/images/val/frankfurt/frankfurt_000001_023769_leftImg8bit.png
Cityscapes/images/val/frankfurt/frankfurt_000001_013016_leftImg8bit.png
Cityscapes/images/val/frankfurt/frankfurt_000001_083199_leftImg8bit.png
Cityscapes/images/val/frankfurt/frankfurt_000001_034047_leftImg8bit.png
Cityscapes/images/val/frankfurt/frankfurt_000001_049298_leftImg8bit.png
Cityscapes/images/val/frankfurt/frankfurt_000001_035144_leftImg8bit.png
Cityscapes/images/val/frankfurt/frankfurt_000001_008688_leftImg8bit.png
Cityscapes/images/val/frankfurt/frankfurt_000001_015328_leftImg8bit.png
Cityscapes/images/val/frankfurt/frankfurt_000001_024927_leftImg8bit.png
Cityscapes/images/val/frankfurt/frankfurt_000001_032942_leftImg8bit.png
Cityscapes/images/val/frankfurt/frankfurt_000001_027325_leftImg8bit.png
Cityscapes/images/val/frankfurt/frankfurt_000001_014741_leftImg8bit.png
Cityscapes/images/val/frankfurt/frankfurt_000000_009969_leftImg8bit.png
Cityscapes/images/val/frankfurt/frankfurt_000001_067295_leftImg8bit.png
Cityscapes/images/val/frankfurt/frankfurt_000000_012121_leftImg8bit.png
Cityscapes/images/val/frankfurt/frankfurt_000001_004859_leftImg8bit.png
Cityscapes/images/val/frankfurt/frankfurt_000000_015389_leftImg8bit.png
Cityscapes/images/val/frankfurt/frankfurt_000001_068682_leftImg8bit.png
Cityscapes/images/val/frankfurt/frankfurt_000001_021406_leftImg8bit.png
Cityscapes/images/val/frankfurt/frankfurt_000001_050686_leftImg8bit.png
Cityscapes/images/val/frankfurt/frankfurt_000001_000538_leftImg8bit.png
Cityscapes/images/val/frankfurt/frankfurt_000001_082087_leftImg8bit.png
Cityscapes/images/val/frankfurt/frankfurt_000001_057954_leftImg8bit.png
Cityscapes/images/val/frankfurt/frankfurt_000001_054219_leftImg8bit.png
Cityscapes/images/val/frankfurt/frankfurt_000000_003920_leftImg8bit.png
Cityscapes/images/val/frankfurt/frankfurt_000001_040732_leftImg8bit.png
Cityscapes/images/val/frankfurt/frankfurt_000001_038844_leftImg8bit.png
Cityscapes/images/val/frankfurt/frankfurt_000001_042733_leftImg8bit.png
Cityscapes/images/val/frankfurt/frankfurt_000001_037705_leftImg8bit.png
Cityscapes/images/val/frankfurt/frankfurt_000001_069633_leftImg8bit.png
Cityscapes/images/val/frankfurt/frankfurt_000001_005703_leftImg8bit.png
Cityscapes/images/val/frankfurt/frankfurt_000001_025512_leftImg8bit.png
Cityscapes/images/val/frankfurt/frankfurt_000001_002759_leftImg8bit.png
Cityscapes/images/val/frankfurt/frankfurt_000001_015091_leftImg8bit.png
Cityscapes/images/val/frankfurt/frankfurt_000001_080830_leftImg8bit.png
Cityscapes/images/val/frankfurt/frankfurt_000000_019607_leftImg8bit.png
Cityscapes/images/val/frankfurt/frankfurt_000001_009058_leftImg8bit.png
Cityscapes/images/val/frankfurt/frankfurt_000001_015768_leftImg8bit.png
Cityscapes/images/val/frankfurt/frankfurt_000001_042384_leftImg8bit.png
Cityscapes/images/val/frankfurt/frankfurt_000000_012009_leftImg8bit.png
Cityscapes/images/val/frankfurt/frankfurt_000001_068772_leftImg8bit.png
Cityscapes/images/val/frankfurt/frankfurt_000001_072155_leftImg8bit.png
Cityscapes/images/val/frankfurt/frankfurt_000001_058504_leftImg8bit.png
Cityscapes/images/val/frankfurt/frankfurt_000001_016273_leftImg8bit.png
Cityscapes/images/val/frankfurt/frankfurt_000001_060906_leftImg8bit.png
Cityscapes/images/val/frankfurt/frankfurt_000001_066832_leftImg8bit.png
Cityscapes/images/val/frankfurt/frankfurt_000000_009291_leftImg8bit.png
Cityscapes/images/val/frankfurt/frankfurt_000001_059642_leftImg8bit.png
Cityscapes/images/val/frankfurt/frankfurt_000001_064798_leftImg8bit.png
Cityscapes/images/val/frankfurt/frankfurt_000001_060422_leftImg8bit.png
Cityscapes/images/val/frankfurt/frankfurt_000000_001236_leftImg8bit.png
Cityscapes/images/val/frankfurt/frankfurt_000001_055172_leftImg8bit.png
Cityscapes/images/val/frankfurt/frankfurt_000001_005410_leftImg8bit.png
Cityscapes/images/val/frankfurt/frankfurt_000001_075296_leftImg8bit.png
Cityscapes/images/val/frankfurt/frankfurt_000001_005184_leftImg8bit.png
Cityscapes/images/val/frankfurt/frankfurt_000001_044413_leftImg8bit.png
Cityscapes/images/val/frankfurt/frankfurt_000000_002196_leftImg8bit.png
Cityscapes/images/val/frankfurt/frankfurt_000001_064651_leftImg8bit.png
Cityscapes/images/val/frankfurt/frankfurt_000001_014406_leftImg8bit.png
Cityscapes/images/val/frankfurt/frankfurt_000001_048355_leftImg8bit.png
Cityscapes/images/val/frankfurt/frankfurt_000001_051516_leftImg8bit.png
Cityscapes/images/val/frankfurt/frankfurt_000001_040575_leftImg8bit.png
Cityscapes/images/val/frankfurt/frankfurt_000001_017842_leftImg8bit.png
Cityscapes/images/val/frankfurt/frankfurt_000001_041074_leftImg8bit.png
Cityscapes/images/val/frankfurt/frankfurt_000001_057478_leftImg8bit.png
Cityscapes/images/val/frankfurt/frankfurt_000001_055306_leftImg8bit.png
Cityscapes/images/val/frankfurt/frankfurt_000001_062653_leftImg8bit.png
Cityscapes/images/val/frankfurt/frankfurt_000001_007407_leftImg8bit.png
Cityscapes/images/val/frankfurt/frankfurt_000001_048654_leftImg8bit.png
Cityscapes/images/val/frankfurt/frankfurt_000001_019698_leftImg8bit.png
Cityscapes/images/val/frankfurt/frankfurt_000001_049078_leftImg8bit.png
Cityscapes/images/val/frankfurt/frankfurt_000001_061682_leftImg8bit.png
Cityscapes/images/val/frankfurt/frankfurt_000001_055603_leftImg8bit.png
Cityscapes/images/val/frankfurt/frankfurt_000001_023369_leftImg8bit.png
Cityscapes/images/val/frankfurt/frankfurt_000001_067092_leftImg8bit.png
Cityscapes/images/val/frankfurt/frankfurt_000001_054884_leftImg8bit.png
Cityscapes/images/val/frankfurt/frankfurt_000001_058914_leftImg8bit.png
Cityscapes/images/val/frankfurt/frankfurt_000001_070099_leftImg8bit.png
Cityscapes/images/val/frankfurt/frankfurt_000000_000294_leftImg8bit.png
Cityscapes/images/val/frankfurt/frankfurt_000001_056580_leftImg8bit.png
Cityscapes/images/val/frankfurt/frankfurt_000001_032711_leftImg8bit.png
Cityscapes/images/val/frankfurt/frankfurt_000000_013382_leftImg8bit.png
Cityscapes/images/val/frankfurt/frankfurt_000001_010830_leftImg8bit.png
Cityscapes/images/val/frankfurt/frankfurt_000000_000576_leftImg8bit.png
Cityscapes/images/val/frankfurt/frankfurt_000000_020880_leftImg8bit.png
Cityscapes/images/val/frankfurt/frankfurt_000001_030310_leftImg8bit.png
Cityscapes/images/val/frankfurt/frankfurt_000001_011715_leftImg8bit.png
Cityscapes/images/val/frankfurt/frankfurt_000001_008200_leftImg8bit.png
Cityscapes/images/val/frankfurt/frankfurt_000001_052594_leftImg8bit.png
Cityscapes/images/val/frankfurt/frankfurt_000001_042098_leftImg8bit.png
Cityscapes/images/val/frankfurt/frankfurt_000000_011007_leftImg8bit.png
Cityscapes/images/val/frankfurt/frankfurt_000001_012038_leftImg8bit.png
Cityscapes/images/val/frankfurt/frankfurt_000000_001751_leftImg8bit.png
Cityscapes/images/val/frankfurt/frankfurt_000001_046126_leftImg8bit.png
Cityscapes/images/val/frankfurt/frankfurt_000001_053102_leftImg8bit.png
Cityscapes/images/val/frankfurt/frankfurt_000001_013496_leftImg8bit.png
Cityscapes/images/val/frankfurt/frankfurt_000001_046272_leftImg8bit.png
Cityscapes/images/val/frankfurt/frankfurt_000001_073911_leftImg8bit.png
Cityscapes/images/val/frankfurt/frankfurt_000000_021667_leftImg8bit.png
Cityscapes/images/val/frankfurt/frankfurt_000001_065160_leftImg8bit.png
Cityscapes/images/val/frankfurt/frankfurt_000001_059789_leftImg8bit.png
Cityscapes/images/val/frankfurt/frankfurt_000001_017101_leftImg8bit.png
Cityscapes/images/val/frankfurt/frankfurt_000001_044227_leftImg8bit.png
Cityscapes/images/val/frankfurt/frankfurt_000001_029600_leftImg8bit.png
Cityscapes/images/val/frankfurt/frankfurt_000000_008451_leftImg8bit.png
Cityscapes/images/val/frankfurt/frankfurt_000001_076502_leftImg8bit.png
Cityscapes/images/val/frankfurt/frankfurt_000001_029086_leftImg8bit.png
Cityscapes/images/val/frankfurt/frankfurt_000001_051737_leftImg8bit.png
Cityscapes/images/val/frankfurt/frankfurt_000001_031416_leftImg8bit.png
Cityscapes/images/val/frankfurt/frankfurt_000001_029236_leftImg8bit.png
Cityscapes/images/val/frankfurt/frankfurt_000001_004736_leftImg8bit.png
Cityscapes/images/val/frankfurt/frankfurt_000001_047178_leftImg8bit.png
Cityscapes/images/val/frankfurt/frankfurt_000001_010444_leftImg8bit.png
Cityscapes/images/val/frankfurt/frankfurt_000001_016462_leftImg8bit.png
Cityscapes/images/val/frankfurt/frankfurt_000001_028854_leftImg8bit.png
Cityscapes/images/val/frankfurt/frankfurt_000001_055538_leftImg8bit.png
Cityscapes/images/val/frankfurt/frankfurt_000001_021825_leftImg8bit.png
Cityscapes/images/val/frankfurt/frankfurt_000000_011074_leftImg8bit.png
Cityscapes/images/val/frankfurt/frankfurt_000001_071781_leftImg8bit.png
Cityscapes/images/val/frankfurt/frankfurt_000001_017459_leftImg8bit.png
Cityscapes/images/val/frankfurt/frankfurt_000001_054640_leftImg8bit.png
Cityscapes/images/val/frankfurt/frankfurt_000001_035864_leftImg8bit.png
Cityscapes/images/val/munster/munster_000129_000019_leftImg8bit.png
Cityscapes/images/val/munster/munster_000011_000019_leftImg8bit.png
Cityscapes/images/val/munster/munster_000044_000019_leftImg8bit.png
Cityscapes/images/val/munster/munster_000165_000019_leftImg8bit.png
Cityscapes/images/val/munster/munster_000078_000019_leftImg8bit.png
Cityscapes/images/val/munster/munster_000014_000019_leftImg8bit.png
Cityscapes/images/val/munster/munster_000086_000019_leftImg8bit.png
Cityscapes/images/val/munster/munster_000067_000019_leftImg8bit.png
Cityscapes/images/val/munster/munster_000097_000019_leftImg8bit.png
Cityscapes/images/val/munster/munster_000077_000019_leftImg8bit.png
Cityscapes/images/val/munster/munster_000138_000019_leftImg8bit.png
Cityscapes/images/val/munster/munster_000058_000019_leftImg8bit.png
Cityscapes/images/val/munster/munster_000030_000019_leftImg8bit.png
Cityscapes/images/val/munster/munster_000083_000019_leftImg8bit.png
Cityscapes/images/val/munster/munster_000085_000019_leftImg8bit.png
Cityscapes/images/val/munster/munster_000036_000019_leftImg8bit.png
Cityscapes/images/val/munster/munster_000026_000019_leftImg8bit.png
Cityscapes/images/val/munster/munster_000068_000019_leftImg8bit.png
Cityscapes/images/val/munster/munster_000064_000019_leftImg8bit.png
Cityscapes/images/val/munster/munster_000024_000019_leftImg8bit.png
Cityscapes/images/val/munster/munster_000135_000019_leftImg8bit.png
Cityscapes/images/val/munster/munster_000120_000019_leftImg8bit.png
Cityscapes/images/val/munster/munster_000041_000019_leftImg8bit.png
Cityscapes/images/val/munster/munster_000169_000019_leftImg8bit.png
Cityscapes/images/val/munster/munster_000144_000019_leftImg8bit.png
Cityscapes/images/val/munster/munster_000049_000019_leftImg8bit.png
Cityscapes/images/val/munster/munster_000062_000019_leftImg8bit.png
Cityscapes/images/val/munster/munster_000048_000019_leftImg8bit.png
Cityscapes/images/val/munster/munster_000154_000019_leftImg8bit.png
Cityscapes/images/val/munster/munster_000053_000019_leftImg8bit.png
Cityscapes/images/val/munster/munster_000022_000019_leftImg8bit.png
Cityscapes/images/val/munster/munster_000076_000019_leftImg8bit.png
Cityscapes/images/val/munster/munster_000040_000019_leftImg8bit.png
Cityscapes/images/val/munster/munster_000032_000019_leftImg8bit.png
Cityscapes/images/val/munster/munster_000163_000019_leftImg8bit.png
Cityscapes/images/val/munster/munster_000149_000019_leftImg8bit.png
Cityscapes/images/val/munster/munster_000094_000019_leftImg8bit.png
Cityscapes/images/val/munster/munster_000146_000019_leftImg8bit.png
Cityscapes/images/val/munster/munster_000084_000019_leftImg8bit.png
Cityscapes/images/val/munster/munster_000000_000019_leftImg8bit.png
Cityscapes/images/val/munster/munster_000092_000019_leftImg8bit.png
Cityscapes/images/val/munster/munster_000109_000019_leftImg8bit.png
Cityscapes/images/val/munster/munster_000019_000019_leftImg8bit.png
Cityscapes/images/val/munster/munster_000020_000019_leftImg8bit.png
Cityscapes/images/val/munster/munster_000089_000019_leftImg8bit.png
Cityscapes/images/val/munster/munster_000153_000019_leftImg8bit.png
Cityscapes/images/val/munster/munster_000152_000019_leftImg8bit.png
Cityscapes/images/val/munster/munster_000066_000019_leftImg8bit.png
Cityscapes/images/val/munster/munster_000131_000019_leftImg8bit.png
Cityscapes/images/val/munster/munster_000035_000019_leftImg8bit.png
Cityscapes/images/val/munster/munster_000151_000019_leftImg8bit.png
Cityscapes/images/val/munster/munster_000052_000019_leftImg8bit.png
Cityscapes/images/val/munster/munster_000105_000019_leftImg8bit.png
Cityscapes/images/val/munster/munster_000001_000019_leftImg8bit.png
Cityscapes/images/val/munster/munster_000108_000019_leftImg8bit.png
Cityscapes/images/val/munster/munster_000159_000019_leftImg8bit.png
Cityscapes/images/val/munster/munster_000073_000019_leftImg8bit.png
Cityscapes/images/val/munster/munster_000055_000019_leftImg8bit.png
Cityscapes/images/val/munster/munster_000106_000019_leftImg8bit.png
Cityscapes/images/val/munster/munster_000136_000019_leftImg8bit.png
Cityscapes/images/val/munster/munster_000050_000019_leftImg8bit.png
Cityscapes/images/val/munster/munster_000140_000019_leftImg8bit.png
Cityscapes/images/val/munster/munster_000147_000019_leftImg8bit.png
Cityscapes/images/val/munster/munster_000096_000019_leftImg8bit.png
Cityscapes/images/val/munster/munster_000166_000019_leftImg8bit.png
Cityscapes/images/val/munster/munster_000070_000019_leftImg8bit.png
Cityscapes/images/val/munster/munster_000133_000019_leftImg8bit.png
Cityscapes/images/val/munster/munster_000171_000019_leftImg8bit.png
Cityscapes/images/val/munster/munster_000056_000019_leftImg8bit.png
Cityscapes/images/val/munster/munster_000134_000019_leftImg8bit.png
Cityscapes/images/val/munster/munster_000162_000019_leftImg8bit.png
Cityscapes/images/val/munster/munster_000143_000019_leftImg8bit.png
Cityscapes/images/val/munster/munster_000150_000019_leftImg8bit.png
Cityscapes/images/val/munster/munster_000002_000019_leftImg8bit.png
Cityscapes/images/val/munster/munster_000160_000019_leftImg8bit.png
Cityscapes/images/val/munster/munster_000009_000019_leftImg8bit.png
Cityscapes/images/val/munster/munster_000003_000019_leftImg8bit.png
Cityscapes/images/val/munster/munster_000054_000019_leftImg8bit.png
Cityscapes/images/val/munster/munster_000170_000019_leftImg8bit.png
Cityscapes/images/val/munster/munster_000095_000019_leftImg8bit.png
Cityscapes/images/val/munster/munster_000141_000019_leftImg8bit.png
Cityscapes/images/val/munster/munster_000006_000019_leftImg8bit.png
Cityscapes/images/val/munster/munster_000126_000019_leftImg8bit.png
Cityscapes/images/val/munster/munster_000099_000019_leftImg8bit.png
Cityscapes/images/val/munster/munster_000071_000019_leftImg8bit.png
Cityscapes/images/val/munster/munster_000148_000019_leftImg8bit.png
Cityscapes/images/val/munster/munster_000128_000019_leftImg8bit.png
Cityscapes/images/val/munster/munster_000114_000019_leftImg8bit.png
Cityscapes/images/val/munster/munster_000018_000019_leftImg8bit.png
Cityscapes/images/val/munster/munster_000130_000019_leftImg8bit.png
Cityscapes/images/val/munster/munster_000113_000019_leftImg8bit.png
Cityscapes/images/val/munster/munster_000063_000019_leftImg8bit.png
Cityscapes/images/val/munster/munster_000157_000019_leftImg8bit.png
Cityscapes/images/val/munster/munster_000060_000019_leftImg8bit.png
Cityscapes/images/val/munster/munster_000116_000019_leftImg8bit.png
Cityscapes/images/val/munster/munster_000028_000019_leftImg8bit.png
Cityscapes/images/val/munster/munster_000075_000019_leftImg8bit.png
Cityscapes/images/val/munster/munster_000158_000019_leftImg8bit.png
Cityscapes/images/val/munster/munster_000155_000019_leftImg8bit.png
Cityscapes/images/val/munster/munster_000102_000019_leftImg8bit.png
Cityscapes/images/val/munster/munster_000172_000019_leftImg8bit.png
Cityscapes/images/val/munster/munster_000122_000019_leftImg8bit.png
Cityscapes/images/val/munster/munster_000142_000019_leftImg8bit.png
Cityscapes/images/val/munster/munster_000029_000019_leftImg8bit.png
Cityscapes/images/val/munster/munster_000046_000019_leftImg8bit.png
Cityscapes/images/val/munster/munster_000090_000019_leftImg8bit.png
Cityscapes/images/val/munster/munster_000013_000019_leftImg8bit.png
Cityscapes/images/val/munster/munster_000124_000019_leftImg8bit.png
Cityscapes/images/val/munster/munster_000061_000019_leftImg8bit.png
Cityscapes/images/val/munster/munster_000023_000019_leftImg8bit.png
Cityscapes/images/val/munster/munster_000139_000019_leftImg8bit.png
Cityscapes/images/val/munster/munster_000015_000019_leftImg8bit.png
Cityscapes/images/val/munster/munster_000033_000019_leftImg8bit.png
Cityscapes/images/val/munster/munster_000074_000019_leftImg8bit.png
Cityscapes/images/val/munster/munster_000145_000019_leftImg8bit.png
Cityscapes/images/val/munster/munster_000031_000019_leftImg8bit.png
Cityscapes/images/val/munster/munster_000168_000019_leftImg8bit.png
Cityscapes/images/val/munster/munster_000161_000019_leftImg8bit.png
Cityscapes/images/val/munster/munster_000069_000019_leftImg8bit.png
Cityscapes/images/val/munster/munster_000025_000019_leftImg8bit.png
Cityscapes/images/val/munster/munster_000167_000019_leftImg8bit.png
Cityscapes/images/val/munster/munster_000072_000019_leftImg8bit.png
Cityscapes/images/val/munster/munster_000125_000019_leftImg8bit.png
Cityscapes/images/val/munster/munster_000007_000019_leftImg8bit.png
Cityscapes/images/val/munster/munster_000042_000019_leftImg8bit.png
Cityscapes/images/val/munster/munster_000104_000019_leftImg8bit.png
Cityscapes/images/val/munster/munster_000115_000019_leftImg8bit.png
Cityscapes/images/val/munster/munster_000098_000019_leftImg8bit.png
Cityscapes/images/val/munster/munster_000047_000019_leftImg8bit.png
Cityscapes/images/val/munster/munster_000080_000019_leftImg8bit.png
Cityscapes/images/val/munster/munster_000137_000019_leftImg8bit.png
Cityscapes/images/val/munster/munster_000119_000019_leftImg8bit.png
Cityscapes/images/val/munster/munster_000088_000019_leftImg8bit.png
Cityscapes/images/val/munster/munster_000004_000019_leftImg8bit.png
Cityscapes/images/val/munster/munster_000016_000019_leftImg8bit.png
Cityscapes/images/val/munster/munster_000012_000019_leftImg8bit.png
Cityscapes/images/val/munster/munster_000156_000019_leftImg8bit.png
Cityscapes/images/val/munster/munster_000039_000019_leftImg8bit.png
Cityscapes/images/val/munster/munster_000101_000019_leftImg8bit.png
Cityscapes/images/val/munster/munster_000111_000019_leftImg8bit.png
Cityscapes/images/val/munster/munster_000010_000019_leftImg8bit.png
Cityscapes/images/val/munster/munster_000059_000019_leftImg8bit.png
Cityscapes/images/val/munster/munster_000110_000019_leftImg8bit.png
Cityscapes/images/val/munster/munster_000005_000019_leftImg8bit.png
Cityscapes/images/val/munster/munster_000121_000019_leftImg8bit.png
Cityscapes/images/val/munster/munster_000057_000019_leftImg8bit.png
Cityscapes/images/val/munster/munster_000079_000019_leftImg8bit.png
Cityscapes/images/val/munster/munster_000123_000019_leftImg8bit.png
Cityscapes/images/val/munster/munster_000112_000019_leftImg8bit.png
Cityscapes/images/val/munster/munster_000091_000019_leftImg8bit.png
Cityscapes/images/val/munster/munster_000127_000019_leftImg8bit.png
Cityscapes/images/val/munster/munster_000093_000019_leftImg8bit.png
Cityscapes/images/val/munster/munster_000038_000019_leftImg8bit.png
Cityscapes/images/val/munster/munster_000045_000019_leftImg8bit.png
Cityscapes/images/val/munster/munster_000017_000019_leftImg8bit.png
Cityscapes/images/val/munster/munster_000043_000019_leftImg8bit.png
Cityscapes/images/val/munster/munster_000021_000019_leftImg8bit.png
Cityscapes/images/val/munster/munster_000051_000019_leftImg8bit.png
Cityscapes/images/val/munster/munster_000103_000019_leftImg8bit.png
Cityscapes/images/val/munster/munster_000027_000019_leftImg8bit.png
Cityscapes/images/val/lindau/lindau_000012_000019_leftImg8bit.png
Cityscapes/images/val/lindau/lindau_000025_000019_leftImg8bit.png
Cityscapes/images/val/lindau/lindau_000052_000019_leftImg8bit.png
Cityscapes/images/val/lindau/lindau_000011_000019_leftImg8bit.png
Cityscapes/images/val/lindau/lindau_000055_000019_leftImg8bit.png
Cityscapes/images/val/lindau/lindau_000014_000019_leftImg8bit.png
Cityscapes/images/val/lindau/lindau_000037_000019_leftImg8bit.png
Cityscapes/images/val/lindau/lindau_000047_000019_leftImg8bit.png
Cityscapes/images/val/lindau/lindau_000057_000019_leftImg8bit.png
Cityscapes/images/val/lindau/lindau_000051_000019_leftImg8bit.png
Cityscapes/images/val/lindau/lindau_000042_000019_leftImg8bit.png
Cityscapes/images/val/lindau/lindau_000041_000019_leftImg8bit.png
Cityscapes/images/val/lindau/lindau_000020_000019_leftImg8bit.png
Cityscapes/images/val/lindau/lindau_000024_000019_leftImg8bit.png
Cityscapes/images/val/lindau/lindau_000035_000019_leftImg8bit.png
Cityscapes/images/val/lindau/lindau_000010_000019_leftImg8bit.png
Cityscapes/images/val/lindau/lindau_000046_000019_leftImg8bit.png
Cityscapes/images/val/lindau/lindau_000022_000019_leftImg8bit.png
Cityscapes/images/val/lindau/lindau_000053_000019_leftImg8bit.png
Cityscapes/images/val/lindau/lindau_000009_000019_leftImg8bit.png
Cityscapes/images/val/lindau/lindau_000013_000019_leftImg8bit.png
Cityscapes/images/val/lindau/lindau_000007_000019_leftImg8bit.png
Cityscapes/images/val/lindau/lindau_000038_000019_leftImg8bit.png
Cityscapes/images/val/lindau/lindau_000054_000019_leftImg8bit.png
Cityscapes/images/val/lindau/lindau_000005_000019_leftImg8bit.png
Cityscapes/images/val/lindau/lindau_000023_000019_leftImg8bit.png

11206
src/data/cuhksysu.train Normal file

Разница между файлами не показана из-за своего большого размера Загрузить разницу

2000
src/data/cuhksysu.val Normal file

Разница между файлами не показана из-за своего большого размера Загрузить разницу

2056
src/data/eth.train Normal file

Разница между файлами не показана из-за своего большого размера Загрузить разницу

5405
src/data/mot15.train Normal file

Разница между файлами не показана из-за своего большого размера Загрузить разницу

2744
src/data/mot15.training Normal file

Разница между файлами не показана из-за своего большого размера Загрузить разницу

1960
src/data/mot15.val Normal file

Разница между файлами не показана из-за своего большого размера Загрузить разницу

2661
src/data/mot15.validation Normal file

Разница между файлами не показана из-за своего большого размера Загрузить разницу

5316
src/data/mot17.train Normal file

Разница между файлами не показана из-за своего большого размера Загрузить разницу

3816
src/data/mot17.training Normal file

Разница между файлами не показана из-за своего большого размера Загрузить разницу

1500
src/data/mot17.validation Normal file

Разница между файлами не показана из-за своего большого размера Загрузить разницу

8931
src/data/mot20.train Normal file

Разница между файлами не показана из-за своего большого размера Загрузить разницу

5701
src/data/prw.train Normal file

Разница между файлами не показана из-за своего большого размера Загрузить разницу

2000
src/data/prw.val Normal file

Разница между файлами не показана из-за своего большого размера Загрузить разницу

49
src/demo.py Normal file
Просмотреть файл

@ -0,0 +1,49 @@
# ------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation
# Licensed under MIT License
# ------------------------------------------------------------------------------
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import _init_paths
import logging
import os
import os.path as osp
from opts import opts
from tracking_utils.utils import mkdir_if_missing
from tracking_utils.log import logger
import datasets.dataset.jde as datasets
from track import eval_seq
logger.setLevel(logging.INFO)
def demo(opt):
result_root = opt.output_root if opt.output_root != '' else '.'
mkdir_if_missing(result_root)
logger.info('Starting tracking...')
dataloader = datasets.LoadVideo(opt.input_video, opt.img_size)
result_filename = os.path.join(result_root, 'results.txt')
frame_rate = dataloader.frame_rate
frame_dir = None if opt.output_format == 'text' else osp.join(result_root, 'frame')
try:
eval_seq(opt, dataloader, 'mot', result_filename,
save_dir=frame_dir, show_image=False, frame_rate=frame_rate)
except Exception as e:
logger.info(e)
if opt.output_format == 'video':
output_video_path = osp.join(result_root, 'result.mp4')
cmd_str = 'ffmpeg -f image2 -i {}/%05d.jpg -b 5000k -c:v mpeg4 {}'.format(osp.join(result_root, 'frame'), output_video_path)
os.system(cmd_str)
if __name__ == '__main__':
opt = opts().init()
demo(opt)

27
src/gen_data_path.py Normal file
Просмотреть файл

@ -0,0 +1,27 @@
# ------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation
# Licensed under MIT License
# ------------------------------------------------------------------------------
import os
import glob
import _init_paths
def gen_caltech_path(root_path):
label_path = 'Caltech/data/labels_with_ids'
real_path = os.path.join(root_path, label_path)
image_path = real_path.replace('labels_with_ids', 'images')
images_exist = sorted(glob.glob(image_path + '/*.png'))
with open('../src/data/caltech.all', 'w') as f:
labels = sorted(glob.glob(real_path + '/*.txt'))
for label in labels:
image = label.replace('labels_with_ids', 'images').replace('.txt', '.png')
if image in images_exist:
print(image[22:], file=f)
f.close()
if __name__ == '__main__':
root = '/data/yfzhang/MOT/JDE'
gen_caltech_path(root)

52
src/gen_labels_15.py Normal file
Просмотреть файл

@ -0,0 +1,52 @@
# ------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation
# Licensed under MIT License
# ------------------------------------------------------------------------------
import os.path as osp
import os
import numpy as np
def mkdirs(d):
if not osp.exists(d):
os.makedirs(d)
seq_root = '/data/yfzhang/MOT/JDE/MOT15/images/train'
label_root = '/data/yfzhang/MOT/JDE/MOT15/labels_with_ids/train'
mkdirs(label_root)
#seqs = [s for s in os.listdir(seq_root)]
seqs = ['ADL-Rundle-6', 'ETH-Bahnhof', 'KITTI-13', 'PETS09-S2L1', 'TUD-Stadtmitte', 'ADL-Rundle-8', 'KITTI-17',
'ETH-Pedcross2', 'ETH-Sunnyday', 'TUD-Campus', 'Venice-2']
tid_curr = 0
tid_last = -1
for seq in seqs:
seq_info = open(osp.join(seq_root, seq, 'seqinfo.ini')).read()
seq_width = int(seq_info[seq_info.find('imWidth=') + 8:seq_info.find('\nimHeight')])
seq_height = int(seq_info[seq_info.find('imHeight=') + 9:seq_info.find('\nimExt')])
gt_txt = osp.join(seq_root, seq, 'gt', 'gt.txt')
gt = np.loadtxt(gt_txt, dtype=np.float64, delimiter=',')
idx = np.lexsort(gt.T[:2, :])
gt = gt[idx, :]
seq_label_root = osp.join(label_root, seq, 'img1')
mkdirs(seq_label_root)
for fid, tid, x, y, w, h, mark, _, _, _ in gt:
if mark == 0:
continue
fid = int(fid)
tid = int(tid)
if not tid == tid_last:
tid_curr += 1
tid_last = tid
x += w / 2
y += h / 2
label_fpath = osp.join(seq_label_root, '{:06d}.txt'.format(fid))
label_str = '0 {:d} {:.6f} {:.6f} {:.6f} {:.6f}\n'.format(
tid_curr, x / seq_width, y / seq_height, w / seq_width, h / seq_height)
with open(label_fpath, 'a') as f:
f.write(label_str)

48
src/gen_labels_20.py Normal file
Просмотреть файл

@ -0,0 +1,48 @@
# ------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation
# Licensed under MIT License
# ------------------------------------------------------------------------------
import os.path as osp
import os
import numpy as np
def mkdirs(d):
if not osp.exists(d):
os.makedirs(d)
seq_root = '/data/yfzhang/MOT/JDE/MOT20/images/train'
label_root = '/data/yfzhang/MOT/JDE/MOT20/labels_with_ids/train'
mkdirs(label_root)
seqs = [s for s in os.listdir(seq_root)]
tid_curr = 0
tid_last = -1
for seq in seqs:
seq_info = open(osp.join(seq_root, seq, 'seqinfo.ini')).read()
seq_width = int(seq_info[seq_info.find('imWidth=') + 8:seq_info.find('\nimHeight')])
seq_height = int(seq_info[seq_info.find('imHeight=') + 9:seq_info.find('\nimExt')])
gt_txt = osp.join(seq_root, seq, 'gt', 'gt.txt')
gt = np.loadtxt(gt_txt, dtype=np.float64, delimiter=',')
seq_label_root = osp.join(label_root, seq, 'img1')
mkdirs(seq_label_root)
for fid, tid, x, y, w, h, mark, label, _ in gt:
if mark == 0 or not label == 1:
continue
fid = int(fid)
tid = int(tid)
if not tid == tid_last:
tid_curr += 1
tid_last = tid
x += w / 2
y += h / 2
label_fpath = osp.join(seq_label_root, '{:06d}.txt'.format(fid))
label_str = '0 {:d} {:.6f} {:.6f} {:.6f} {:.6f}\n'.format(
tid_curr, x / seq_width, y / seq_height, w / seq_width, h / seq_height)
with open(label_fpath, 'a') as f:
f.write(label_str)

220
src/test_det.py Normal file
Просмотреть файл

@ -0,0 +1,220 @@
# ------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation
# Licensed under MIT License
# ------------------------------------------------------------------------------
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import _init_paths
import argparse
import torch
import json
import time
import os
import cv2
from sklearn import metrics
from scipy import interpolate
import numpy as np
from torchvision.transforms import transforms as T
from models.model import create_model, load_model
from datasets.dataset.jde import DetDataset, collate_fn
from utils.utils import xywh2xyxy, ap_per_class, bbox_iou
from opts import opts
from models.decode import mot_decode
from utils.post_process import ctdet_post_process
def post_process(opt, dets, meta):
dets = dets.detach().cpu().numpy()
dets = dets.reshape(1, -1, dets.shape[2])
dets = ctdet_post_process(
dets.copy(), [meta['c']], [meta['s']],
meta['out_height'], meta['out_width'], opt.num_classes)
for j in range(1, opt.num_classes + 1):
dets[0][j] = np.array(dets[0][j], dtype=np.float32).reshape(-1, 5)
return dets[0]
def merge_outputs(opt, detections):
results = {}
for j in range(1, opt.num_classes + 1):
results[j] = np.concatenate(
[detection[j] for detection in detections], axis=0).astype(np.float32)
scores = np.hstack(
[results[j][:, 4] for j in range(1, opt.num_classes + 1)])
if len(scores) > 128:
kth = len(scores) - 128
thresh = np.partition(scores, kth)[kth]
for j in range(1, opt.num_classes + 1):
keep_inds = (results[j][:, 4] >= thresh)
results[j] = results[j][keep_inds]
return results
def test_det(
opt,
batch_size=12,
img_size=(1088, 608),
iou_thres=0.5,
print_interval=40,
):
data_cfg = opt.data_cfg
f = open(data_cfg)
data_cfg_dict = json.load(f)
f.close()
nC = 1
test_path = data_cfg_dict['test']
dataset_root = data_cfg_dict['root']
if opt.gpus[0] >= 0:
opt.device = torch.device('cuda')
else:
opt.device = torch.device('cpu')
print('Creating model...')
model = create_model(opt.arch, opt.heads, opt.head_conv)
model = load_model(model, opt.load_model)
#model = torch.nn.DataParallel(model)
model = model.to(opt.device)
model.eval()
# Get dataloader
transforms = T.Compose([T.ToTensor()])
dataset = DetDataset(dataset_root, test_path, img_size, augment=False, transforms=transforms)
dataloader = torch.utils.data.DataLoader(dataset, batch_size=batch_size, shuffle=False,
num_workers=8, drop_last=False, collate_fn=collate_fn)
mean_mAP, mean_R, mean_P, seen = 0.0, 0.0, 0.0, 0
print('%11s' * 5 % ('Image', 'Total', 'P', 'R', 'mAP'))
outputs, mAPs, mR, mP, TP, confidence, pred_class, target_class, jdict = \
[], [], [], [], [], [], [], [], []
AP_accum, AP_accum_count = np.zeros(nC), np.zeros(nC)
for batch_i, (imgs, targets, paths, shapes, targets_len) in enumerate(dataloader):
t = time.time()
#seen += batch_size
output = model(imgs.cuda())[-1]
origin_shape = shapes[0]
width = origin_shape[1]
height = origin_shape[0]
inp_height = img_size[1]
inp_width = img_size[0]
c = np.array([width / 2., height / 2.], dtype=np.float32)
s = max(float(inp_width) / float(inp_height) * height, width) * 1.0
meta = {'c': c, 's': s,
'out_height': inp_height // opt.down_ratio,
'out_width': inp_width // opt.down_ratio}
hm = output['hm'].sigmoid_()
wh = output['wh']
reg = output['reg'] if opt.reg_offset else None
opt.K = 200
detections, inds = mot_decode(hm, wh, reg=reg, cat_spec_wh=opt.cat_spec_wh, K=opt.K)
# Compute average precision for each sample
targets = [targets[i][:int(l)] for i, l in enumerate(targets_len)]
for si, labels in enumerate(targets):
seen += 1
#path = paths[si]
#img0 = cv2.imread(path)
dets = detections[si]
dets = dets.unsqueeze(0)
dets = post_process(opt, dets, meta)
dets = merge_outputs(opt, [dets])[1]
#remain_inds = dets[:, 4] > opt.det_thres
#dets = dets[remain_inds]
if dets is None:
# If there are labels but no detections mark as zero AP
if labels.size(0) != 0:
mAPs.append(0), mR.append(0), mP.append(0)
continue
# If no labels add number of detections as incorrect
correct = []
if labels.size(0) == 0:
# correct.extend([0 for _ in range(len(detections))])
mAPs.append(0), mR.append(0), mP.append(0)
continue
else:
target_cls = labels[:, 0]
# Extract target boxes as (x1, y1, x2, y2)
target_boxes = xywh2xyxy(labels[:, 2:6])
target_boxes[:, 0] *= width
target_boxes[:, 2] *= width
target_boxes[:, 1] *= height
target_boxes[:, 3] *= height
'''
path = paths[si]
img0 = cv2.imread(path)
img1 = cv2.imread(path)
for t in range(len(target_boxes)):
x1 = target_boxes[t, 0]
y1 = target_boxes[t, 1]
x2 = target_boxes[t, 2]
y2 = target_boxes[t, 3]
cv2.rectangle(img0, (x1, y1), (x2, y2), (0, 255, 0), 4)
cv2.imwrite('gt.jpg', img0)
for t in range(len(dets)):
x1 = dets[t, 0]
y1 = dets[t, 1]
x2 = dets[t, 2]
y2 = dets[t, 3]
cv2.rectangle(img1, (x1, y1), (x2, y2), (0, 255, 0), 4)
cv2.imwrite('pred.jpg', img1)
abc = ace
'''
detected = []
for *pred_bbox, conf in dets:
obj_pred = 0
pred_bbox = torch.FloatTensor(pred_bbox).view(1, -1)
# Compute iou with target boxes
iou = bbox_iou(pred_bbox, target_boxes, x1y1x2y2=True)[0]
# Extract index of largest overlap
best_i = np.argmax(iou)
# If overlap exceeds threshold and classification is correct mark as correct
if iou[best_i] > iou_thres and obj_pred == labels[best_i, 0] and best_i not in detected:
correct.append(1)
detected.append(best_i)
else:
correct.append(0)
# Compute Average Precision (AP) per class
AP, AP_class, R, P = ap_per_class(tp=correct,
conf=dets[:, 4],
pred_cls=np.zeros_like(dets[:, 4]), # detections[:, 6]
target_cls=target_cls)
# Accumulate AP per class
AP_accum_count += np.bincount(AP_class, minlength=nC)
AP_accum += np.bincount(AP_class, minlength=nC, weights=AP)
# Compute mean AP across all classes in this image, and append to image list
mAPs.append(AP.mean())
mR.append(R.mean())
mP.append(P.mean())
# Means of all images
mean_mAP = np.sum(mAPs) / (AP_accum_count + 1E-16)
mean_R = np.sum(mR) / (AP_accum_count + 1E-16)
mean_P = np.sum(mP) / (AP_accum_count + 1E-16)
if batch_i % print_interval == 0:
# Print image mAP and running mean mAP
print(('%11s%11s' + '%11.3g' * 4 + 's') %
(seen, dataloader.dataset.nF, mean_P, mean_R, mean_mAP, time.time() - t))
# Print mAP per class
print('%11s' * 5 % ('Image', 'Total', 'P', 'R', 'mAP'))
print('AP: %-.4f\n\n' % (AP_accum[0] / (AP_accum_count[0] + 1E-16)))
# Return mAP
return mean_mAP, mean_R, mean_P
if __name__ == '__main__':
os.environ['CUDA_VISIBLE_DEVICES'] = '1'
opt = opts().init()
with torch.no_grad():
map = test_det(opt, batch_size=4)

117
src/test_emb.py Normal file
Просмотреть файл

@ -0,0 +1,117 @@
# ------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation
# Licensed under MIT License
# ------------------------------------------------------------------------------
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import _init_paths
import argparse
import torch
import json
import time
import os
import cv2
import math
from sklearn import metrics
from scipy import interpolate
import numpy as np
from torchvision.transforms import transforms as T
import torch.nn.functional as F
from models.model import create_model, load_model
from datasets.dataset.jde import JointDataset, collate_fn
from models.utils import _tranpose_and_gather_feat
from utils.utils import xywh2xyxy, ap_per_class, bbox_iou
from opts import opts
from models.decode import mot_decode
from utils.post_process import ctdet_post_process
def test_emb(
opt,
batch_size=16,
img_size=(1088, 608),
print_interval=40,
):
data_cfg = opt.data_cfg
f = open(data_cfg)
data_cfg_dict = json.load(f)
f.close()
nC = 1
test_paths = data_cfg_dict['test_emb']
dataset_root = data_cfg_dict['root']
if opt.gpus[0] >= 0:
opt.device = torch.device('cuda')
else:
opt.device = torch.device('cpu')
print('Creating model...')
model = create_model(opt.arch, opt.heads, opt.head_conv)
model = load_model(model, opt.load_model)
# model = torch.nn.DataParallel(model)
model = model.to(opt.device)
model.eval()
# Get dataloader
transforms = T.Compose([T.ToTensor()])
dataset = JointDataset(opt, dataset_root, test_paths, img_size, augment=False, transforms=transforms)
dataloader = torch.utils.data.DataLoader(dataset, batch_size=batch_size, shuffle=False,
num_workers=8, drop_last=False)
embedding, id_labels = [], []
print('Extracting pedestrain features...')
for batch_i, batch in enumerate(dataloader):
t = time.time()
output = model(batch['input'].cuda())[-1]
id_head = _tranpose_and_gather_feat(output['id'], batch['ind'].cuda())
id_head = id_head[batch['reg_mask'].cuda() > 0].contiguous()
emb_scale = math.sqrt(2) * math.log(opt.nID - 1)
id_head = emb_scale * F.normalize(id_head)
id_target = batch['ids'].cuda()[batch['reg_mask'].cuda() > 0]
for i in range(0, id_head.shape[0]):
if len(id_head.shape) == 0:
continue
else:
feat, label = id_head[i], id_target[i].long()
if label != -1:
embedding.append(feat)
id_labels.append(label)
if batch_i % print_interval == 0:
print(
'Extracting {}/{}, # of instances {}, time {:.2f} sec.'.format(batch_i, len(dataloader), len(id_labels),
time.time() - t))
print('Computing pairwise similairity...')
if len(embedding) < 1:
return None
embedding = torch.stack(embedding, dim=0).cuda()
id_labels = torch.LongTensor(id_labels)
n = len(id_labels)
print(n, len(embedding))
assert len(embedding) == n
embedding = F.normalize(embedding, dim=1)
pdist = torch.mm(embedding, embedding.t()).cpu().numpy()
gt = id_labels.expand(n, n).eq(id_labels.expand(n, n).t()).numpy()
up_triangle = np.where(np.triu(pdist) - np.eye(n) * pdist != 0)
pdist = pdist[up_triangle]
gt = gt[up_triangle]
far_levels = [1e-6, 1e-5, 1e-4, 1e-3, 1e-2, 1e-1]
far, tar, threshold = metrics.roc_curve(gt, pdist)
interp = interpolate.interp1d(far, tar)
tar_at_far = [interp(x) for x in far_levels]
for f, fa in enumerate(far_levels):
print('TPR@FAR={:.7f}: {:.4f}'.format(fa, tar_at_far[f]))
return tar_at_far
if __name__ == '__main__':
os.environ['CUDA_VISIBLE_DEVICES'] = '1'
opt = opts().init()
with torch.no_grad():
map = test_emb(opt, batch_size=4)

240
src/track.py Normal file
Просмотреть файл

@ -0,0 +1,240 @@
# ------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation
# Licensed under MIT License
# ------------------------------------------------------------------------------
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import _init_paths
import os
import os.path as osp
import cv2
import logging
import argparse
import motmetrics as mm
import numpy as np
import torch
from tracker.multitracker import JDETracker
from tracking_utils import visualization as vis
from tracking_utils.log import logger
from tracking_utils.timer import Timer
from tracking_utils.evaluation import Evaluator
import datasets.dataset.jde as datasets
from tracking_utils.utils import mkdir_if_missing
from opts import opts
def write_results(filename, results, data_type):
if data_type == 'mot':
save_format = '{frame},{id},{x1},{y1},{w},{h},1,-1,-1,-1\n'
elif data_type == 'kitti':
save_format = '{frame} {id} pedestrian 0 0 -10 {x1} {y1} {x2} {y2} -10 -10 -10 -1000 -1000 -1000 -10\n'
else:
raise ValueError(data_type)
with open(filename, 'w') as f:
for frame_id, tlwhs, track_ids in results:
if data_type == 'kitti':
frame_id -= 1
for tlwh, track_id in zip(tlwhs, track_ids):
if track_id < 0:
continue
x1, y1, w, h = tlwh
x2, y2 = x1 + w, y1 + h
line = save_format.format(frame=frame_id, id=track_id, x1=x1, y1=y1, x2=x2, y2=y2, w=w, h=h)
f.write(line)
logger.info('save results to {}'.format(filename))
def eval_seq(opt, dataloader, data_type, result_filename, save_dir=None, show_image=True, frame_rate=30):
if save_dir:
mkdir_if_missing(save_dir)
tracker = JDETracker(opt, frame_rate=frame_rate)
timer = Timer()
results = []
frame_id = 0
for path, img, img0 in dataloader:
if frame_id % 20 == 0:
logger.info('Processing frame {} ({:.2f} fps)'.format(frame_id, 1. / max(1e-5, timer.average_time)))
# run tracking
timer.tic()
blob = torch.from_numpy(img).cuda().unsqueeze(0)
online_targets = tracker.update(blob, img0)
online_tlwhs = []
online_ids = []
for t in online_targets:
tlwh = t.tlwh
tid = t.track_id
vertical = tlwh[2] / tlwh[3] > 1.6
if tlwh[2] * tlwh[3] > opt.min_box_area and not vertical:
online_tlwhs.append(tlwh)
online_ids.append(tid)
timer.toc()
# save results
results.append((frame_id + 1, online_tlwhs, online_ids))
if show_image or save_dir is not None:
online_im = vis.plot_tracking(img0, online_tlwhs, online_ids, frame_id=frame_id,
fps=1. / timer.average_time)
if show_image:
cv2.imshow('online_im', online_im)
if save_dir is not None:
cv2.imwrite(os.path.join(save_dir, '{:05d}.jpg'.format(frame_id)), online_im)
frame_id += 1
# save results
write_results(result_filename, results, data_type)
return frame_id, timer.average_time, timer.calls
def main(opt, data_root='/data/MOT16/train', det_root=None, seqs=('MOT16-05',), exp_name='demo',
save_images=False, save_videos=False, show_image=True):
logger.setLevel(logging.INFO)
result_root = os.path.join(data_root, '..', 'results', exp_name)
mkdir_if_missing(result_root)
data_type = 'mot'
# run tracking
accs = []
n_frame = 0
timer_avgs, timer_calls = [], []
for seq in seqs:
output_dir = os.path.join(data_root, '..', 'outputs', exp_name, seq) if save_images or save_videos else None
logger.info('start seq: {}'.format(seq))
dataloader = datasets.LoadImages(osp.join(data_root, seq, 'img1'), opt.img_size)
result_filename = os.path.join(result_root, '{}.txt'.format(seq))
meta_info = open(os.path.join(data_root, seq, 'seqinfo.ini')).read()
frame_rate = int(meta_info[meta_info.find('frameRate') + 10:meta_info.find('\nseqLength')])
nf, ta, tc = eval_seq(opt, dataloader, data_type, result_filename,
save_dir=output_dir, show_image=show_image, frame_rate=frame_rate)
n_frame += nf
timer_avgs.append(ta)
timer_calls.append(tc)
# eval
logger.info('Evaluate seq: {}'.format(seq))
evaluator = Evaluator(data_root, seq, data_type)
accs.append(evaluator.eval_file(result_filename))
if save_videos:
output_video_path = osp.join(output_dir, '{}.mp4'.format(seq))
cmd_str = 'ffmpeg -f image2 -i {}/%05d.jpg -c:v copy {}'.format(output_dir, output_video_path)
os.system(cmd_str)
timer_avgs = np.asarray(timer_avgs)
timer_calls = np.asarray(timer_calls)
all_time = np.dot(timer_avgs, timer_calls)
avg_time = all_time / np.sum(timer_calls)
logger.info('Time elapsed: {:.2f} seconds, FPS: {:.2f}'.format(all_time, 1.0 / avg_time))
# get summary
metrics = mm.metrics.motchallenge_metrics
mh = mm.metrics.create()
summary = Evaluator.get_summary(accs, seqs, metrics)
strsummary = mm.io.render_summary(
summary,
formatters=mh.formatters,
namemap=mm.io.motchallenge_metric_names
)
print(strsummary)
Evaluator.save_summary(summary, os.path.join(result_root, 'summary_{}.xlsx'.format(exp_name)))
if __name__ == '__main__':
os.environ['CUDA_VISIBLE_DEVICES'] = '0'
opt = opts().init()
if not opt.val_mot16:
seqs_str = '''KITTI-13
KITTI-17
ADL-Rundle-6
PETS09-S2L1
TUD-Campus
TUD-Stadtmitte'''
data_root = os.path.join(opt.data_dir, 'MOT15/images/train')
else:
seqs_str = '''MOT16-02
MOT16-04
MOT16-05
MOT16-09
MOT16-10
MOT16-11
MOT16-13'''
data_root = os.path.join(opt.data_dir, 'MOT16/train')
if opt.test_mot16:
seqs_str = '''MOT16-01
MOT16-03
MOT16-06
MOT16-07
MOT16-08
MOT16-12
MOT16-14'''
data_root = os.path.join(opt.data_dir, 'MOT16/test')
if opt.test_mot15:
seqs_str = '''ADL-Rundle-1
ADL-Rundle-3
AVG-TownCentre
ETH-Crossing
ETH-Jelmoli
ETH-Linthescher
KITTI-16
KITTI-19
PETS09-S2L2
TUD-Crossing
Venice-1'''
data_root = os.path.join(opt.data_dir, 'MOT15/images/test')
if opt.test_mot17:
seqs_str = '''MOT17-01-SDP
MOT17-03-SDP
MOT17-06-SDP
MOT17-07-SDP
MOT17-08-SDP
MOT17-12-SDP
MOT17-14-SDP'''
data_root = os.path.join(opt.data_dir, 'MOT17/images/test')
if opt.val_mot17:
seqs_str = '''MOT17-02-SDP
MOT17-04-SDP
MOT17-05-SDP
MOT17-09-SDP
MOT17-10-SDP
MOT17-11-SDP
MOT17-13-SDP'''
data_root = os.path.join(opt.data_dir, 'MOT17/images/train')
if opt.val_mot15:
seqs_str = '''KITTI-13
KITTI-17
ETH-Bahnhof
ETH-Sunnyday
PETS09-S2L1
TUD-Campus
TUD-Stadtmitte
ADL-Rundle-6
ADL-Rundle-8
ETH-Pedcross2
TUD-Stadtmitte'''
data_root = os.path.join(opt.data_dir, 'MOT15/images/train')
if opt.val_mot20:
seqs_str = '''MOT20-01
MOT20-02
MOT20-03
MOT20-05
'''
data_root = os.path.join(opt.data_dir, 'MOT20/images/train')
if opt.test_mot20:
seqs_str = '''MOT20-04
MOT20-06
MOT20-07
MOT20-08
'''
data_root = os.path.join(opt.data_dir, 'MOT20/images/test')
seqs = [seq.strip() for seq in seqs_str.split()]
main(opt,
data_root=data_root,
seqs=seqs,
exp_name='MOT15_val_all_dla34',
show_image=False,
save_images=False,
save_videos=False)

101
src/train.py Normal file
Просмотреть файл

@ -0,0 +1,101 @@
# ------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation
# Licensed under MIT License
# ------------------------------------------------------------------------------
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import _init_paths
import os
import json
import torch
import torch.utils.data
from torchvision.transforms import transforms as T
from opts import opts
from models.model import create_model, load_model, save_model
from models.data_parallel import DataParallel
from logger import Logger
from datasets.dataset_factory import get_dataset
from trains.train_factory import train_factory
def main(opt):
torch.manual_seed(opt.seed)
torch.backends.cudnn.benchmark = not opt.not_cuda_benchmark and not opt.test
print('Setting up data...')
Dataset = get_dataset(opt.dataset, opt.task)
f = open(opt.data_cfg)
data_config = json.load(f)
trainset_paths = data_config['train']
dataset_root = data_config['root']
f.close()
transforms = T.Compose([T.ToTensor()])
dataset = Dataset(opt, dataset_root, trainset_paths, (1088, 608), augment=True, transforms=transforms)
opt = opts().update_dataset_info_and_set_heads(opt, dataset)
print(opt)
logger = Logger(opt)
os.environ['CUDA_VISIBLE_DEVICES'] = opt.gpus_str
opt.device = torch.device('cuda' if opt.gpus[0] >= 0 else 'cpu')
print('Creating model...')
model = create_model(opt.arch, opt.heads, opt.head_conv)
optimizer = torch.optim.Adam(model.parameters(), opt.lr)
start_epoch = 0
if opt.load_model != '':
model, optimizer, start_epoch = load_model(
model, opt.load_model, optimizer, opt.resume, opt.lr, opt.lr_step)
# Get dataloader
train_loader = torch.utils.data.DataLoader(
dataset,
batch_size=opt.batch_size,
shuffle=True,
num_workers=opt.num_workers,
pin_memory=True,
drop_last=True
)
print('Starting training...')
Trainer = train_factory[opt.task]
trainer = Trainer(opt, model, optimizer)
trainer.set_device(opt.gpus, opt.chunk_sizes, opt.device)
best = 1e10
for epoch in range(start_epoch + 1, opt.num_epochs + 1):
mark = epoch if opt.save_all else 'last'
log_dict_train, _ = trainer.train(epoch, train_loader)
logger.write('epoch: {} |'.format(epoch))
for k, v in log_dict_train.items():
logger.scalar_summary('train_{}'.format(k), v, epoch)
logger.write('{} {:8f} | '.format(k, v))
if opt.val_intervals > 0 and epoch % opt.val_intervals == 0:
save_model(os.path.join(opt.save_dir, 'model_{}.pth'.format(mark)),
epoch, model, optimizer)
else:
save_model(os.path.join(opt.save_dir, 'model_last.pth'),
epoch, model, optimizer)
logger.write('\n')
if epoch in opt.lr_step:
save_model(os.path.join(opt.save_dir, 'model_{}.pth'.format(epoch)),
epoch, model, optimizer)
lr = opt.lr * (0.1 ** (opt.lr_step.index(epoch) + 1))
print('Drop LR to', lr)
for param_group in optimizer.param_groups:
param_group['lr'] = lr
if epoch % 5 == 0:
save_model(os.path.join(opt.save_dir, 'model_{}.pth'.format(epoch)),
epoch, model, optimizer)
logger.close()
if __name__ == '__main__':
os.environ['CUDA_VISIBLE_DEVICES'] = '0, 1'
opt = opts().parse()
main(opt)