dnth commited on
Commit
b5da8b8
·
1 Parent(s): 76ae7fb

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -3
app.py CHANGED
@@ -58,11 +58,15 @@ def show_preds(input_image, display_label, display_bbox, detection_threshold):
58
  if detection_threshold==0: detection_threshold=0.5
59
 
60
  img = PIL.Image.fromarray(input_image, 'RGB')
61
-
62
- pred_dict = model_type.end2end_detect(img, valid_tfms, model, class_map=class_map, detection_threshold=detection_threshold,
63
- display_label=display_label, display_bbox=display_bbox, return_img=True,
64
  font_size=16, label_color="#FF59D6")
65
 
 
 
 
 
66
  return pred_dict['img']
67
 
68
  # display_chkbox = gr.inputs.CheckboxGroup(["Label", "BBox"], label="Display", default=True)
 
58
  if detection_threshold==0: detection_threshold=0.5
59
 
60
  img = PIL.Image.fromarray(input_image, 'RGB')
61
+
62
+ pred_dict = model_type.end2end_detect(img, valid_tfms, model, class_map=class_map, detection_threshold=0.5,
63
+ display_label=True, display_bbox=True, return_img=True,
64
  font_size=16, label_color="#FF59D6")
65
 
66
+ #pred_dict = model_type.end2end_detect(img, valid_tfms, model, class_map=class_map, detection_threshold=detection_threshold,
67
+ # display_label=display_label, display_bbox=display_bbox, return_img=True,
68
+ # font_size=16, label_color="#FF59D6")
69
+
70
  return pred_dict['img']
71
 
72
  # display_chkbox = gr.inputs.CheckboxGroup(["Label", "BBox"], label="Display", default=True)