Nepali Banknote Models
A collection of models for the bankNotes-OCR pipeline β a hierarchical 2-stage banknote retrieval system for Nepalese banknotes.
Pipeline Overview
Query Image
βββ Stage 0: ConvNeXt Binary Classifier (banknote vs. random)
βββ Stage 1a: YOLO Denomination Detector (11 classes)
βββ Stage 1b: RFDETR + Swin Signature Classifier (20 governors)
βββ Stage 2: DinoV2-Base patch embeddings + Qdrant vector search
Models in this Repo
1. best_model.pth β ConvNeXt Tiny Binary Classifier
|
|
| Architecture |
convnext_tiny (torchvision) |
| Purpose |
Stage 0 β banknote vs. random image validation |
| Classes |
2: random (0), banknote (1) |
| Input |
224Γ224 RGB, ImageNet normalization |
2. best.pt β YOLO Denomination Detector
|
|
| Architecture |
YOLO (Ultralytics) |
| Purpose |
Stage 1a β detect & classify banknote denomination |
| Classes |
11: 1, 2, 5, 10, 20, 25, 50, 100, 250, 500, 1000 |
| Input |
640Γ640 RGB |
3. detector.pth β RFDETR-Large Signature Detector
|
|
| Architecture |
RFDETRLarge (rfdetr) |
| Purpose |
Stage 1b β detect governor signature region on banknote |
| Detection threshold |
0.3 |
4. classifier.pth β Swin-Base Signature Classifier
|
|
| Architecture |
swin_base_patch4_window7_224 (timm) |
| Purpose |
Stage 1b β classify cropped signature into governor |
| Classes |
20 Nepali governors |
| Input |
224Γ224 RGB, ImageNet normalization |
Governor Classes
Bharat_Raj_Pandey, Bhekh_Bahadur_Thapa, Bijaynath_Bhattarai, Chiranjibi_Nepal, Dipendra_Purush_Dhakal, Ganesh_Bahadur_Thapa, Hari_Shankar_Tripathi, Himalaya_SJB_Rana, Janak_Raj_Pandey, Kalyan_Bikram_Adhikari, Krishna_Bahadur_Manandhar, Kul_Sekhar_Sharma, Laxmi_Nath_Gautam, Maha_Prasad_Adhikari, Narendra_Raj_Pandey, Pradhumna_Lal_Rajbhandari, Satyendra_Pyara_Shrestha, Tilak_Bahadur_Rawal, Yadav_Prasad_Pant, Yubaraj_Khatiwada
Additional Model (not in this repo)
| Model |
Source |
Purpose |
| DinoV2-Base |
facebook/dinov2-base |
Stage 2 β patch-level embeddings for visual similarity search |
Usage
All models are loaded via huggingface_hub:
from huggingface_hub import hf_hub_download
model_path = hf_hub_download(repo_id="MANTRAIDEAS1/nepali-banknote-models", filename="best_model.pth")
model_path = hf_hub_download(repo_id="MANTRAIDEAS1/nepali-banknote-models", filename="best.pt")
model_path = hf_hub_download(repo_id="MANTRAIDEAS1/nepali-banknote-models", filename="detector.pth")
model_path = hf_hub_download(repo_id="MANTRAIDEAS1/nepali-banknote-models", filename="classifier.pth")
License
MIT