From 1b37f3df12d4efd9436b91377dcd7b5b17db5b85 Mon Sep 17 00:00:00 2001 From: Jael Gu Date: Fri, 30 Sep 2022 16:50:43 +0800 Subject: [PATCH] Fix for detectron2 installation Signed-off-by: Jael Gu --- detectron.py | 5 +---- requirements.txt | 4 ++-- 2 files changed, 3 insertions(+), 6 deletions(-) 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