Sharath's Model Zoo
Collection
All the models I have contributed to so far β’ 5 items β’ Updated
Few-shot image recognition using a Siamese Network trained on Omniglot. Recognises new character classes from as little as a single example.
| Configuration | Accuracy |
|---|---|
| 5-way 1-shot | 95.10% |
| 5-way 5-shot | 97.07% |
| 10-way 1-shot | 90.05% |
| 10-way 5-shot | 94.83% |
Evaluated on 145 unseen test classes (never seen during training).
siamese-few-shot/
βββ src/
β βββ dataset.py # SiamesePairDataset + EpisodeDataset
β βββ model.py # EmbeddingNet + SiameseNet
β βββ loss.py # ContrastiveLoss
β βββ train.py # Training + validation loop
β βββ run_training.py # Main training entry point
β βββ eval.py # N-way K-shot episodic evaluation
β βββ demo.py # Gradio demo
βββ checkpoints/
β βββ best.pt
β βββ siamese_embedding.onnx
βββ data/
β βββ class_split.json
βββ requirements.txt
βββ README.md
git clone https://huggingface.co/<your-username>/siamese-few-shot
cd siamese-few-shot
pip install -r requirements.txt
# Run Gradio demo
cd src && python demo.py
# Run episodic evaluation
cd src && python eval.py
# Retrain from scratch
cd src && python run_training.py
torch>=2.0
torchvision>=0.15
timm
gradio
onnx
onnxruntime-gpu
pillow
numpy
matplotlib
scikit-learn
tqdm
wandb
Upload any two handwritten character images. The model returns a cosine similarity score and a same / different class decision.
Trained on Latin, Greek, Cyrillic, Japanese, and 25 other alphabets via the Omniglot dataset. Also tested on Indian script characters (Tamil, Hindi, Telugu, Kannada, Bengali, Malayalam, Gujarati, Punjabi).