Download anaconda 64-bit and install it
Open anaconda prompt and type script
conda create --name detectron2 python=3.7Y
install related packages
conda activate detectron2
use detectron2 env.
Download from PyPi and unzip
https://files.pythonhosted.org/packages/5c/82/bcaf4d21d7027fe5165b88e3aef1910a36ed02c3e99d3385d1322ea0ba29/pycocotools-2.0.1.tar.gz
- Unzip twice
- Enter pycocotools-2.0.1 folder and open setup.py
- Replace
extra_compile_args=['-Wno-cpp', '-Wno-unused-function', '-std=c99’], with extra_compile_args={'gcc': ['/Qstd=c99']}, - Save file
Anaconda prompt script
cd C:\Users\chase\Downloads\dist\pycocotools-2.0.1python 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.1
cd ..
RMDIR /S pycocotools-2.0.1
Install PyTorch and torchvision
conda install pytorch torchvision cudatoolkit=10.1 -c pytorchY
Install detectron2 from git
cd c:\mkdir detectroncd detectrongit clone https://github.com/ivanpp/detectron2.git
Must install git windows
cd detectron2
pip install -e .
python -m detectron2.utils.collect_env
Check the installation
留言
張貼留言