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.
To get started with these examples, please follow the Quickstartin the NVIDIA FLARE Documentation. This walks you through installation, creating a POC workspace, and deploying your first NVIDIA FLARE Application. The following examples will detail any additional requirements in their 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 TensorFlow
- Example of using NVIDIA FLARE an image classifier using FedAvg and TensorFlow as the deep learning training framework.
- Federated Learning with CIFAR-10
- Simulated Federated Learning with CIFAR-10
- Real-world Federated Learning with CIFAR-10
- Includes instructions on running FedAvg with streaming of TensorBoard metrics to the server during training and homomorphic encryption.
- Federated XGBoost
- Includes examples of histogram-based algorithm, tree-based. Tree-based algorithms also includes bagging and cyclic approaches
- NVFlare + MONAI integration
- For an example of using NVIDIA FLARE to train a 3D medical image analysis model using federated averaging (FedAvg) and MONAI Bundle, see ../integration/monai/examples/README.md.
- 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 Statistic Overview
- Discuss the overall federated statistics features
- Federated Statistics for Medical Imaging
- Example of gathering local image histogram to compute the global dataset histograms.
- Federated Statistics for DataFrame
- Example of gathering local statistics summary from Pandas DataFrame to compute the global dataset statistics.
- Federated Policies
- Discuss the federated site policies for authorization, resource and data privacy management
- Hello PyTorch with TensorBoard Streaming
- Example building upon Hello PyTorch showcasing the TensorBoard streaming capability from the clients to the server.