# detectron2 **Repository Path**: noticeable/detectron2 ## Basic Information - **Project Name**: detectron2 - **Description**: detectron2 windows build - **Primary Language**: Unknown - **License**: Apache-2.0 - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 1 - **Created**: 2020-12-02 - **Last Updated**: 2020-12-19 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README ### Requirements - Python >= 3.6(Conda) - PyTorch 1.3 - [torchvision](https://github.com/pytorch/vision/) that matches the PyTorch installation. You can install them together at [pytorch.org](https://pytorch.org) to make sure of this. - OpenCV, needed by demo and visualization - [fvcore](https://github.com/facebookresearch/fvcore/): `pip install git+https://github.com/facebookresearch/fvcore` - pycocotools: `pip install cython; pip install git+https://github.com/philferriere/cocoapi.git#subdirectory=PythonAPI` - VS2019(no test in older version)/CUDA10.1(no test in older version) ### several files must be changed by manually. ``` file1: {your evn path}\Lib\site-packages\torch\include\torch\csrc\jit\argument_spec.h example: {C:\Miniconda3\envs\py36}\Lib\site-packages\torch\include\torch\csrc\jit\argument_spec.h(190) static constexpr size_t DEPTH_LIMIT = 128; change to --> static const size_t DEPTH_LIMIT = 128; file2: {your evn path}\Lib\site-packages\torch\include\pybind11\cast.h example: {C:\Miniconda3\envs\py36}\Lib\site-packages\torch\include\pybind11\cast.h(1449) explicit operator type&() { return *(this->value); } change to --> explicit operator type&() { return *((type*)this->value); } ``` ### Build detectron2 After having the above dependencies, run: ``` conda activate {your env} "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Auxiliary\Build\vcvars64.bat" git clone https://github.com/conansherry/detectron2 cd detectron2 python setup.py build develop ``` Note: you may need to rebuild detectron2 after reinstalling a different build of PyTorch.