zilliz
3 years ago
1 changed files with
1 additions and
2 deletions
-
detectron.py
|
@ -3,8 +3,7 @@ import os |
|
|
try: |
|
|
try: |
|
|
import detectron2 |
|
|
import detectron2 |
|
|
except ModuleNotFoundError: |
|
|
except ModuleNotFoundError: |
|
|
os.system("git clone https://github.com/facebookresearch/detectron2.git") |
|
|
|
|
|
os.system("python -m pip install -e detectron2") |
|
|
|
|
|
|
|
|
os.system("pip install 'git+https://github.com/facebookresearch/detectron2.git'") |
|
|
from detectron2 import model_zoo |
|
|
from detectron2 import model_zoo |
|
|
from detectron2.config import get_cfg |
|
|
from detectron2.config import get_cfg |
|
|
from detectron2.engine.defaults import DefaultPredictor |
|
|
from detectron2.engine.defaults import DefaultPredictor |
|
|