Windows環境安裝Detectron2(Install detectron2 in windows)

 

Download anaconda 64-bit and install it

Open anaconda prompt and type script

  1. conda create --name detectron2 python=3.7
  2. Y
    install related packages

  3. 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

  1. Unzip twice
  2. Enter pycocotools-2.0.1 folder and open setup.py
  3. Replace extra_compile_args=['-Wno-cpp', '-Wno-unused-function', '-std=c99’], with extra_compile_args={'gcc': ['/Qstd=c99']},
  4. Save file

Anaconda prompt script

  1. cd C:\Users\chase\Downloads\dist\pycocotools-2.0.1
  2. 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.1

  3. cd ..

  4. RMDIR /S pycocotools-2.0.1

Install PyTorch and torchvision

  1. conda install pytorch torchvision cudatoolkit=10.1 -c pytorch
  2. Y

Install detectron2 from git

  1. cd c:\
  2. mkdir detectron
  3. cd detectron
  4. git clone https://github.com/ivanpp/detectron2.git
    Must install git windows

  5. cd detectron2

  6. pip install -e .

  7. python -m detectron2.utils.collect_env
    Check the installation









留言

這個網誌中的熱門文章

Python-相關係數矩陣實作(python-correlation matrix )

ASP.NET-後端將值傳給javascript

ASP.NET-FileUpload上傳後自動觸發button click(FileUpload upload auto trigger button click)