Drazcat-AI commited on
Commit
bfdbba1
·
1 Parent(s): 7642bfb

Update handler.py

Browse files
Files changed (1) hide show
  1. handler.py +7 -6
handler.py CHANGED
@@ -17,12 +17,13 @@ class EndpointHandler():
17
  cords = [round(x) for x in cords]
18
  conf = round(box.conf[0].item(), 2)
19
  prediction = {
20
- "x": cords[0] ,
21
- "y": cords[1],
22
- "width": cords[2],
23
- "height": cords[3],
24
- "confidence": conf,
25
- "class": class_id
 
26
  }
27
  predictions.append(prediction)
28
  predictions_array = {"predictions": predictions}
 
17
  cords = [round(x) for x in cords]
18
  conf = round(box.conf[0].item(), 2)
19
  prediction = {
20
+ "label": class_id,
21
+ "score": conf,
22
+ "box":{
23
+ "x": cords[0],
24
+ "y": cords[1],
25
+ "width": cords[2],
26
+ "height": cords[3]}
27
  }
28
  predictions.append(prediction)
29
  predictions_array = {"predictions": predictions}