A from-scratch implementation of vision models for image classification, served via a Flask API and deployed at argus.iashyam.in.
Upload any image, get a classification label from 1000 ImageNet categories. The backend runs custom-trained vision models built entirely in PyTorch — no pretrained backbone dependencies at inference time.
| Model | Paper | Weights |
|---|---|---|
| SimpleCNN | Custom architecture | Trained on CIFAR-100 |
| MobileNet V2 | MobileNetV2: Inverted Residuals and Linear Bottlenecks | burrah_mobilenet_v1.pth |
Both models are implemented from scratch in src/models/.
- Framework: PyTorch + Flask
- ETL: Custom
ImageDatasetpipeline (src/ETL/) - Training:
Trainerclass with train/eval loops, tqdm progress (src/Train/) - Experiment tracking: MLFlow
- CI: GitHub Actions (lint + pytest on push to
main) - Deployment: Docker + Cloudflare Tunnel
src/
models/ # SimpleCNN and MobileNet V2 implementations
ETL/ # Dataset loading and preprocessing
Train/ # Training loop (Trainer class)
utils/ # ImageNet 1000-class label map
weights/ # Saved model weights
Data/ # CIFAR-10 and CIFAR-100 datasets
tests/ # pytest test suite
cp .env.example .env
# Add your CLOUDFLARE_TUNNEL_TOKEN to .env (optional, only needed for tunnel)
docker compose upApp runs at localhost:5911.
pip install .
# run the Flask app
python -m appfrom src.Train.train import Trainer
import torch
trainer = Trainer(model, criterion, optimizer, device=torch.device("cuda"))
history = trainer.train_loop(n_epochs=20, train_dataloader=..., test_dataloader=...)CIFAR-10 and CIFAR-100 batches are in Data/. To download:
python Data/Download.py- Containerize the model with Docker.
- Put automated testing with github actions.
- Deploy the model to server.
- Write a ETL pipeline.
- Write training loop.
- Write documentation for ETL.
- Use ML Flow for experiment tracking
- User DVC pipelines.
- Run some basic experiments.
Personal project, not accepting contributions right now. EfficientNet is next.