From 6b29727dc6b25a5214e8a59a2ce9a55dd51cf97a Mon Sep 17 00:00:00 2001 From: RE-OWOD <95522332+RE-OWOD@users.noreply.github.com> Date: Tue, 4 Jan 2022 22:09:10 +0800 Subject: [PATCH] Add files via upload --- INSTALL.md | 230 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 230 insertions(+) create mode 100644 INSTALL.md diff --git a/INSTALL.md b/INSTALL.md new file mode 100644 index 0000000..5d8887b --- /dev/null +++ b/INSTALL.md @@ -0,0 +1,230 @@ +## Installation + +Our [Colab Notebook](https://colab.research.google.com/drive/16jcaJoc6bCFAQ96jDe2HwtXj7BMD_-m5) +has step-by-step instructions that install detectron2. +The [Dockerfile](docker) +also installs detectron2 with a few simple commands. + +### Requirements +- Linux or macOS with Python ≥ 3.6 +- PyTorch ≥ 1.4 and [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 is optional and needed by demo and visualization + + +### Build Detectron2 from Source + +gcc & g++ ≥ 5 are required. [ninja](https://ninja-build.org/) is recommended for faster build. +After having them, run: +``` +python -m pip install 'git+https://github.com/facebookresearch/detectron2.git' +# (add --user if you don't have permission) + +# Or, to install it from a local clone: +git clone https://github.com/facebookresearch/detectron2.git +python -m pip install -e detectron2 + +# Or if you are on macOS +CC=clang CXX=clang++ python -m pip install ...... +``` + +To __rebuild__ detectron2 that's built from a local clone, use `rm -rf build/ **/*.so` to clean the +old build first. You often need to rebuild detectron2 after reinstalling PyTorch. + +### Install Pre-Built Detectron2 (Linux only) + +Choose from this table to install [v0.2.1 (Aug 2020)](https://github.com/facebookresearch/detectron2/releases): + +
CUDA | torch 1.6 | torch 1.5 | torch 1.4 |
---|---|---|---|
10.2 | install | install | |
10.1 | install | install | install |
10.0 | install | ||
9.2 | install | install | install |
cpu | install | install | install |