An AI-assisted radiology platform that integrates HOPPR AI for medical imaging analysis, enabling radiologists to annotate DICOM images side-by-side with AI findings and visualize consensus regions.
This project combines:
- Frontend: React + TypeScript + Vite web application for DICOM viewing and annotation
- AI Backend: Flask API server with HOPPR AI integration for chest radiography analysis
- Features: Side-by-side comparison, consensus highlighting, combined overlay, and multi-model AI analysis
- React 18
- TypeScript
- Vite
- shadcn-ui components
- Tailwind CSS
- React Router
- TanStack Query
- Python 3
- Flask (REST API server)
- Flask-CORS
- HOPPR AI SDK (
hopprai) - DICOM image processing
- Cornerstone.js (DICOM rendering)
- Node.js & npm (install with nvm)
- Python 3.x
- HOPPR AI API key (get one from HOPPR)
-
Clone the repository
git clone <YOUR_GIT_URL> cd MTCHacks-2025
-
Set up the frontend
# Install Node dependencies npm install -
Set up the Python backend
# Create and activate virtual environment python3 -m venv venv source venv/bin/activate # On macOS/Linux # or: venv\Scripts\activate # On Windows # Install Python dependencies pip install hopprai python-dotenv flask flask-cors
-
Configure environment variables
Create a
.envfile in the project root:HOPPR_API_KEY=your_api_key_here
Start the backend API server (in one terminal):
source venv/bin/activate
python api_server.pyStart the frontend development server (in another terminal):
npm run devTest the HOPPR AI integration:
source venv/bin/activate
python test_hoppr.pyMTCHacks-2025/
├── src/ # React frontend source
│ ├── components/ # UI components
│ │ ├── Demo.tsx # Main interactive demo
│ │ ├── AnnotatableDicomViewer.tsx # Annotation interface
│ │ ├── CombinedDicomViewer.tsx # Combined overlay view
│ │ └── DicomViewerWithOverlay.tsx # AI findings overlay
│ ├── pages/ # Page components
│ ├── hooks/ # Custom React hooks
│ └── lib/ # Utility functions
├── public/ # Static assets
├── api_server.py # Flask REST API server
├── hoppr_model.py # HOPPR AI integration module
├── pathology_utils.py # Pathology region mapping
├── test_hoppr.py # AI model test script
├── main.py # Example HOPPR usage
├── dicom_images/ # Sample DICOM files
├── venv/ # Python virtual environment
└── .env # Environment variables (not in git)
- Side-by-Side Comparison: View clinician annotations next to AI findings simultaneously
- Interactive Annotations: Click to add annotations with custom comments on DICOM images
- Combined Overlay: Merge both clinician and AI views with visual consensus highlighting
- Consensus Detection: Automatically detect and highlight regions where AI and clinician agree (green glow)
- Multi-Model AI Analysis: Analyze images across 13+ chest pathology models via HOPPR AI
- Anatomically Accurate Regions: AI findings mapped to medically appropriate locations on X-rays
- Real-time Analysis: Instant AI inference with visual feedback
The hoppr_model.py module provides a simple interface:
from hoppr_model import HopprModelInterface
# Initialize the model
model = HopprModelInterface()
# Analyze a DICOM image
results = model.analyze_dicom_image("path/to/scan.dcm")
# Access AI insights
if results["success"]:
insights = results["results"]
print(insights)Atelectasis, Cardiomegaly, Pneumothorax, Lung Opacity, Pleural Effusion, Consolidation, Infiltration, Pleural Thickening, Aortic Enlargement, Calcification, Pulmonary Fibrosis, ILD, and Normal
Frontend:
npm run dev # Start dev server
npm run build # Build for production
npm run lint # Run linterPython/AI:
# Always activate venv first
source venv/bin/activate
# Test AI integration
python test_hoppr.py
# Run example
python main.py| Variable | Description | Required |
|---|---|---|
HOPPR_API_KEY |
Your HOPPR AI API key | Yes |
Synapse is a hackathon prototype intended for research and educational purposes only. This is not a medical device and is not approved for primary diagnostic use. All images shown are de-identified. Clinical decisions must be made by licensed healthcare professionals. The developers assume no liability for clinical outcomes.
This project was built for MTCHacks 2025.
MIT License - See LICENSE file for details.