Astridkraft commited on
Commit
6476ddb
·
verified ·
1 Parent(s): e8e2118

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -0
app.py CHANGED
@@ -215,6 +215,10 @@ def process_image_upload(image):
215
  """Verarbeitet Bild-Upload und gibt Bild + Koordinaten zurück"""
216
  if image is None:
217
  return None, None, None, None, None
 
 
 
 
218
 
219
  # Auto-Koordinaten generieren
220
  bbox = auto_detect_face_area(image)
 
215
  """Verarbeitet Bild-Upload und gibt Bild + Koordinaten zurück"""
216
  if image is None:
217
  return None, None, None, None, None
218
+
219
+ if image.size != (512, 512):
220
+ image = image.resize((512, 512), Image.LANCZOS)
221
+ print(f"Bild auf 512x512 skaliert")
222
 
223
  # Auto-Koordinaten generieren
224
  bbox = auto_detect_face_area(image)