Detectron 2 on Windows 10

Is their any way to install detectron 2 on windows ?

Based on this information from the repository:

Although detectron2 can be installed on windows with some effort (similar to these), we do not provide official support for it.
PRs that improves code compatibility on windows are welcome.

it doesn’t seem that Windows is supported out of the box.

FYI.
Maybe…you can try with the following steps.

#1.set system environment variables

SET DISTUTILS_USE_SDK=1

call “D:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Auxiliary\Build\vcvars64.bat”

#2.make from source
git clone GitHub - facebookresearch/detectron2: Detectron2 is FAIR's next-generation platform for object detection, segmentation and other visual recognition tasks.

cd detectron2

python setup.py build develop

d:_DL\detectron2>python
Python 3.8.10 (tags/v3.8.10:3d8993a, May 3 2021, 11:48:03) [MSC v.1928 64 bit (AMD64)] on win32
Type “help”, “copyright”, “credits” or “license” for more information.

import detectron2
detectron2.version
‘0.4.1’

#3.

D:_DL\detectron2>wget -nc -q https://github.com/facebookresearch/detectron2/raw/master/detectron2/utils/collect_env.py && python collect_env.py


sys.platform win32
Python 3.8.10 (tags/v3.8.10:3d8993a, May 3 2021, 11:48:03) [MSC v.1928 64 bit (AMD64)]
numpy 1.19.2
detectron2 0.4.1 @D:_DL\detectron2\detectron2
Compiler MSVC 192930038
CUDA compiler CUDA 11.0
detectron2 arch flags D:_DL\detectron2\detectron2_C.cp38-win_amd64.pyd; cannot find cuobjdump
DETECTRON2_ENV_MODULE
PyTorch 1.9.0+cu111 @D:\Program Files (x86)\Python\Python38\lib\site-packages\torch
PyTorch debug build False
GPU available True
GPU 0 Quadro T2000 with Max-Q Design (arch=7.5)
CUDA_HOME D:\Program Files (x86)\NVIDIA GPU Computing Toolkit\CUDA\v11.0
Pillow 8.2.0
torchvision 0.10.0+cu111 @D:\Program Files (x86)\Python\Python38\lib\site-packages\torchvision
torchvision arch flags D:\Program Files (x86)\Python\Python38\lib\site-packages\torchvision_C.pyd; cannot find cuobjdump
fvcore 0.1.5.post20210630
iopath 0.1.8
cv2 4.5.2


PyTorch built with:

  • C++ Version: 199711
  • MSVC 192829337
  • Intel(R) Math Kernel Library Version 2020.0.2 Product Build 20200624 for Intel(R) 64 architecture applications
  • Intel(R) MKL-DNN v2.1.2 (Git Hash 98be7e8afa711dc9b66c8ff3504129cb82013cdb)
  • OpenMP 2019
  • CPU capability usage: AVX2
  • CUDA Runtime 11.1
  • NVCC architecture flags: -gencode;arch=compute_37,code=sm_37;-gencode;arch=compute_50,code=sm_50;-gencode;arch=compute_60,code=sm_60;-gencode;arch=compute_61,code=sm_61;-gencode;arch=compute_70,code=sm_70;-gencode;arch=compute_75,code=sm_75;-gencode;arch=compute_80,code=sm_80;-gencode;arch=compute_86,code=sm_86;-gencode;arch=compute_37,code=compute_37
  • CuDNN 8.0.5
  • Magma 2.5.4
  • Build settings: BLAS_INFO=mkl, BUILD_TYPE=Release, CUDA_VERSION=11.1, CUDNN_VERSION=8.0.5, CXX_COMPILER=C:/w/b/windows/tmp_bin/sccache-cl.exe, CXX_FLAGS=/DWIN32 /D_WINDOWS /GR /EHsc /w /bigobj -DUSE_PTHREADPOOL -openmp:experimental -IC:/w/b/windows/mkl/include -DNDEBUG -DUSE_KINETO -DLIBKINETO_NOCUPTI -DUSE_FBGEMM -DUSE_XNNPACK -DSYMBOLICATE_MOBILE_DEBUG_HANDLE, LAPACK_INFO=mkl, PERF_WITH_AVX=1, PERF_WITH_AVX2=1, PERF_WITH_AVX512=1, TORCH_VERSION=1.9.0, USE_CUDA=ON, USE_CUDNN=ON, USE_EXCEPTION_PTR=1, USE_GFLAGS=OFF, USE_GLOG=OFF, USE_MKL=ON, USE_MKLDNN=ON, USE_MPI=OFF, USE_NCCL=OFF, USE_NNPACK=OFF, USE_OPENMP=ON,