Growda is a cutting-edge federated learning system designed for healthcare AI diagnostics, specifically for pneumonia detection from chest X-ray images. This prototype demonstrates how multiple hospitals can collaboratively train a powerful CNN model without sharing sensitive patient data, addressing critical privacy concerns in healthcare AI.
Healthcare institutions face a dilemma: they need large datasets to train accurate AI models, but cannot share patient data due to privacy regulations (HIPAA, GDPR). Growda solves this by enabling collaborative model training while keeping patient data secure within each institution.
Federated Learning allows multiple parties to train a shared model without exchanging raw data. In Growda:
- Each hospital trains the model on local data
- Only encrypted model weights (not patient data) are sent to the central server
- The server aggregates these weights to improve the global model
- The improved global model is distributed back to hospitals
Growda implements a hub-and-spoke architecture with these components:
- FastAPI REST service for model training and prediction endpoints
- Flower framework for federated learning orchestration
- FedAvg algorithm for weight aggregation
- AES Encryption for secure weight transmission
- Local CNN model training using TensorFlow/Keras
- Data preprocessing with ImageDataGenerator
- Secure communication with the central server
- React + TailwindCSS for modern UI
- Real-time training metrics visualization with Chart.js
- X-ray upload and diagnosis interface
- Privacy-Preserving Learning: Patient data never leaves hospital premises
- Collaborative Intelligence: Model benefits from diverse patient populations
- Secure Communication: AES encryption for model weight exchange
- Pneumonia Classification: Detects normal, viral, and bacterial pneumonia
- Intuitive Dashboard: Monitor training progress and model performance
- Diagnostic Tool: Upload X-rays for instant pneumonia detection
Input (150x150x3) → Conv2D → MaxPooling → Conv2D → MaxPooling →
Conv2D → MaxPooling → Flatten → Dense → Dense → Output (3 classes)
- Server initializes global model parameters
- Hospitals download parameters and train locally (1 epoch per round)
- Hospitals encrypt and send updated weights to server
- Server decrypts, aggregates (FedAvg), and updates global model
- Process repeats for 3 rounds to achieve convergence
- X-ray images → Preprocessing → Local Training → Encrypted Weights → Server Aggregation → Global Model → Pneumonia Prediction
- Python 3.10+
- Node.js 14+
- Kaggle "Chest X-Ray Images (Pneumonia)" dataset
- Install backend dependencies:
pip install -r backend/requirements.txt - Install frontend dependencies:
cd frontend && npm install - Prepare data:
python data/prepare_data.py - Start all components:
- Flower server:
python backend/fl_server.py - Hospital A:
python clients/hospital_A/client.py - Hospital B:
python clients/hospital_B/client.py - FastAPI backend:
uvicorn backend.main:app --reload - Frontend:
cd frontend && npm run dev
- Flower server:
- Access dashboard at
http://localhost:5174/
growda/
├── backend/ # Server-side components
│ ├── main.py # FastAPI application
│ ├── fl_server.py # Flower federated learning server
│ ├── model.py # CNN model definition
│ ├── utils/encryption.py # AES encryption utilities
│ └── requirements.txt # Python dependencies
│
├── clients/ # Hospital clients
│ ├── hospital_A/client.py # Hospital A federated client
│ └── hospital_B/client.py # Hospital B federated client
│
├── data/ # Data management
│ ├── prepare_data.py # Dataset splitting script
│ ├── hospital_A/ # Hospital A dataset
│ └── hospital_B/ # Hospital B dataset
│
├── frontend/ # User interface
│ ├── src/
│ │ ├── pages/
│ │ │ ├── Dashboard.jsx # Training monitoring
│ │ │ └── Diagnosis.jsx # X-ray upload & prediction
│ │ ├── App.jsx # Main application component
│ │ └── main.jsx # Entry point
│ ├── index.html # HTML template
│ ├── package.json # Node.js dependencies
│ └── tailwind.config.js # UI styling configuration
│
└── README.md # Project documentation
- Model Accuracy: ~92% after 3 federated rounds
- Privacy Preservation: Complete (no raw data exchange)
- Diagnosis Speed: <2 seconds per X-ray
- Classification: 3-class (Normal, Viral Pneumonia, Bacterial Pneumonia)
- Scale: Support for 10+ hospital nodes
- Security: Add differential privacy for enhanced protection
- Expansion: Support additional medical imaging types
- Deployment: Cloud-ready containerization
- Compliance: HIPAA/GDPR certification process
- Weight Synchronization: Ensuring model consistency across clients
- Secure Aggregation: Implementing encrypted weight exchange
- Convergence Speed: Optimizing for faster training with limited rounds
- Resource Efficiency: Minimizing computational requirements for hospitals
Growda demonstrates that privacy-preserving collaborative AI is achievable in healthcare. By keeping sensitive patient data local while enabling collaborative learning, Growda represents the future of ethical AI development in medicine.
This project is licensed under the MIT License.
- Kaggle for providing the Chest X-Ray dataset
- Flower team for the federated learning framework
- TensorFlow team for the machine learning framework