Skip to content

Latest commit

 

History

History
61 lines (42 loc) · 2.49 KB

code_setup.md

File metadata and controls

61 lines (42 loc) · 2.49 KB

Code Setup

Requirement

You need an environment that has python and CUDA installed. For running on Windows, please read the additional notes here.

Installing dependencies

Most of the dependencies can be installed through this command with Conda environment. You might want to change the version for cudatoolkit in environment.yml to match your CUDA version before running it.

conda env create -f environment.yml

The created virtual environment is named sap and you can activate it by

conda activate sap

The next step is to install mmdetection and its compatiable version of mmcv. First, install mmcv:

pip install mmcv==0.2.11

Then clone mmdetection and switch to a specific version. Pick a suitable location (not within this repo) for cloning, and take note of it since you will later need to refer to its model configurations.

git clone https://github.com/open-mmlab/mmdetection.git
cd mmdetection
git checkout 36b6577e3458c0e068f4523d60ce8c6e7c19febf

Install mmdetection within the sap environment:

pip install -e .

This step will compile some CUDA and C++ files and might take some time.

Prepare detection models

Download the pretrained model weights from mmdetection's model zoo. Please use the link above to access the right version of the model zoo to avoid any compatibility issues.

Note that Argoverse-HD is annotated according to COCO's format and class definitions. Therefore, it's reasonable to directly test out COCO pretrained models on Argoverse-HD.

(Optionally) Compile the tracking association module

If you plan to use tracking or forecasting, you need to compile the IoU based association function. Change the directory back to this repo's root directory and run:

python setup.py build_ext --inplace

Modify paths and run the scripts

The entry-point scripts for different tasks can be found under exp/. You need to modify the paths for the dataset, model configuration and weights, and the output folder before running them. Note that those scripts should be run from the root directory of this repo. For more information on these scripts, check out

Setup verification

If you have set up correctly, running exp/offline_det.sh should be able to get you an AP of 19.4:

Average Precision  (AP) @[ IoU=0.50:0.95 | area=   all | maxDets=100 ] = 0.194