Download backend/scratch/check_embs.py from SolutionChallenge/solution_challenge_backend: direct link, hf CLI and curl.
- Browser
- Download file 465 Bytes
-
https://huggingface.co/spaces/SolutionChallenge/solution_challenge_backend/resolve/main/backend/scratch/check_embs.py
- Command line
-
hf download hf://spaces/SolutionChallenge/solution_challenge_backend/backend/scratch/check_embs.py
-
curl -L -o check_embs.py https://huggingface.co/spaces/SolutionChallenge/solution_challenge_backend/resolve/main/backend/scratch/check_embs.py
465 Bytes
| import numpy as np | |
| import os | |
| path1 = r"c:\Users\kvidi\Desktop\cepheus_final\backend\Face_Recognition\faces_db\Urvi.npy" | |
| path2 = r"c:\Users\kvidi\Desktop\cepheus_final\backend\Face_Recognition\faces_db\Vidit.npy" | |
| for p in [path1, path2]: | |
| if os.path.exists(p): | |
| emb = np.load(p) | |
| print(f"{os.path.basename(p)}: shape={emb.shape}, dtype={emb.dtype}, norm={np.linalg.norm(emb, axis=-1)}") | |
| else: | |
| print(f"{os.path.basename(p)} not found") | |