Released code for Objects are Different: Flexible Monocular 3D Object Detection, CVPR21
This repo is tested with Ubuntu 20.04, python=3.7, pytorch=1.4.0, cuda=10.1
conda create -n monoflex python=3.7
conda activate monoflex
Install PyTorch and other dependencies:
conda install pytorch==1.4.0 torchvision==0.5.0 cudatoolkit=10.1 -c pytorch
pip install -r requirements.txt
Build DCNv2 and the project
cd models/backbone/DCNv2
. make.sh
cd ../../..
python setup develop
Please download KITTI dataset and organize the data as follows:
#ROOT
|data/
|KITTI/
|ImageSets/ [already provided in this repo]
|object/
|training/
|calib/
|image_2/
|label/
|testing/
|calib/
|image_2/
Move to the workplace and train the network:
CUDA_VISIBLE_DEVICES=0 python tools/plain_train_net.py --batch_size 8 --config runs/monoflex.yaml --output output/exp
The model will be evaluated every two epochs during training and you can also evaluate a checkpoint with
CUDA_VISIBLE_DEVICES=0 python tools/plain_train_net.py --config runs/monoflex.yaml --ckpt YOUR_CKPT --eval
The code is heavily borrowed from SMOKE and thanks their contribution.