- Zero-VIRUS*: Zero-shot VehIcle Route Understanding System for Intelligent Transportation (CVPR 2020 AI City Challenge Track 1)
- youtube
- ubuntu 18.04
- python >= 3.6
- cuda 10.2
-
clone source codes
$ git clone https://github.com/dyh/unbox_Lijun-Yu_zero_virus.git
-
enter project directory
$ cd unbox_Lijun-Yu_zero_virus
-
create a python virtual environment
$ python3 -m venv venv
-
activate the virtual environment
$ source venv/bin/activate
-
upgrade pip
$ python -m pip install --upgrade pip
-
install requirements package
-
install other packages
$ pip install -r requirements.txt
-
install detectron2 (based on cuda 10.2 and pytorch 1.5.1)
and you could choose other version at here
$ python -m pip install https://dl.fbaipublicfiles.com/detectron2/wheels/cu102/torch1.5/detectron2-0.2.1%2Bcu102-cp36-cp36m-linux_x86_64.whl
-
-
detect the "./unbox_test/input/MVI_40855.mp4" video file of this project
$ python unbox.py
-
the output results are saved in "./unbox_test/output" directory for some image files
0.png, 1.png, 2.png ... n.png
-
you can use ffmpeg to merge these images into one video file
$ ffmpeg -f image2 -i ./unbox_test/output/%d.png ./unbox_test/output.mp4
- the test video MVI_40855.mp4 is made up of images in the directory "MVI_40855" in the DETRAC-test-data.zip file.
- download dataset: http://detrac-db.rit.albany.edu/download
- introduction of dataset: http://smart-city-sjsu.net/AICityChallenge/data.html
- 用于智能交通的 Zero-shot 车辆路线理解系统
- Zero-VIRUS*: Zero-shot VehIcle Route Understanding System for Intelligent Transportation (CVPR 2020 AI City Challenge Track 1)
- bilibili
- ubuntu 18.04
- python >= 3.6
- cuda 10.2
-
下载代码
$ git clone https://github.com/dyh/unbox_Lijun-Yu_zero_virus.git
-
进入目录
$ cd unbox_Lijun-Yu_zero_virus
-
创建python虚拟环境
$ python3 -m venv venv
-
激活虚拟环境
$ source venv/bin/activate
-
升级pip
$ python -m pip install --upgrade pip
-
安装软件包
-
安装其他包
$ pip install -r requirements.txt
-
安装 detectron2 (基于 cuda 10.2 和 pytorch 1.5.1)
你也可以在 这里 选择其他版本
$ python -m pip install https://dl.fbaipublicfiles.com/detectron2/wheels/cu102/torch1.5/detectron2-0.2.1%2Bcu102-cp36-cp36m-linux_x86_64.whl
-
-
对项目中的 ./unbox_test/input/MVI_40855.mp4 视频文件进行检测
$ python unbox.py
-
输出结果为图片文件,保存在 ./unbox_test/output 目录
0.png, 1.png, 2.png ... n.png
-
可以使用 ffmpeg 将图片文件合并为视频文件
$ ffmpeg -f image2 -i ./unbox_test/output/%d.png ./unbox_test/output.mp4
- 测试视频 MVI_40855.mp4 是由 DETRAC-test-data.zip 文件中的 MVI_40855 目录下图片组成。
- 数据集下载 http://detrac-db.rit.albany.edu/download
- 数据集说明 http://smart-city-sjsu.net/AICityChallenge/data.html
Zero-VIRUS*: Zero-shot VehIcle Route Understanding System for Intelligent Transportation (CVPR 2020 AI City Challenge Track 1)
Authors: Lijun Yu, Qianyu Feng, Yijun Qian, Wenhe Liu, Alexander G. Hauptmann
Email: lijun@lj-y.com
*Written in the era of Coronavirus Disease 2019 (COVID-19), with a sincere hope for a better world.
@inproceedings{yu2020zero,
title={Zero-VIRUS: Zero-shot VehIcle Route Understanding System for Intelligent Transportation},
author={Yu, Lijun and Feng, Qianyu and Qian, Yijun and Liu, Wenhe and Hauptmann, Alexander G.},
booktitle={Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition Workshops},
year={2020}
}
Install miniconda, then create the environment and activate it via
conda env create -f environment.yml
conda activate zero_virus
Directory structure:
- datasets
- Dataset_A (
AIC20_track1_vehicle_counting.zip/Dataset_A
) - Dataset_B (hidden evaluation)
- Dataset_A (
- experiments
- efficiency
- aic2020-base.json
<experiment_name>
- output.txt
- efficiency
As a zero-shot system, no training is required. We use Mask R-CNN pretrained on COCO from detectron2 as detector, whose weights will be downloaded automatically at the first run.
As the dataset only provided screenshots of the pre-defined routes, we created our own annotation of them with labelme.
To get system outputs, run
./evaluate.sh <experiment_name> <dataset_split>
# For example
./evaluate.sh submission Dataset_A
To get efficiency base score, run
python utils/efficiency_base.py
On Dataset A with 8 V100 GPUs:
- S1: 0.9328
- S1_Effectiveness: 0.9120
- mwRMSE: 4.2738
- S1_Efficiency: 0.9815
- time: 3084.04
- baseline: 0.546801
- S1_Effectiveness: 0.9120
Visualizations available at Google Drive.
See LICENSE. Please read before use.