Liangyu commited on
Commit
5b21c21
β€’
1 Parent(s): f2f297f

add utils debug

Browse files
Files changed (3) hide show
  1. README.md +1 -1
  2. app.py +0 -4
  3. utils.py +5 -1
README.md CHANGED
@@ -1,6 +1,6 @@
1
  ---
2
  title: OpenPSG
3
- emoji: πŸ–ΌοΈπŸ™οΈπŸŒ„πŸŒ‰
4
  colorFrom: yellow
5
  colorTo: blue
6
  sdk: gradio
 
1
  ---
2
  title: OpenPSG
3
+ emoji: πŸžοΈπŸ™οΈπŸŒ„πŸŒ‰
4
  colorFrom: yellow
5
  colorTo: blue
6
  sdk: gradio
app.py CHANGED
@@ -11,8 +11,6 @@ if os.getenv('SYSTEM') == 'spaces':
11
  mim.uninstall('mmcv-full', confirm_yes=True)
12
  mim.install('mmcv-full==1.5.2', is_yes=True)
13
 
14
-
15
- subprocess.call('pip install --upgrade pip'.split())
16
  subprocess.call('pip uninstall -y opencv-python'.split())
17
  subprocess.call('pip uninstall -y opencv-python-headless'.split())
18
  subprocess.call('pip install opencv-python-headless==4.5.5.64'.split())
@@ -23,8 +21,6 @@ import cv2
23
  import gradio as gr
24
  import numpy as np
25
 
26
- print('60\% \imported')
27
-
28
  from mmdet.apis import init_detector, inference_detector
29
  print('70\% \imported')
30
  from utils import show_result
 
11
  mim.uninstall('mmcv-full', confirm_yes=True)
12
  mim.install('mmcv-full==1.5.2', is_yes=True)
13
 
 
 
14
  subprocess.call('pip uninstall -y opencv-python'.split())
15
  subprocess.call('pip uninstall -y opencv-python-headless'.split())
16
  subprocess.call('pip install opencv-python-headless==4.5.5.64'.split())
 
21
  import gradio as gr
22
  import numpy as np
23
 
 
 
24
  from mmdet.apis import init_detector, inference_detector
25
  print('70\% \imported')
26
  from utils import show_result
utils.py CHANGED
@@ -1,11 +1,15 @@
1
  from typing import Tuple
2
- import os.path as osp
3
  import PIL
4
  import mmcv
5
  import numpy as np
 
6
  from detectron2.utils.colormap import colormap
 
7
  from detectron2.utils.visualizer import VisImage, Visualizer
 
8
  from mmdet.datasets.coco_panoptic import INSTANCE_OFFSET
 
 
9
 
10
  CLASSES = [
11
  'person', 'bicycle', 'car', 'motorcycle', 'airplane', 'bus', 'train',
 
1
  from typing import Tuple
 
2
  import PIL
3
  import mmcv
4
  import numpy as np
5
+ print('50\% \imported utils')
6
  from detectron2.utils.colormap import colormap
7
+ print('60\% \imported utils')
8
  from detectron2.utils.visualizer import VisImage, Visualizer
9
+ print('80\% \imported utils')
10
  from mmdet.datasets.coco_panoptic import INSTANCE_OFFSET
11
+ print('100\% \imported utils')
12
+
13
 
14
  CLASSES = [
15
  'person', 'bicycle', 'car', 'motorcycle', 'airplane', 'bus', 'train',