martin8 commited on
Commit
6fd14b6
1 Parent(s): 4c9e546

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -291,10 +291,10 @@ def yolo_tiny(name):
291
  bboxes = []
292
 
293
  for score, label, box in zip(results["scores"], results["labels"], results["boxes"]):
294
- box = [round(i, 2) for i in box.tolist()]
295
  print(
296
  f"Detected {model.config.id2label[label.item()]} with confidence "
297
- f"{round(score.item(), 3)} at location {box}"
298
  )
299
 
300
  label_.append(model.config.id2label[label.item()])
@@ -323,7 +323,7 @@ def resnet_101(name):
323
  label_ = []
324
  bboxes = []
325
  for score, label, box in zip(results["scores"], results["labels"], results["boxes"]):
326
- box = [round(i, 2) for i in box.tolist()]
327
  print(
328
  f"Detected {model.config.id2label[label.item()]} with confidence "
329
  f"{round(score.item(), 3)} at location {box}")
 
291
  bboxes = []
292
 
293
  for score, label, box in zip(results["scores"], results["labels"], results["boxes"]):
294
+ box = [round(i, 12) for i in box.tolist()]
295
  print(
296
  f"Detected {model.config.id2label[label.item()]} with confidence "
297
+ f"{round(score.item(), 12)} at location {box}"
298
  )
299
 
300
  label_.append(model.config.id2label[label.item()])
 
323
  label_ = []
324
  bboxes = []
325
  for score, label, box in zip(results["scores"], results["labels"], results["boxes"]):
326
+ box = [round(i, 12) for i in box.tolist()]
327
  print(
328
  f"Detected {model.config.id2label[label.item()]} with confidence "
329
  f"{round(score.item(), 3)} at location {box}")