xichen98cn commited on
Commit
be4e089
1 Parent(s): 3b55d3d
Files changed (1) hide show
  1. app.py +6 -7
app.py CHANGED
@@ -1,12 +1,11 @@
1
  import os
2
  import sys
3
 
4
- # os.system("pip install gdown")
5
- # os.system("pip install imutils")
6
- # os.system("pip install gradio_client==0.2.7")
7
- # os.system("python -m pip install 'git+https://github.com/facebookresearch/detectron2.git'")
8
- # os.system("pip install git+https://github.com/cocodataset/panopticapi.git")
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 = './modified_model.pth'
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