The code was tested on Ubuntu 18.04 with Cuda 10.0, Anaconda Python 3.7 and PyTorch v1.4.0. NVIDIA GPUs are needed for both training and testing. After installing Anaconda:
-
[Optional but recommended] create a new conda environment.
conda create --name HoughNet python=3.7
And activate the environment.
conda activate HoughNet
-
Clone the repo:
HoughNet_ROOT=/path/to/clone/HoughNet git clone https://github.com/nerminsamet/HoughNet $HoughNet_ROOT
-
Install PyTorch 1.4.0:
conda install pytorch torchvision cudatoolkit=10.0 -c pytorch
-
Install the requirements:
pip install -r requirements.txt
-
Install Detectron for instance segmentation task:
python -m pip install detectron2==0.2.1 -f https://dl.fbaipublicfiles.com/detectron2/wheels/cu100/torch1.4/index.html
-
Compile DCNv2 (Deformable Convolutional Networks):
cd $HoughNet_ROOT/src/lib/models/networks/DCNv2 ./make.sh
-
[Optional, only required if you are using multi-scale testing]. Compile NMS if you want to use multi-scale testing.
cd $HoughNet_ROOT/src/lib/external make
-
Download pretrained models and place them under
$HoughNet_ROOT/models/
. You could find more information about models in model zoo.