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
| Layer | Technology |
|---|---|
| Frontend | Bun + Vite + Svelte |
| Backend | UV + FastAPI + SQLite |
| ML | MedGemma 1.5 4B-it (via transformers) |
| Task Runner | just |
- Bun ≥1.0 — https://bun.sh
- UV ≥0.4 — https://docs.astral.sh/uv/
- Python 3.11+ (managed via UV)
- Hugging Face account with MedGemma access granted
| 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 |
# 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 devjust 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 artifactsmedgemma-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
| 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 |
MIT — See LICENSE
- MedGemma by Google Health AI
- Built following HAI-DEF (Health AI Developer Foundations) guidelines