phamvi856 commited on
Commit
e0e589a
·
1 Parent(s): fd20fcc

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -4
app.py CHANGED
@@ -44,10 +44,7 @@ label2color = {
44
 
45
  def unnormalize_box(bbox, width, height):
46
  return [
47
- width * (bbox[0] / 1000),
48
- height * (bbox[1] / 1000),
49
- width * (bbox[2] / 1000),
50
- height * (bbox[3] / 1000),
51
  ]
52
 
53
  def iob_to_label(label):
@@ -109,3 +106,4 @@ iface = gr.Interface(fn=process_image,
109
 
110
  iface.launch(inline=False, share=False, debug=False)
111
 
 
 
44
 
45
  def unnormalize_box(bbox, width, height):
46
  return [
47
+ width * (box / 1000) for box in bbox
 
 
 
48
  ]
49
 
50
  def iob_to_label(label):
 
106
 
107
  iface.launch(inline=False, share=False, debug=False)
108
 
109
+