How aravind-aripaka/fed-tumour-segmentation works
Project type and purpose
• This is an open-source, federated learning research tool focused on medical image segmentation.
• It simulates multiple “virtual hospitals” that collaboratively train a U-Net-16 model on MRI brain scans (e.g., BraTS) without sharing raw data.
• The goal is to build a privacy-preserving pipeline for clinical decision support in oncology.
File structure
• Top-level scripts:
• preprocess.py – contains image normalization, cropping, augmentation logic.
• dataset.py – handles data loading and partitioning into simulated hospital shards.
• model.py – defines the U-Net-16 architecture (likely using PyTorch or TensorFlow).
• train_baseline.py – single-site training loop for benchmarking.
• checker.py – evaluation/validation metrics and sanity checks on predictions.
• requirements*.txt – Python dependencies (e.g., torch, nibabel, numpy).
• BraTS20 Training Metadata.csv – raw metadata for partitioning.
• No explicit “server/” or “client/” directories – federated logic is embedded in these scripts.
README for additional insights
• “[F]ederated … multiple virtual hospitals collaboratively train … without compromising patient confidentiality.”
• Mentions public MRI datasets partitioned to simulate institutions.
• Emphasizes privacy-preserving AI, clinical decision support, and strict data regulations.
a. Main components
1. Data Storage: raw MRI scans + metadata CSV
2. Preprocessing Module (preprocess.py)
3. Data Partitioning / Client Simulator (dataset.py)
4. Local Training Clients (“Hospitals”)
– Each runs train_baseline.py (or its federated equivalent)
– Loads a data shard, applies preprocess, feeds model
5. Model Definition (model.py) – U-Net-16 module shared by clients and server
6. Federated Aggregator (Parameter Server)
7. Evaluation/Checker (checker.py)
8. Dependency Layer – Python runtime, PyTorch/TensorFlow, nibabel, numpy
b. Relationships & data-flow
• Partition shards flow to multiple Client nodes
• Clients load Model Definition and run local training
• Clients send model weight deltas/gradients to Aggregator
• Aggregator performs FedAvg (or similar) and returns updated global weights
• Clients receive updated weights for next round
• After convergence, outputs flow to Checker/Evaluation module
c. Architectural patterns
• Federated Learning (Parameter-Server model)
• Modular ML Pipeline (ETL → Data Loader → Model → Training → Evaluation)
• Separation of concerns: preprocessing, data handling, model spec, training loops
d. Key technologies & libraries
• Python 3.x ● PyTorch or TensorFlow ● nibabel (for NIfTI)
• numpy, pandas (metadata CSV)
• Possible FL frameworks (e.g., Flower or PySyft) for future extension