vahidrezanezhad commited on
Commit
6bdbb2a
1 Parent(s): aaa7157

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -214,13 +214,13 @@ def do_prediction(model_name, img):
214
  if x <= 30:
215
  w += x
216
  x = 0
217
- if (img.shape[1] - (x + w)) <= 30:
218
- w = w + (img.shape[1] - (x + w))
219
  if y <= 30:
220
  h = h + y
221
  y = 0
222
- if (img.shape[0] - (y + h)) <= 30:
223
- h = h + (img.shape[0] - (y + h))
224
 
225
  box = [x, y, w, h]
226
 
 
214
  if x <= 30:
215
  w += x
216
  x = 0
217
+ if (img_org.shape[1] - (x + w)) <= 30:
218
+ w = w + (img_org.shape[1] - (x + w))
219
  if y <= 30:
220
  h = h + y
221
  y = 0
222
+ if (img_org.shape[0] - (y + h)) <= 30:
223
+ h = h + (img_org.shape[0] - (y + h))
224
 
225
  box = [x, y, w, h]
226