prakrutpatel commited on
Commit
94931d5
·
1 Parent(s): 79387fd

PIL.Image.ANTIALIAS was removed in Pillow 10.0.0, replaced with PIL.Image.LANCZOS

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -225,7 +225,7 @@ def run_inference(model, image_path, date_captured, resize_image=True):
225
  with open(image_path,'rb') as f:
226
  image = Image.open(f)
227
  if resize_image:
228
- image.thumbnail((640,640),Image.ANTIALIAS)
229
  image_np = np.array(image)
230
 
231
  # Actual detection.
@@ -357,9 +357,9 @@ def show_context_rcnn_inference(
357
  with open(image_path,'rb') as f:
358
  image = Image.open(f)
359
  if resize_image:
360
- image.thumbnail((640,640),Image.ANTIALIAS)
361
  image_np = np.array(image)
362
- image.thumbnail((400,400),Image.ANTIALIAS)
363
  context_rcnn_image_np = np.array(image)
364
 
365
  faster_rcnn_image_np = np.copy(context_rcnn_image_np)
 
225
  with open(image_path,'rb') as f:
226
  image = Image.open(f)
227
  if resize_image:
228
+ image.thumbnail((640,640),Image.LANCZOS)
229
  image_np = np.array(image)
230
 
231
  # Actual detection.
 
357
  with open(image_path,'rb') as f:
358
  image = Image.open(f)
359
  if resize_image:
360
+ image.thumbnail((640,640),Image.LANCZOS)
361
  image_np = np.array(image)
362
+ image.thumbnail((400,400),Image.LANCZOS)
363
  context_rcnn_image_np = np.array(image)
364
 
365
  faster_rcnn_image_np = np.copy(context_rcnn_image_np)