NVIDIA FLARE provides several examples to help you get started using federated learning for your own applications.
The provided examples cover different aspects of NVIDIA FLARE, such as using the provided Controllers for "scatter and gather" or "cyclic weight transfer" workflows and example Executors to implement your own training and validation pipelines. Some examples use the provided "task data" and "task result" Filters for homomorphic encryption and decryption or differential privacy. Furthermore, we show how to use different components for FL algorithms such as FedAvg, FedProx, and FedOpt. We also provide domain-specific examples for deep learning and medical image analysis.
NOTE: To run examples, please follow the instructions for Installation and any additional steps specified in the example readmes.
- Hello Scatter and Gather
- Example using "ScatterAndGather" controller workflow.
- Hello Cross-Site Validation
- Example using CrossSiteModelEval controller workflow.
- Hello Cyclic Weight Transfer
- Example using CyclicController controller workflow to implement Cyclic Weight Transfer.
- Hello PyTorch
- Example using NVIDIA FLARE an image classifier using FedAvg and PyTorch as the deep learning training framework.
- Hello PyTorch with TensorBoard
- Example building upon Hello PyTorch showcasing the TensorBoard streaming capability from the clients to the server.
- Hello TensorFlow
- Example of using NVIDIA FLARE an image classifier using FedAvg and TensorFlow as the deep learning training framework.
- Federated Learning with CIFAR-10
- Includes examples of using FedAvg, FedProx, FedOpt, SCAFFOLD, homomorphic encryption, and streaming of TensorBoard metrics to the server during training.
- Hello MONAI
- Example using NVIDIA FLARE to train a medical image analysis model using FedAvg and MONAI
- Federated Learning with Differential Privacy for BraTS18 segmentation
- Illustrates the use of differential privacy for training brain tumor segmentation models using federated learning.
- Federated Learning for Prostate Segmentation from Multi-source Data
- Federated Analysis
- Example of gathering local data summary statistics to compute the global dataset statistics.