Spaces:
Runtime error
Runtime error
Upload README.md with huggingface_hub
Browse files
README.md
CHANGED
|
@@ -1,12 +1,106 @@
|
|
| 1 |
-
-
|
| 2 |
-
|
| 3 |
-
|
| 4 |
-
|
| 5 |
-
|
| 6 |
-
|
| 7 |
-
|
| 8 |
-
|
| 9 |
-
|
| 10 |
-
|
| 11 |
-
|
| 12 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# RadioFlow: AI-Powered Radiology Workflow Agent
|
| 2 |
+
|
| 3 |
+
> **MedGemma Impact Challenge Submission**
|
| 4 |
+
> Targeting: Main Track + Agentic Workflow Prize
|
| 5 |
+
|
| 6 |
+
## Overview
|
| 7 |
+
|
| 8 |
+
RadioFlow is a multi-agent AI system that streamlines radiology workflows by processing chest X-rays through an orchestrated pipeline of specialized agents. Built with Google's Health AI Developer Foundations (HAI-DEF) models.
|
| 9 |
+
|
| 10 |
+
## Architecture
|
| 11 |
+
|
| 12 |
+
```
|
| 13 |
+
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
|
| 14 |
+
β RADIOFLOW ORCHESTRATOR β
|
| 15 |
+
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ€
|
| 16 |
+
β β
|
| 17 |
+
β ββββββββββββββββ ββββββββββββββββ ββββββββββββββββ β
|
| 18 |
+
β β Agent 1 βββββΆβ Agent 2 βββββΆβ Agent 3 β β
|
| 19 |
+
β β CXR Analyzer β β Finding β β Report β β
|
| 20 |
+
β β β β Interpreter β β Generator β β
|
| 21 |
+
β ββββββββββββββββ ββββββββββββββββ ββββββββββββββββ β
|
| 22 |
+
β β β β
|
| 23 |
+
β β βΌ β
|
| 24 |
+
β β ββββββββββββββββ β
|
| 25 |
+
β β β Agent 4 β β
|
| 26 |
+
β βββββββββββββββββββββββββββββββΆβ Priority β β
|
| 27 |
+
β β Router β β
|
| 28 |
+
β ββββββββββββββββ β
|
| 29 |
+
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
|
| 30 |
+
```
|
| 31 |
+
|
| 32 |
+
## Agents
|
| 33 |
+
|
| 34 |
+
| Agent | Model | Function |
|
| 35 |
+
|-------|-------|----------|
|
| 36 |
+
| **CXR Analyzer** | CXR Foundation | Process chest X-ray, extract features, detect abnormalities |
|
| 37 |
+
| **Finding Interpreter** | MedGemma | Interpret visual findings into clinical language |
|
| 38 |
+
| **Report Generator** | MedGemma | Create structured radiology report |
|
| 39 |
+
| **Priority Router** | MedGemma | Assess urgency, route to care pathway |
|
| 40 |
+
|
| 41 |
+
## Quick Start
|
| 42 |
+
|
| 43 |
+
### 1. Setup Environment
|
| 44 |
+
|
| 45 |
+
```bash
|
| 46 |
+
# Create virtual environment
|
| 47 |
+
python -m venv venv
|
| 48 |
+
source venv/bin/activate # On Windows: venv\Scripts\activate
|
| 49 |
+
|
| 50 |
+
# Install dependencies
|
| 51 |
+
pip install -r requirements.txt
|
| 52 |
+
```
|
| 53 |
+
|
| 54 |
+
### 2. Configure HuggingFace Access
|
| 55 |
+
|
| 56 |
+
```bash
|
| 57 |
+
# Login to HuggingFace (required for gated models)
|
| 58 |
+
huggingface-cli login
|
| 59 |
+
```
|
| 60 |
+
|
| 61 |
+
### 3. Run the Application
|
| 62 |
+
|
| 63 |
+
```bash
|
| 64 |
+
python app.py
|
| 65 |
+
```
|
| 66 |
+
|
| 67 |
+
The Gradio interface will launch at `http://localhost:7860`
|
| 68 |
+
|
| 69 |
+
## Project Structure
|
| 70 |
+
|
| 71 |
+
```
|
| 72 |
+
radioflow/
|
| 73 |
+
βββ app.py # Main Gradio application
|
| 74 |
+
βββ requirements.txt # Python dependencies
|
| 75 |
+
βββ README.md # This file
|
| 76 |
+
βββ agents/ # Agent implementations
|
| 77 |
+
β βββ __init__.py
|
| 78 |
+
β βββ base_agent.py # Base agent class
|
| 79 |
+
β βββ cxr_analyzer.py # Agent 1: CXR Foundation
|
| 80 |
+
β βββ finding_interpreter.py # Agent 2: MedGemma
|
| 81 |
+
β βββ report_generator.py # Agent 3: MedGemma
|
| 82 |
+
β βββ priority_router.py # Agent 4: MedGemma
|
| 83 |
+
βββ orchestrator/ # Agent coordination
|
| 84 |
+
β βββ __init__.py
|
| 85 |
+
β βββ workflow.py # Workflow orchestrator
|
| 86 |
+
βββ utils/ # Utilities
|
| 87 |
+
β βββ __init__.py
|
| 88 |
+
β βββ visualization.py # Plotting and overlays
|
| 89 |
+
β βββ metrics.py # Performance tracking
|
| 90 |
+
βββ sample_data/ # Test images
|
| 91 |
+
βββ .gitkeep
|
| 92 |
+
```
|
| 93 |
+
|
| 94 |
+
## HAI-DEF Models Used
|
| 95 |
+
|
| 96 |
+
- **CXR Foundation**: [google/cxr-foundation](https://huggingface.co/google/cxr-foundation)
|
| 97 |
+
- **MedGemma**: [google/medgemma-4b-it](https://huggingface.co/google/medgemma-4b-it)
|
| 98 |
+
|
| 99 |
+
## License
|
| 100 |
+
|
| 101 |
+
This project is submitted under CC BY 4.0 as required by the competition.
|
| 102 |
+
|
| 103 |
+
## Acknowledgments
|
| 104 |
+
|
| 105 |
+
- Google Health AI Developer Foundations team
|
| 106 |
+
- MedGemma Impact Challenge organizers
|