## 설치 ### Requirements - Linux 혹은 macOS 및 Python ≥ 3.6 - PyTorch ≥ 1.8 및 해당 버전에 맞는 [torchvision](https://github.com/pytorch/vision/). [pytorch.org](https://pytorch.org)에서 둘을 함께 설치하여 반드시 호환성을 확인하십시오. - OpenCV는 선택 사항이지만 데모 및 시각화에 필요합니다. ### Detectron2 소스로부터 빌드하기 gcc & g++ ≥ 5.4 가 필요합니다. [ninja](https://ninja-build.org/) 는 선택사항이나 빠른 빌드를 위해 권장드립니다. 아래 명령을 통해 설치합니다: ``` python -m pip install 'git+https://github.com/facebookresearch/detectron2.git' # (권한이 없을 경우 --user 추가) # 혹은, 로컬 사본을 설치하려면: git clone https://github.com/facebookresearch/detectron2.git python -m pip install -e detectron2 # macOS에서는 위의 명령에 앞서 몇 가지 환경 변수를 추가해야 할 수 있습니다. CC=clang CXX=clang++ ARCHFLAGS="-arch x86_64" python -m pip install ... ``` 로컬 클론에서 빌드된 detectron2를 __재빌드__ 하려면 먼저 `rm -rf build/ **/*.so` 를 통해 이전 빌드를 정리합니다. 많은 경우에 PyTorch를 재설치한 후 detectron2를 재빌드해야 합니다. ### 사전 빌드된 Detectron2 설치하기 (Linux 전용) 아래 표에서 [v0.6 (Oct 2021)](https://github.com/facebookresearch/detectron2/releases) 을 선택해 설치합니다:
CUDA | torch 1.10 | torch 1.9 | torch 1.8 |
---|---|---|---|
11.3 | install | ||
11.1 | install | install | install |
10.2 | install | install | install |
10.1 | install | ||
cpu | install | install | install |