YAML Metadata Warning:empty or missing yaml metadata in repo card
Check out the documentation for more information.
Banknote Embedder
Fine-tuned visual embedding model for Nepali banknotes.
It maps an input banknote image to a 512-d normalized embedding vector.
You can compare two notes using cosine similarity:
- higher score -> more similar
- lower score -> less similar
Model Files
banknote_embedder_finetuned.pth: training state_dictbanknote_embedder_fp16.safetensors: compressed inference weights (recommended)banknote_embedder_int8_dynamic.pth: dynamic int8 export for supported CPU backends
Quantize / Export
Generate compressed artifacts from your fine-tuned weights:
python quantize_model.py --input-model banknote_embedder_finetuned.pth --skip-int8
Outputs:
banknote_embedder_fp16.safetensors
Optional (if your CPU backend supports it):
python quantize_model.py --input-model banknote_embedder_finetuned.pth
Additional output:
banknote_embedder_int8_dynamic.pth
Quick Test
Run similarity test:
python test.py --weights banknote_embedder_fp16.safetensors --img1 notes/20.jpg --img2 notes/20.jpg --img3 notes/22.jpg
Expected behavior:
img1 vs img2should be high (often close to1.0for identical image)img1 vs img3should be lower
Usage Notes
- Input preprocessing uses ImageNet normalization and
224x224resize. - Embeddings are L2-normalized in the model forward pass.
xFormers is not availablewarnings are expected and non-fatal.
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support