nolenfelten commited on
Commit
b38b392
·
verified ·
1 Parent(s): ba0c32d

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +0 -12
app.py CHANGED
@@ -276,18 +276,6 @@ def object_detection_density_edge(image, conf_threshold=0.25, iou_threshold=0.45
276
  def resize_image(image, max_size=1500):
277
  print("resize_image initialized")
278
 
279
- if max(image.size) > max_size:
280
- print("Image size is over the max size, resizing")
281
-
282
- ratio = max_size / float(max(image.size))
283
- print("Ratio is: " + str(ratio))
284
-
285
- new_size = tuple([int(x * ratio) for x in image.size])
286
- print("New size is: " + str(new_size))
287
-
288
- print("Resizing image")
289
- image = image.resize(new_size, Image.LANCZOS)
290
-
291
 
292
  print("Create io.BytesIO instance")
293
  buffer = io.BytesIO()
 
276
  def resize_image(image, max_size=1500):
277
  print("resize_image initialized")
278
 
 
 
 
 
 
 
 
 
 
 
 
 
279
 
280
  print("Create io.BytesIO instance")
281
  buffer = io.BytesIO()