Skip to content

Latest commit

 

History

History
64 lines (43 loc) · 1.91 KB

INSTALL.md

File metadata and controls

64 lines (43 loc) · 1.91 KB

Installation

The code was tested on Ubuntu 18.04, with Anaconda Python 3.6 and PyTorch v1.1 with CUDA 10.0. NVIDIA GPUs are needed for both training and testing. After install Anaconda:

  1. [Optional but recommended] create a new conda environment.

    conda create --name CenterNet python=3.6
    

    And activate the environment.

    conda activate CenterNet
    
  2. Install pytorch1.1:

    conda install pytorch=1.1 torchvision cuda100 -c pytorch
    

    And disable cudnn batch normalization(Due to this issue).

    For other pytorch version, you can manually open torch/nn/functional.py and find the line with torch.batch_norm and replace the torch.backends.cudnn.enabled with False. We observed slight worse training results without doing so.

  3. Install [COCOAPI]:

    pip install pycocotools
    
  4. Clone this repo:

    CenterNet_ROOT=/path/to/clone/CenterNet
    git clone https://github.com/xingyizhou/CenterNet $CenterNet_ROOT
    
  5. Install the requirements

    pip install -r requirements.txt
    
  6. Compile deformable convolutional (from DCNv2).

    cd $CenterNet_ROOT/src/lib/models/networks/DCNv2
    conda install conda
    conda install -c conda-forge cudatoolkit-dev=10.0
    python setup.py build develop
    
  7. [Optional, only required if you are using extremenet or multi-scale testing] Compile NMS if your want to use multi-scale testing or test ExtremeNet.

    cd $CenterNet_ROOT/src/lib/external
    python setup.py build_ext --inplace
    
  8. Download pertained models for detection or pose estimation and move them to $CenterNet_ROOT/models/. More models can be found in Model zoo.