Skip to content

About

No description, website, or topics provided.

Resources

Stars

2 stars

Watchers

1 watching

Forks

Latest commit

 

History

8 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Detectron2 installation on Windows

After Several days of confusion in installing Detectron2 on windows, I finally installed it. So here I've decided to show you the path that I went through.

🛠 Pycocotools

pycocotools is a Python API that assists in loading, parsing and visualizing the annotations in COCO.

but berfore installing pycocotools, first you should install Visual Studio Build Tools 2019 (vs_BuildTools.exe)

Follow the instructions that is presented in image below Follow the instruction

To install pycocotools, the recommended command is:

    pip install pycocotools

🛠 Installation

First , the Detectron2 repository must be downloaded from here or simply use:

    git clone https://github.com/facebookresearch/detectron2.git

Next, changes must be made in 5 files which their names are in following paths:

  • local_path/detectron2/utils/collect_env.py
  • local_path/detectron2/engine/defaults.py
  • local_path/detectron2/evaluation/evaluator.py
  • local_path/detectron2/layers/csrc/cocoeval/cocoeval.cpp
  • local_path/detectron2/layers/csrc/nms_rotated/nms_rotated_cuda.cu Please replace the modified files in this repo with yours.

Use this command to install Detectron2

    cd detectron2
    pip install -e .
  • Check the installation:
    python -m detectron2.utils.collect_env

The result should be like this: Follow the instruction

🛠 Correct unix paths

There is one more thing to do. we should refine unix paths which are / to windows \, we

  • step1 :

download iopath:

git clone https://github.com/facebookresearch/iopath --single-branch --branch v0.1.8
  • step 2:

open iopath/iopath/common/file_io.py file, in class HTTPURLHandler and it's _get_local_path method, in line 753 replace:

filename = path.split("/")[-1]

with:

filename = parsed_url.path.split("/")[-1]

  • step 3 :

Open a terminal with administrator premission, go to your local iopath repository and run following command:

pip install -e iopath

Hope you can use these instructions to easily install Detectron2. To get more information, follow the links.

Links

Authors

About

No description, website, or topics provided.

Resources

Stars

2 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages