chore: remove dead embedding paths and suppress insightface FutureWarning in image_processing
- immich_api.py: remove FaceData.embedding field and numpy import — Immich face embeddings were never consumed after being fetched; bbox/confidence is all that's used - embeddings.py: remove immich_embedding param from get_embedding() — never passed by any caller; simplify docstring accordingly - image_processing.py: wrap insightface_app.get() in warnings filter to suppress the scikit-image FutureWarning about estimate being deprecated (already suppressed in embeddings.py for the diversity path, was leaking from the crop-alignment path) - README.md: remove two stale "object mode" / "object classification" fragments
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
|
||||
import logging
|
||||
import os
|
||||
import warnings
|
||||
|
||||
import numpy as np
|
||||
from PIL import Image
|
||||
@@ -113,7 +114,9 @@ def process_face_mode(
|
||||
min(img_h, y2 + pad_y),
|
||||
)
|
||||
search_crop = img.crop(search_box)
|
||||
detected = insightface_app.get(np.asarray(search_crop))
|
||||
with warnings.catch_warnings():
|
||||
warnings.filterwarnings("ignore", message=".*estimate.*is deprecated", category=FutureWarning)
|
||||
detected = insightface_app.get(np.asarray(search_crop))
|
||||
if detected:
|
||||
cx, cy = search_crop.width / 2, search_crop.height / 2
|
||||
best = min(
|
||||
|
||||
Reference in New Issue
Block a user