The Installation step is referenced from CenterNet.
Our experimental environment:
Ubuntu 18.04, Python 3.6.9, PyTorch 1.4, torchvision 0.5.0.
8 NVIDIA 2080ti cuda10.0
-
Create a new conda environment and activate the environment.
conda create --name MOC python=3.6 conda activate MOC
-
Install pytorch1.4:
pip install in pytorch.org. - or you can use conda.
Disable cudnn batch normalization(follow CenterNet).
For other pytorch version, you can manually open
torch/nn/functional.py
and find the line withtorch.batch_norm
and replace thetorch.backends.cudnn.enabled
withFalse
. -
Clone this repo:
git clone https://github.com/NEUdeep/MOC-Detector-Pytorch1.4
-
Install the requirements
pip install -r requirments.txt -i https://mirrors.aliyun.com/pypi/simple
-
Compile deformable convolutional in DLA backbone follow CenterNet.
cd ${MOC_ROOT}/src/network/DCNv2 python setup.py build develop - or you must check with https://github.com/CharlesShang/DCNv2.git to make sure that is for you.
-
If you have any problems, please check in CenterNet.