Windows環境安裝Detectron2(Install detectron2 in windows)
Download anaconda 64-bit and install it
Open anaconda prompt and type script
conda create --name detectron2 python=3.7
Y
install related packagesconda activate detectron2
use detectron2 env.
Download from PyPi and unzip
- Unzip twice
- Enter pycocotools-2.0.1 folder and open setup.py
- Replace
extra_compile_args=['-Wno-cpp', '-Wno-unused-function', '-std=c99’],
withextra_compile_args={'gcc': ['/Qstd=c99']},
- Save file
Anaconda prompt script
cd C:\Users\chase\Downloads\dist\pycocotools-2.0.1
python setup.py build_ext install
Must required install Visual Studio Build Tools
If it works, you should see the info Finished processing dependencies for pycocotools==2.0.1cd ..
RMDIR /S pycocotools-2.0.1
Install PyTorch and torchvision
conda install pytorch torchvision cudatoolkit=10.1 -c pytorch
Y
Install detectron2 from git
cd c:\
mkdir detectron
cd detectron
git clone https://github.com/ivanpp/detectron2.git
Must install git windowscd detectron2
pip install -e .
python -m detectron2.utils.collect_env
Check the installation
留言
張貼留言