Update app.py
Browse files
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)
|