Nadine Rueegg commited on
Commit
26a85d5
β€’
1 Parent(s): a7d1abf

add results folder

Browse files
Files changed (1) hide show
  1. gradio_demo/barc_demo_v3.py +3 -3
gradio_demo/barc_demo_v3.py CHANGED
@@ -3,11 +3,11 @@
3
  import os
4
  os.environ["CUDA_DEVICE_ORDER"]="PCI_BUS_ID"
5
  os.environ["CUDA_VISIBLE_DEVICES"]="0"
6
- try:
7
  # os.system("pip install --upgrade torch==1.11.0+cu113 torchvision==0.12.0+cu113 -f https://download.pytorch.org/whl/cu113/torch_stable.html")
8
  os.system("pip install --upgrade torch==1.6.0+cu101 torchvision==0.7.0+cu101 -f https://download.pytorch.org/whl/cu101/torch_stable.html")
9
  except Exception as e:
10
- print(e)
11
 
12
  import numpy as np
13
  import os
@@ -109,7 +109,7 @@ def detect_object(model, img_path_or_img, confidence=0.5, rect_th=2, text_size=0
109
  def run_bbox_inference(input_image):
110
  # load configs
111
  cfg = get_cfg_global_updated()
112
-
113
  model = torchvision.models.detection.fasterrcnn_resnet50_fpn(pretrained=True)
114
  model.eval()
115
  out_path = os.path.join(cfg.paths.ROOT_OUT_PATH, 'gradio_examples', 'test2.png')
 
3
  import os
4
  os.environ["CUDA_DEVICE_ORDER"]="PCI_BUS_ID"
5
  os.environ["CUDA_VISIBLE_DEVICES"]="0"
6
+ '''try:
7
  # os.system("pip install --upgrade torch==1.11.0+cu113 torchvision==0.12.0+cu113 -f https://download.pytorch.org/whl/cu113/torch_stable.html")
8
  os.system("pip install --upgrade torch==1.6.0+cu101 torchvision==0.7.0+cu101 -f https://download.pytorch.org/whl/cu101/torch_stable.html")
9
  except Exception as e:
10
+ print(e)'''
11
 
12
  import numpy as np
13
  import os
 
109
  def run_bbox_inference(input_image):
110
  # load configs
111
  cfg = get_cfg_global_updated()
112
+
113
  model = torchvision.models.detection.fasterrcnn_resnet50_fpn(pretrained=True)
114
  model.eval()
115
  out_path = os.path.join(cfg.paths.ROOT_OUT_PATH, 'gradio_examples', 'test2.png')