Empowering 3.5 million CHWs to provide accurate, immediate health assessments in resource-limited settings using HAI-DEF models.
| Criteria | Weight | Our Solution |
|---|---|---|
| HAI-DEF Usage | 20% | ✅ MedGemma-4B-IT (multimodal), MedGemma-27B-text (reasoning), MedSigLIP (vision), HeAR (audio) |
| Problem Domain | 15% | ✅ CHW shortage in LMICs - 18M shortage per WHO; clear user journey defined |
| Impact Potential | 15% | ✅ 200K+ lives/year impact estimated; ROI model included |
| Product Feasibility | 20% | ✅ Full technical docs, fine-tuning pipeline, deployment strategy, edge quantization |
| Execution & Communication | 30% | ✅ 3-min video, 3-page writeup, organized codebase, live demo |
An offline-capable, multimodal diagnostic assistant that:
┌─────────────────────────────────────────────────────────────────┐
│ CommunityMed AI Platform │
├─────────────────────────────────────────────────────────────────┤
│ 📱 Mobile App (Flutter) │
│ ├── Offline-first design with sync │
│ ├── Voice input (multilingual) │
│ └── Camera integration for X-rays │
├─────────────────────────────────────────────────────────────────┤
│ 🤖 Agentic Workflow Layer │
│ ├── Orchestrator Agent → Routes to specialists │
│ ├── Radiology Agent → MedGemma-4B-IT + MedSigLIP │
│ ├── Clinical Reasoning Agent → MedGemma-27B-text │
│ ├── Audio Analysis Agent → HeAR (lung sounds) │
│ └── Triage Agent → Risk stratification │
├─────────────────────────────────────────────────────────────────┤
│ 🧠 HAI-DEF Model Stack │
│ ├── MedGemma-4B-IT: Multimodal radiology analysis │
│ ├── MedGemma-27B-text: Clinical reasoning & synthesis │
│ ├── MedSigLIP: Medical image embeddings │
│ ├── HeAR: Lung sound analysis │
│ └── Fine-tuned LoRA adapters for TB/tropical diseases │
├─────────────────────────────────────────────────────────────────┤
│ 💾 Data Layer │
│ ├── Local SQLite for offline │
│ ├── Redis for session caching │
│ └── PostgreSQL for sync │
└─────────────────────────────────────────────────────────────────┘
MedGemma/
├── README.md # This file
├── requirements.txt # Python dependencies
├── pyproject.toml # Modern Python package config
├── Dockerfile # Container deployment
├── docker-compose.yml # Multi-service orchestration
├── LICENSE # MIT License
├── .gitignore # Git ignore patterns
│
├── config/ # Configuration files
│ ├── model_config.yaml # HAI-DEF model paths and settings
│ └── training_config.yaml # QLoRA fine-tuning hyperparameters
│
├── src/ # Source code
│ ├── models/ # Model implementations
│ │ ├── medgemma_loader.py # 🌟 MedGemma 1.5/4B/27B with quantization
│ │ ├── hear_loader.py # 🎤 HeAR audio embeddings (Novel Task)
│ │ ├── medsiglip_loader.py # 🖼️ MedSigLIP image embeddings
│ │ └── fine_tuning.py # QLoRA fine-tuning pipeline
│ │
│ ├── agents/ # Agentic workflow (Prize Target!)
│ │ ├── orchestrator.py # Multi-agent routing
│ │ ├── radiology_agent.py # X-ray analysis (MedGemma-4B)
│ │ ├── clinical_agent.py # Clinical reasoning (MedGemma-27B)
│ │ ├── audio_agent.py # Cough analysis (HeAR)
│ │ └── triage_agent.py # Risk stratification
│ │
│ ├── demo/ # Interactive demos
│ │ └── gradio_app.py # 🎯 Live Gradio demo app
│ │
│ ├── api/ # FastAPI backend
│ │ ├── main.py # Application entry
│ │ ├── routes.py # REST endpoints
│ │ └── schemas.py # Pydantic schemas
│ │
│ └── utils/ # Utilities
│ └── impact_calculator.py # WHO-based impact metrics
│
├── examples/ # Usage examples
│ └── tb_screening_demo.py # 🏥 End-to-end TB screening
│
├── scripts/ # Utility scripts
│ ├── benchmark.py # ⚡ Performance benchmarking
│ ├── train.py # Training script
│ └── evaluate.py # Evaluation script
│
├── submission/ # Kaggle submission materials
│ ├── writeup.md # 3-page writeup (competition template)
│ ├── video_script.md # 3-min video script
│ └── impact_analysis.md # WHO-cited impact model
│
├── tests/ # Unit tests
│ ├── test_models.py # Model loading tests
│ ├── test_haidef_models.py # HeAR/MedSigLIP tests
│ └── test_api.py # API endpoint tests
│
└── notebooks/ # Jupyter notebooks
├── 01_data_exploration.ipynb
├── 02_fine_tuning.ipynb
└── 03_evaluation.ipynb
# Clone repository
git clone https://github.com/dihannahdi/communitymed-ai.git
cd communitymed-ai
# Create virtual environment
python -m venv venv
source venv/bin/activate # Linux/Mac
# or: venv\Scripts\activate # Windows
# Install dependencies
pip install -r requirements.txt
# Login to HuggingFace (requires token with model access)
huggingface-cli login
# Run end-to-end TB screening demo (mock mode)
python examples/tb_screening_demo.py
# Launch interactive Gradio demo
python -m src.demo.gradio_app
# Benchmark HAI-DEF models
python scripts/benchmark.py --model hear --samples 100
python scripts/benchmark.py --model medsiglip --samples 100
# Full MedGemma benchmark (requires GPU)
python scripts/benchmark.py --model medgemma-4b-it --samples 50
# Start FastAPI server
uvicorn src.api.main:app --host 0.0.0.0 --port 8000
# Download datasets
python scripts/download_datasets.py
# Fine-tune MedGemma with QLoRA
python scripts/train.py --config config/training_config.yaml
Evidence-based methodology using WHO data - see submission/impact_analysis.md
| Metric | Year 1 (Pilot) | Year 3 (Scale) | Source |
|---|---|---|---|
| CHWs Empowered | 10,000 | 200,000 | Deployment plan |
| Patients Screened | 62.5M | 1.25B | 25 patients/CHW/day |
| TB Cases Detected | 159,000 | 3.2M | 17% prevalence |
| Lives Saved | 9,500 | 195,000 | WHO mortality data |
| Cost per Life Saved | $246 | $128 | Full ROI model |
| ROI | 2,458% | 9,831% | Cost-benefit analysis |
| Model | Parameters | Task | Prize Target |
|---|---|---|---|
| MedGemma-1.5-4B-IT | 4.3B | Multimodal radiology | Main Track |
| MedGemma-27B-text-IT | 27B | Clinical reasoning | Main Track |
| HeAR | 768-dim | Cough audio analysis | Novel Task ($10K) |
| MedSigLIP | 1.2B | Zero-shot image classification | Edge AI |
This project is licensed under CC BY 4.0 as required by the competition.
5 commits
Python
87.8%
Jupyter Notebook
8.4%
Shell
2.0%
PowerShell
1.4%
Empowering 3.5 million CHWs to provide accurate, immediate health assessments in resource-limited settings using HAI-DEF models.
| Criteria | Weight | Our Solution |
|---|---|---|
| HAI-DEF Usage | 20% | ✅ MedGemma-4B-IT (multimodal), MedGemma-27B-text (reasoning), MedSigLIP (vision), HeAR (audio) |
| Problem Domain | 15% | ✅ CHW shortage in LMICs - 18M shortage per WHO; clear user journey defined |
| Impact Potential | 15% | ✅ 200K+ lives/year impact estimated; ROI model included |
| Product Feasibility | 20% | ✅ Full technical docs, fine-tuning pipeline, deployment strategy, edge quantization |
| Execution & Communication | 30% | ✅ 3-min video, 3-page writeup, organized codebase, live demo |
An offline-capable, multimodal diagnostic assistant that:
┌─────────────────────────────────────────────────────────────────┐
│ CommunityMed AI Platform │
├─────────────────────────────────────────────────────────────────┤
│ 📱 Mobile App (Flutter) │
│ ├── Offline-first design with sync │
│ ├── Voice input (multilingual) │
│ └── Camera integration for X-rays │
├─────────────────────────────────────────────────────────────────┤
│ 🤖 Agentic Workflow Layer │
│ ├── Orchestrator Agent → Routes to specialists │
│ ├── Radiology Agent → MedGemma-4B-IT + MedSigLIP │
│ ├── Clinical Reasoning Agent → MedGemma-27B-text │
│ ├── Audio Analysis Agent → HeAR (lung sounds) │
│ └── Triage Agent → Risk stratification │
├─────────────────────────────────────────────────────────────────┤
│ 🧠 HAI-DEF Model Stack │
│ ├── MedGemma-4B-IT: Multimodal radiology analysis │
│ ├── MedGemma-27B-text: Clinical reasoning & synthesis │
│ ├── MedSigLIP: Medical image embeddings │
│ ├── HeAR: Lung sound analysis │
│ └── Fine-tuned LoRA adapters for TB/tropical diseases │
├─────────────────────────────────────────────────────────────────┤
│ 💾 Data Layer │
│ ├── Local SQLite for offline │
│ ├── Redis for session caching │
│ └── PostgreSQL for sync │
└─────────────────────────────────────────────────────────────────┘
MedGemma/
├── README.md # This file
├── requirements.txt # Python dependencies
├── pyproject.toml # Modern Python package config
├── Dockerfile # Container deployment
├── docker-compose.yml # Multi-service orchestration
├── LICENSE # MIT License
├── .gitignore # Git ignore patterns
│
├── config/ # Configuration files
│ ├── model_config.yaml # HAI-DEF model paths and settings
│ └── training_config.yaml # QLoRA fine-tuning hyperparameters
│
├── src/ # Source code
│ ├── models/ # Model implementations
│ │ ├── medgemma_loader.py # 🌟 MedGemma 1.5/4B/27B with quantization
│ │ ├── hear_loader.py # 🎤 HeAR audio embeddings (Novel Task)
│ │ ├── medsiglip_loader.py # 🖼️ MedSigLIP image embeddings
│ │ └── fine_tuning.py # QLoRA fine-tuning pipeline
│ │
│ ├── agents/ # Agentic workflow (Prize Target!)
│ │ ├── orchestrator.py # Multi-agent routing
│ │ ├── radiology_agent.py # X-ray analysis (MedGemma-4B)
│ │ ├── clinical_agent.py # Clinical reasoning (MedGemma-27B)
│ │ ├── audio_agent.py # Cough analysis (HeAR)
│ │ └── triage_agent.py # Risk stratification
│ │
│ ├── demo/ # Interactive demos
│ │ └── gradio_app.py # 🎯 Live Gradio demo app
│ │
│ ├── api/ # FastAPI backend
│ │ ├── main.py # Application entry
│ │ ├── routes.py # REST endpoints
│ │ └── schemas.py # Pydantic schemas
│ │
│ └── utils/ # Utilities
│ └── impact_calculator.py # WHO-based impact metrics
│
├── examples/ # Usage examples
│ └── tb_screening_demo.py # 🏥 End-to-end TB screening
│
├── scripts/ # Utility scripts
│ ├── benchmark.py # ⚡ Performance benchmarking
│ ├── train.py # Training script
│ └── evaluate.py # Evaluation script
│
├── submission/ # Kaggle submission materials
│ ├── writeup.md # 3-page writeup (competition template)
│ ├── video_script.md # 3-min video script
│ └── impact_analysis.md # WHO-cited impact model
│
├── tests/ # Unit tests
│ ├── test_models.py # Model loading tests
│ ├── test_haidef_models.py # HeAR/MedSigLIP tests
│ └── test_api.py # API endpoint tests
│
└── notebooks/ # Jupyter notebooks
├── 01_data_exploration.ipynb
├── 02_fine_tuning.ipynb
└── 03_evaluation.ipynb
# Clone repository
git clone https://github.com/dihannahdi/communitymed-ai.git
cd communitymed-ai
# Create virtual environment
python -m venv venv
source venv/bin/activate # Linux/Mac
# or: venv\Scripts\activate # Windows
# Install dependencies
pip install -r requirements.txt
# Login to HuggingFace (requires token with model access)
huggingface-cli login
# Run end-to-end TB screening demo (mock mode)
python examples/tb_screening_demo.py
# Launch interactive Gradio demo
python -m src.demo.gradio_app
# Benchmark HAI-DEF models
python scripts/benchmark.py --model hear --samples 100
python scripts/benchmark.py --model medsiglip --samples 100
# Full MedGemma benchmark (requires GPU)
python scripts/benchmark.py --model medgemma-4b-it --samples 50
# Start FastAPI server
uvicorn src.api.main:app --host 0.0.0.0 --port 8000
# Download datasets
python scripts/download_datasets.py
# Fine-tune MedGemma with QLoRA
python scripts/train.py --config config/training_config.yaml
Evidence-based methodology using WHO data - see submission/impact_analysis.md
| Metric | Year 1 (Pilot) | Year 3 (Scale) | Source |
|---|---|---|---|
| CHWs Empowered | 10,000 | 200,000 | Deployment plan |
| Patients Screened | 62.5M | 1.25B | 25 patients/CHW/day |
| TB Cases Detected | 159,000 | 3.2M | 17% prevalence |
| Lives Saved | 9,500 | 195,000 | WHO mortality data |
| Cost per Life Saved | $246 | $128 | Full ROI model |
| ROI | 2,458% | 9,831% | Cost-benefit analysis |
| Model | Parameters | Task | Prize Target |
|---|---|---|---|
| MedGemma-1.5-4B-IT | 4.3B | Multimodal radiology | Main Track |
| MedGemma-27B-text-IT | 27B | Clinical reasoning | Main Track |
| HeAR | 768-dim | Cough audio analysis | Novel Task ($10K) |
| MedSigLIP | 1.2B | Zero-shot image classification | Edge AI |
This project is licensed under CC BY 4.0 as required by the competition.
5 commits
Python
87.8%
Jupyter Notebook
8.4%
Shell
2.0%
PowerShell
1.4%