AOSSIE-Org / AOSSIE-Org/PictoPy

Issue: Face Embedding Normalization Can Divide by Zero

Open
#632 2 comments 0 reactions 1 assignee Claimed by @prvn-kumar01 View on GitHub
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

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.