ClassCat commited on
Commit
2263eff
1 Parent(s): 9271906

update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -44,7 +44,7 @@ def get_figure(in_pil_img, in_results):
44
  selected_color = choice(COLORS)
45
 
46
  box_int = [i.item() for i in torch.round(box).to(torch.int32)]
47
- x, y, w, h = box[0], box[1], box[2]-box[0], box[3]-box[1]
48
  #x, y, w, h = torch.round(box[0]).item(), torch.round(box[1]).item(), torch.round(box[2]-box[0]).item(), torch.round(box[3]-box[1]).item()
49
 
50
  ax.add_patch(plt.Rectangle((x, y), w, h, fill=False, color=selected_color, linewidth=2))
 
44
  selected_color = choice(COLORS)
45
 
46
  box_int = [i.item() for i in torch.round(box).to(torch.int32)]
47
+ x, y, w, h = box_int[0], box_int[1], box_int[2]-box_int[0], box_int[3]-box_int[1]
48
  #x, y, w, h = torch.round(box[0]).item(), torch.round(box[1]).item(), torch.round(box[2]-box[0]).item(), torch.round(box[3]-box[1]).item()
49
 
50
  ax.add_patch(plt.Rectangle((x, y), w, h, fill=False, color=selected_color, linewidth=2))