DatSplit commited on
Commit
11defca
·
verified ·
1 Parent(s): 4a8ce62

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -62,7 +62,7 @@ def inference(image_path, model_name, bbox_threshold):
62
  tensor_img, _ = transforms(image, None)
63
  tensor_img = tensor_img.unsqueeze(0)
64
 
65
- ort_inputs = {ort_session.get_inputs()[0].name: tensor_img.cpu().numpy()}
66
 
67
  if model_name == "RF-DETR-B":
68
  model_path = "rfdetr.onnx"
@@ -77,8 +77,8 @@ def inference(image_path, model_name, bbox_threshold):
77
  providers=["CUDAExecutionProvider", "CPUExecutionProvider"],
78
  sess_options=sess_options
79
  )
80
-
81
- ort_inputs = {ort_session.get_inputs()[0].name: img_transformed}
82
  ort_outs = ort_session.run(None, ort_inputs)
83
 
84
  boxes, labels, scores = ort_outs
 
62
  tensor_img, _ = transforms(image, None)
63
  tensor_img = tensor_img.unsqueeze(0)
64
 
65
+
66
 
67
  if model_name == "RF-DETR-B":
68
  model_path = "rfdetr.onnx"
 
77
  providers=["CUDAExecutionProvider", "CPUExecutionProvider"],
78
  sess_options=sess_options
79
  )
80
+
81
+ ort_inputs = {ort_session.get_inputs()[0].name: tensor_img.cpu().numpy()}
82
  ort_outs = ort_session.run(None, ort_inputs)
83
 
84
  boxes, labels, scores = ort_outs