Please refer this Website to see which cuda version you can choose.
[recommended] Ubuntu-20.04 or Ubuntu-18.04.
If you are using the Windows System, the best way to use Linux system is Install Linux on Windows with WSL
update apt
sudo apt update
install gcc and g++
sudo apt install gcc g++
Download Miniconda
wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh
Install Miniconda
sh Miniconda3-latest-Linux-x86_64.sh
restart terminal session
source .bashrc
Recommend python version 3.7 or 3.6, pytorch version > 1.7 for example:
conda create -n CircleNet python=3.7
activate the environment
conda activate CircleNet
install Pytorch 1.11 and cudatoolkit 11.3
conda install pytorch==1.11.0 torchvision==0.12.0 torchaudio==0.11.0 cudatoolkit=11.3 -c pytorch
install Cython and pycocotools
pip install cython pycocotools
clone this repo
git clone https://github.com/hrlblab/CircleNet.git
install requirements
cd CircleNet
pip install -r requirements.txt
Install COCOAPI:
COCOAPI=/path/to/clone/cocoapi
git clone https://github.com/cocodataset/cocoapi.git
cd $COCOAPI/PythonAPI
make
python setup.py install --user
Compile deformable convolutional (from DCNv2)
cd $CircleNet_ROOT/src/lib/models/networks/
rm -rf DCNv2/
git clone -b <branch_name> https://github.com/lbin/DCNv2.git # for pytorch 1.11 is: git clone -b pytorch_1.11 https://github.com/lbin/DCNv2.git
cd DCNv2
./make.sh
cd $CircleNet_ROOT/src/lib/external
make
There are still some steps need to do
-
install some packages
sudo apt update pip install openslide-python sudo apt install python3-openslide or python-openslide
if failed to install python-openslide, please tyoe
sudo nano /etc/apt/sources.list
and adddeb http://dk.archive.ubuntu.com/ubuntu/ bionic main universe
to the file. Then usesudo apt update
andsudo apt install python-openslide
-
if you meet the problem about PIL please install Pillow==6.2
pip install Pillow==6.2
-
if you meet the problem about
libffi.so.7
please addexport LD_PRELOAD=/usr/lib/x86_64-linux-gnu/libffi.so.7
to your.bashrc
file
-
If you meet the
fatal: unable to access 'https://github.com/hrlblab/CircleNet.git/': Could not resolve host: github.com
problem to clone the github repo, please use following command to change DNS.echo "nameserver 8.8.8.8" | sudo tee /etc/resolv.conf > /dev/null
-
if it showed
cant find mkl-service
, please use following command to install mkl-serviceconda install -c intel mkl-service