Detectron 2 on Windows 10

username: Heisenberg_082001
cooked: <p>Is their any way to install  detectron 2 on windows ?</p>

username: ptrblck
cooked: <p>Based on this information from the <a href="https://github.com/facebookresearch/detectron2/blob/master/INSTALL.md">repository</a>:</p>
<blockquote>
<p>Although detectron2 can be installed on windows with some effort (similar to <a href="https://github.com/facebookresearch/pytorch3d/blob/master/INSTALL.md#2-install-from-a-local-clone">these</a>), we do not provide official support for it.<br>
PRs that improves code compatibility on windows are welcome.</p>
</blockquote>
<p>it doesn’t seem that Windows is supported out of the box.</p>

username: RujunLong
cooked: <p>FYI.<br>
Maybe…you can try with the following steps.</p>
<p><span class="hashtag-raw">#1</span>.set system environment variables</p>
<p>SET DISTUTILS_USE_SDK=1</p>
<p>call “D:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Auxiliary\Build\vcvars64.bat”</p>
<p><span class="hashtag-raw">#2</span>.make from source<br>
git clone <a href="https://github.com/facebookresearch/detectron2.git" class="inline-onebox" rel="noopener nofollow ugc">GitHub - facebookresearch/detectron2: Detectron2 is a platform for object detection, segmentation and other visual recognition tasks.</a></p>
<p>cd detectron2</p>
<p>python setup.py build develop</p>
<p>d:_DL\detectron2&gt;python<br>
Python 3.8.10 (tags/v3.8.10:3d8993a, May  3 2021, 11:48:03) [MSC v.1928 64 bit (AMD64)] on win32<br>
Type “help”, “copyright”, “credits” or “license” for more information.</p>
<blockquote>
<blockquote>
<blockquote>
<p>import detectron2<br>
detectron2.<strong>version</strong><br>
‘0.4.1’</p>
</blockquote>
</blockquote>
</blockquote>
<p><span class="hashtag-raw">#3</span>.</p>
<p>D:_DL\detectron2&gt;wget -nc -q <a href="https://github.com/facebookresearch/detectron2/raw/master/detectron2/utils/collect_env.py" rel="noopener nofollow ugc">https://github.com/facebookresearch/detectron2/raw/master/detectron2/utils/collect_env.py</a> &amp;&amp; python collect_env.py</p>
<hr>
<p>sys.platform            win32<br>
Python                  3.8.10 (tags/v3.8.10:3d8993a, May  3 2021, 11:48:03) [MSC v.1928 64 bit (AMD64)]<br>
numpy                   1.19.2<br>
detectron2              0.4.1 <span class="mention">@D</span>:_DL\detectron2\detectron2<br>
Compiler                MSVC 192930038<br>
CUDA compiler           CUDA 11.0<br>
detectron2 arch flags   D:_DL\detectron2\detectron2_C.cp38-win_amd64.pyd; cannot find cuobjdump<br>
DETECTRON2_ENV_MODULE   <br>
PyTorch                 1.9.0+cu111 <span class="mention">@D</span>:\Program Files (x86)\Python\Python38\lib\site-packages\torch<br>
PyTorch debug build     False<br>
GPU available           True<br>
GPU 0                   Quadro T2000 with Max-Q Design (arch=7.5)<br>
CUDA_HOME               D:\Program Files (x86)\NVIDIA GPU Computing Toolkit\CUDA\v11.0<br>
Pillow                  8.2.0<br>
torchvision             0.10.0+cu111 <span class="mention">@D</span>:\Program Files (x86)\Python\Python38\lib\site-packages\torchvision<br>
torchvision arch flags  D:\Program Files (x86)\Python\Python38\lib\site-packages\torchvision_C.pyd; cannot find cuobjdump<br>
fvcore                  0.1.5.post20210630<br>
iopath                  0.1.8<br>
cv2                     4.5.2</p>
<hr>
<p>PyTorch built with:</p>
<ul>
<li>C++ Version: 199711</li>
<li>MSVC 192829337</li>
<li>Intel(R) Math Kernel Library Version 2020.0.2 Product Build 20200624 for Intel(R) 64 architecture applications</li>
<li>Intel(R) MKL-DNN v2.1.2 (Git Hash 98be7e8afa711dc9b66c8ff3504129cb82013cdb)</li>
<li>OpenMP 2019</li>
<li>CPU capability usage: AVX2</li>
<li>CUDA Runtime 11.1</li>
<li>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</li>
<li>CuDNN 8.0.5</li>
<li>Magma 2.5.4</li>
<li>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,</li>
</ul>