diff --git a/detectron.py b/detectron.py index 6b39d5c..f15d566 100644 --- a/detectron.py +++ b/detectron.py @@ -1,9 +1,6 @@ from typing import List, Tuple import os -try: - import detectron2 -except ModuleNotFoundError: - os.system("pip install 'git+https://github.com/facebookresearch/detectron2.git'") +import detectron2 from detectron2 import model_zoo from detectron2.config import get_cfg from detectron2.engine.defaults import DefaultPredictor diff --git a/requirements.txt b/requirements.txt index a8a8ca2..c14bc13 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,4 +1,4 @@ torch >= 1.8 torchvision >= 0.9.0 -# detectron2 -# https://github.com/facebookresearch/detectron2/archive/refs/tags/v0.6.tar.gz +detectron2@https://github.com/facebookresearch/detectron2/archive/refs/tags/v0.6.tar.gz +# detectron2@git+https://github.com/facebookresearch/detectron2.git@v0.6#egg=detectron2