Use different hashing for the face store

This commit is contained in:
henryruhs
2025-03-04 12:11:40 +01:00
parent a91cb9a3ed
commit 27f77f92fb

View File

@@ -34,8 +34,10 @@ def clear_static_faces() -> None:
def create_frame_hash(vision_frame : VisionFrame) -> Optional[str]: def create_frame_hash(vision_frame : VisionFrame) -> Optional[str]:
return hashlib.sha1(vision_frame.tobytes()).hexdigest() if numpy.any(vision_frame) else None if numpy.any(vision_frame):
frame_hash = hashlib.blake2b(vision_frame.tobytes(), digest_size = 16).hexdigest()
return frame_hash
return None
def get_reference_faces() -> Optional[FaceSet]: def get_reference_faces() -> Optional[FaceSet]:
if FACE_STORE['reference_faces']: if FACE_STORE['reference_faces']: