face-intel / pipeline /hashing.py
Marwan
Restructure + add reverse face search (PimEyes-style)
f5eeb1c
Raw
History Blame Contribute Delete
387 Bytes
"""Hashing — delegates to cores.vision.hashing (single source of truth)."""
from __future__ import annotations
import numpy as np
from cores.vision import sha256_image
class ImageHasher:
"""SHA-256 over normalized JPEG bytes — stable cache key."""
@staticmethod
def hash(img: np.ndarray, quality: int = 90) -> str:
return sha256_image(img, quality=quality)