<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by DGMaxime on Medium]]></title>
        <description><![CDATA[Stories by DGMaxime on Medium]]></description>
        <link>https://medium.com/@dgmaxime?source=rss-b26c47b2e12d------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*JvdcqwXEREypc-F-PeL9HA.jpeg</url>
            <title>Stories by DGMaxime on Medium</title>
            <link>https://medium.com/@dgmaxime?source=rss-b26c47b2e12d------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Mon, 30 Nov 2026 09:49:55 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@dgmaxime/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[How to easily install Detectron2 on Windows 10 ?]]></title>
            <link>https://dgmaxime.medium.com/how-to-easily-install-detectron2-on-windows-10-39186139101c?source=rss-b26c47b2e12d------2</link>
            <guid isPermaLink="false">https://medium.com/p/39186139101c</guid>
            <category><![CDATA[detectron2]]></category>
            <category><![CDATA[python]]></category>
            <category><![CDATA[pytorch]]></category>
            <category><![CDATA[windows-10]]></category>
            <dc:creator><![CDATA[DGMaxime]]></dc:creator>
            <pubDate>Sun, 16 Aug 2020 15:26:28 GMT</pubDate>
            <atom:updated>2021-01-17T19:33:36.722Z</atom:updated>
            <content:encoded><![CDATA[<h3>How to easily install Detectron2 on Windows 10 ?</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Yk_O4e_5WECTI5BsYGS5eA.png" /></figure><p>Installing Detectron2 on Windows is no easy task because the official version of Detectron2 is officially not supported on this platform, and the Windows Subsystem for Linux does not have access to the machine’s GPU. By following the next steps, you can quickly install and use the latest version of Detectron2, which works perfectly.</p><h3>Step 1 : Create a conda environment</h3><p>This step is not necessary. You can create a empty environment to test detectron2 using the two command lines described below: <a href="https://docs.conda.io/projects/conda/en/latest/user-guide/tasks/manage-environments.html#creating-an-environment-with-commands">https://docs.conda.io/projects/conda/en/latest/user-guide/tasks/manage-environments.html#creating-an-environment-with-commands</a></p><pre>conda create -n myenv python=3.7<br>conda activate myenv</pre><p>Replace myenv by the name of your env.</p><h3>Step 2 : Install Cuda</h3><p>Go to the official site of Nvidia and download the cuda Tookit executable. I recommend Cuda 10.1 which can used with torch versions 1.6, 1.5 and 1.4.<br><a href="https://developer.nvidia.com/cuda-10.1-download-archive-base">https://developer.nvidia.com/cuda-10.1-download-archive-base</a></p><p>Then, install the Cuda Toolkit like any program.</p><h3>Step 3 : Install Torch</h3><p>Go to <a href="https://pytorch.org/get-started/locally/">https://pytorch.org/get-started/locally/</a> and select <strong>PyTorch 1.6</strong>. PyTorch 1.7 and later doesn’t work. If you have installed <strong>cuda 10.1 or later</strong>, the command should be:</p><pre>conda install pytorch==1.6.0 torchvision==0.7.0 cudatoolkit=10.1 -c pytorch</pre><p><strong>N.B.</strong>: PyTorch 1.6 doesn’t support cudatoolkit=11. But if you have installed CUDA 11.x, cudatoolkit=10.1 still works fine.</p><h3>Step 4 : Install Cython and Pycocotools</h3><p>Before installing Pycocotools, you need Cython.</p><pre>pip install cython</pre><p>Then use the following repository, which works well with Windows to install Pycocotools.</p><pre>pip install &quot;git+<a href="https://github.com/philferriere/cocoapi.git#egg=pycocotools&amp;subdirectory=PythonAPI">https://github.com/philferriere/cocoapi.git#egg=pycocotools&amp;subdirectory=PythonAPI</a>&quot;</pre><h3>Step 5 : Install Detectron2</h3><p>Now, you are ready to install Detectron2. Clone the following repository of Detectron2.</p><pre>git clone <a href="https://github.com/DGMaxime/detectron2-windows.git">https://github.com/DGMaxime/detectron2-windows.git</a></pre><p>This repository has been prepared to work with Windows. Some files has been modified. You can find these files here:</p><p><a href="https://github.com/DGMaxime/detectron2-windows/commit/bba8bdf94712a40eaa778f6690a96957f3c2b08b">setup.py</a><br>detectron2/engine/<a href="https://github.com/DGMaxime/detectron2-windows/commit/6e44cd3bfc6aedfcdc2503688645560574ea5161#diff-4b8916cd63bf8a88e9cb258a8a522062">defaults.py</a><br>detectron2/layers/csrc/cocoeval/<a href="https://github.com/DGMaxime/detectron2-windows/commit/8ebfeee941912c5545fffbeea04b38dd5608548e">cocoeval.cpp</a></p><p>Once the cloning is complete, install it.</p><pre>cd detectron2-windows<br>pip install -e .</pre><p>If the installation was successful, you should see the message “Successfully installed detectron2”.</p><h3>Step 6: Test the installation of Detectron2</h3><p>In the same repository, there is a test file in the <em>tests </em>folder. Run the file named <em>test_windows_install.py</em>. You must first install opencv to perform the test.</p><pre>pip install opencv-python<br>python tests/test_windows_install.py</pre><p>The result:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/640/1*XX_RAqg5oqR_d4wEZ0n9EA.jpeg" /><figcaption>Image Flickr : <a href="https://www.flickr.com/photos/amarynth/">Michael J. Belgie, Sr</a></figcaption></figure><p>Hope this story helps you !</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=39186139101c" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>