Saad0KH commited on
Commit
44be11c
·
verified ·
1 Parent(s): c30ab98

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -67,8 +67,9 @@ def extract_persons(image: np.ndarray, bboxes: np.ndarray) -> list[Image.Image]:
67
  person_pil_image = Image.fromarray(person_image).convert('RGB') # Convert to RGB
68
  with io.BytesIO() as output:
69
  person_pil_image.save(output, format='JPEG') # Convert to JPEG
 
70
  person_pil_image = Image.open(output) # Reopen to ensure format
71
- person_images.append(person_pil_image)
72
  return person_images
73
 
74
 
 
67
  person_pil_image = Image.fromarray(person_image).convert('RGB') # Convert to RGB
68
  with io.BytesIO() as output:
69
  person_pil_image.save(output, format='JPEG') # Convert to JPEG
70
+ output.seek(0) # Move to the start of the BytesIO buffer
71
  person_pil_image = Image.open(output) # Reopen to ensure format
72
+ person_images.append(person_pil_image)
73
  return person_images
74
 
75