Skip to content

Repository files navigation

Argus: Visual Intelligence at your hand

A from-scratch implementation of vision models for image classification, served via a Flask API and deployed at argus.iashyam.in.

What it does

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.

Models

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/.

Stack

  • Framework: PyTorch + Flask
  • ETL: Custom ImageDataset pipeline (src/ETL/)
  • Training: Trainer class with train/eval loops, tqdm progress (src/Train/)
  • Experiment tracking: MLFlow
  • CI: GitHub Actions (lint + pytest on push to main)
  • Deployment: Docker + Cloudflare Tunnel

Project structure

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

Run locally

Docker (recommended)

cp .env.example .env
# Add your CLOUDFLARE_TUNNEL_TOKEN to .env (optional, only needed for tunnel)

docker compose up

App runs at localhost:5911.

From source

pip install .
# run the Flask app
python -m app

Train a model

from 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=...)

Data

CIFAR-10 and CIFAR-100 batches are in Data/. To download:

python Data/Download.py

Roadmap

  • 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.

Contributing

Personal project, not accepting contributions right now. EfficientNet is next.

About

This is my implementation of Vision Model architecture. Currently it has MobilenetV2 and Effiicient Net.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages