AOSSIE-Org / AOSSIE-Org/PictoPy
Issue: Face Embedding Normalization Can Divide by Zero
Open
backend
bug
- Dominant language
- Python
- Stars
- 283
- Forks
- 679
- Avg merge
- 7d 2h
- Merged PRs (30d)
- 3
Description
FaceNet_util_normalize_embedding divides embeddings by np.linalg.norm(embedding) without guarding against zero-length vectors. When Facenet returns a near-zero tensor (e.g., because the detected crop was empty or corrupted), the norm becomes 0 and we produce NaN/Inf embeddings. These invalid values get committed to the database and break subsequent similarity comparisons.
Contributor guide
Assessment
This issue has not been assessed yet.