Skip to content

PriyaranjanMarathe/medgemma-poc

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MedGemma POC

A proof-of-concept medical image analysis application powered by MedGemma 1.5 4B-it.

⚠️ EXPERIMENTAL RESEARCH TOOL ONLY

  • Outputs may contain hallucinations, factual errors, or dangerous suggestions
  • NOT VALIDATED FOR CLINICAL USE — Do not use for diagnosis, treatment, or patient care
  • Follow HAI-DEF terms; attribute properly; validate rigorously before any real-world extension

Stack

Layer Technology
Frontend Bun + Vite + Svelte
Backend UV + FastAPI + SQLite
ML MedGemma 1.5 4B-it (via transformers)
Task Runner just

Prerequisites

Hardware Requirements

Setup Memory Notes
Apple Silicon (M1/M2/M3/M4) 16GB+ unified Uses MPS backend
NVIDIA GPU 16GB+ VRAM Or 8GB with 4-bit quantization
CPU only 32GB+ RAM Very slow (~60s/image), not recommended

Quick Start

# 1. Clone and enter project
cd medgemma-poc

# 2. Run setup script
./scripts/setup.sh

# 3. Set your Hugging Face token
cp .env.example .env
# Edit .env and add your HF_TOKEN

# 4. Start development servers
just dev

Development Commands

just dev        # Start both frontend and backend
just frontend   # Start frontend only
just backend    # Start backend only
just test       # Run all tests
just lint       # Lint all code
just format     # Format all code
just clean      # Clean build artifacts

Project Structure

medgemma-poc/
├── frontend/         # Bun + Vite + Svelte
├── backend/          # UV + FastAPI
├── ml/               # ML inference, evaluation, preprocessing
├── data/             # Local data (gitignored)
├── .github/          # CI/CD workflows
├── docker/           # Container definitions
├── scripts/          # Setup and utility scripts
└── docs/             # Documentation

API Endpoints

Method Endpoint Description
POST /api/analyze Analyze medical image(s) with prompt
GET /api/history Get conversation history
DELETE /api/history/{id} Delete conversation
GET /api/health Health check

License

MIT — See LICENSE

Acknowledgments

  • MedGemma by Google Health AI
  • Built following HAI-DEF (Health AI Developer Foundations) guidelines

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors