Update preprocessing_router.py
Browse files- preprocessing_router.py +21 -0
preprocessing_router.py
CHANGED
|
@@ -303,6 +303,27 @@ async def finalize_casting(
|
|
| 303 |
print("Face identities found:", face_identities)
|
| 304 |
print("Voice identities found:", voice_identities)
|
| 305 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 306 |
|
| 307 |
casting_json = {"face_col": [], "voice_col": []}
|
| 308 |
|
|
|
|
| 303 |
print("Face identities found:", face_identities)
|
| 304 |
print("Voice identities found:", voice_identities)
|
| 305 |
|
| 306 |
+
if face_identities:
|
| 307 |
+
print("Face identities:", face_identities)
|
| 308 |
+
|
| 309 |
+
for identity in face_identities:
|
| 310 |
+
print("Procesando identidad:", identity)
|
| 311 |
+
id_dir = faces_out / identity
|
| 312 |
+
if not id_dir.is_dir():
|
| 313 |
+
print(f"No existe directorio para {identity}")
|
| 314 |
+
continue
|
| 315 |
+
|
| 316 |
+
img_path = None
|
| 317 |
+
for ext in (".jpg", ".jpeg", ".png", ".bmp", ".webp"):
|
| 318 |
+
candidates = list(id_dir.glob(f"*{ext}"))
|
| 319 |
+
if candidates:
|
| 320 |
+
img_path = candidates[0]
|
| 321 |
+
print(f"Imagen encontrada para {identity}: {img_path}")
|
| 322 |
+
break
|
| 323 |
+
|
| 324 |
+
if not img_path:
|
| 325 |
+
print(f"No se encontr贸 imagen para {identity}")
|
| 326 |
+
|
| 327 |
|
| 328 |
casting_json = {"face_col": [], "voice_col": []}
|
| 329 |
|