tomashru commited on
Commit
de27acf
·
1 Parent(s): 474dc1e

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -5
app.py CHANGED
@@ -37,16 +37,14 @@ def draw_coco_bboxes(img, bboxes, color=(255,255,0), width=5, show=False, export
37
  return img
38
 
39
 
40
- def traffic_sign_inference(input_img):
41
  # Build the model from a config file and a checkpoint file
42
  model = init_detector(config_file, checkpoint_file, device='cpu')
43
 
44
  result = inference_detector(model, img)
45
 
46
- # Show the results
47
- img = mmcv.imread(img) # numpy -> torch here!
48
- img = mmcv.imconvert(img, 'bgr', 'rgb')
49
-
50
 
51
  bboxes = result.pred_instances.bboxes
52
  labels = [SIGNS_CLASSES[l] for l in result.pred_instances.labels]
 
37
  return img
38
 
39
 
40
+ def traffic_sign_inference(img):
41
  # Build the model from a config file and a checkpoint file
42
  model = init_detector(config_file, checkpoint_file, device='cpu')
43
 
44
  result = inference_detector(model, img)
45
 
46
+ # img = mmcv.imread(img) # numpy -> torch here!
47
+ # img = mmcv.imconvert(img, 'bgr', 'rgb')
 
 
48
 
49
  bboxes = result.pred_instances.bboxes
50
  labels = [SIGNS_CLASSES[l] for l in result.pred_instances.labels]