Spaces:
Runtime error
Runtime error
xichen98cn
commited on
Commit
•
be4e089
1
Parent(s):
3b55d3d
init
Browse files
app.py
CHANGED
@@ -1,12 +1,11 @@
|
|
1 |
import os
|
2 |
import sys
|
3 |
|
4 |
-
|
5 |
-
|
6 |
-
|
7 |
-
|
8 |
-
|
9 |
-
# os.system("python frozenseg/modeling/pixel_decoder/ops/setup.py build install")
|
10 |
|
11 |
import gradio as gr
|
12 |
from detectron2.utils.logger import setup_logger
|
@@ -32,7 +31,7 @@ add_maskformer2_config(cfg)
|
|
32 |
add_frozenseg_config(cfg)
|
33 |
cfg.merge_from_file("configs/coco/frozenseg/convnext_large_eval_ade20k.yaml")
|
34 |
# os.system("gdown 1-91PIns86vyNaL3CzMmDD39zKGnPMtvj")
|
35 |
-
cfg.MODEL.WEIGHTS = './
|
36 |
cfg.MODEL.MASK_FORMER.TEST.SEMANTIC_ON = False
|
37 |
cfg.MODEL.MASK_FORMER.TEST.INSTANCE_ON = False
|
38 |
cfg.MODEL.MASK_FORMER.TEST.PANOPTIC_ON = True
|
|
|
1 |
import os
|
2 |
import sys
|
3 |
|
4 |
+
os.system("pip install imutils")
|
5 |
+
os.system("pip install gradio_client==0.2.7")
|
6 |
+
os.system("python -m pip install 'git+https://github.com/facebookresearch/detectron2.git'")
|
7 |
+
os.system("pip install git+https://github.com/cocodataset/panopticapi.git")
|
8 |
+
os.system("python frozenseg/modeling/pixel_decoder/ops/setup.py build install")
|
|
|
9 |
|
10 |
import gradio as gr
|
11 |
from detectron2.utils.logger import setup_logger
|
|
|
31 |
add_frozenseg_config(cfg)
|
32 |
cfg.merge_from_file("configs/coco/frozenseg/convnext_large_eval_ade20k.yaml")
|
33 |
# os.system("gdown 1-91PIns86vyNaL3CzMmDD39zKGnPMtvj")
|
34 |
+
cfg.MODEL.WEIGHTS = './frozenseg_ConvNeXt-Large.pth'
|
35 |
cfg.MODEL.MASK_FORMER.TEST.SEMANTIC_ON = False
|
36 |
cfg.MODEL.MASK_FORMER.TEST.INSTANCE_ON = False
|
37 |
cfg.MODEL.MASK_FORMER.TEST.PANOPTIC_ON = True
|