본문 바로가기

AI/Framework

[Detectron2] 설치

pytorch와 cuda 버전이 맞아야 한다. 아래와 같은 버전이 아니라면 설치해도 오류가 난다.

원래 pytorch버전 1.10을 1.7로 낮추어서 시간 엄청 들여서 설치한 cuda10.1에 맞췄다. cuda버전을 다시 높여서 재설치하긴 싫었다.

 

 

Releases · facebookresearch/detectron2

Detectron2 is FAIR's next-generation platform for object detection, segmentation and other visual recognition tasks. - facebookresearch/detectron2

github.com

 

Requirements

  • Linux or macOS with Python ≥ 3.6
  • PyTorch ≥ 1.8 and torchvision that matches the PyTorch installation. Install them together at pytorch.org to make sure of this
  • OpenCV is optional but needed by demo and visualization

 

설치 명령어

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

# On macOS, you may need to prepend the above commands with a few environment variables:
CC=clang CXX=clang++ ARCHFLAGS="-arch x86_64" python -m pip install ...

 

 

Installation — detectron2 0.6 documentation

© Copyright 2019-2020, detectron2 contributors Revision f0137779.

detectron2.readthedocs.io

 

 

 

pip install -e .

 

 

Ubuntu(우분투) Facebook detectron2 설치 및 cpu모드 실행

Facebook에서 개발한 detectron2는 뛰어난 이미지 인식 머신러닝 모델입니다. 지금부터 빠르게 설치법을 알아가도록 하겠습니다. detectron2를 설치하기 위한 조건입니다. 1,2 조건은 쉽게 충족하셔다고

asung123456.tistory.com

 

'AI > Framework' 카테고리의 다른 글

[pip] import cv2 동영상 세팅/읽기/저장  (1) 2023.03.14
[MMDetection] Config File Structure  (0) 2021.12.28
[Detectron2] Densepose COCO 데이터셋  (0) 2021.11.23
[Keras] RNN 구현하기  (0) 2021.07.07
[scikit] LabelEncoder  (0) 2021.02.13