This project was created for learning MRI images classifier using the Federated Learning method (McMahan B., et al., 2016).
The project structure consists of two following folders:
- distributed_federated_system - contains the implemented federated system, which can be deployed and run on multiple nodes.
- experimtents - includes federated learning experiments using differently distributed data between clients
In order to run the federated system on multiple different nodes, please, take the following steps:
- Move every single envoy_# and director (aggregator) + workspace folders to separate nodes and install required packages using
pip install -r requirements.txt
- For every envoy_# download its corresponding data from here and extract all files to the according envoy's data folder.
- On aggregator node:
-
Set
listen_host
andlisten_port
parameters in director.yaml -
Open director folder in cmd or bash and run the following command to start the director:
fx director start --disable-tls -c director_config.yaml
-
- On envoys nodes:
-
Open envoy_# folder in cmd or bash and run the following command to start the envoy:
fx envoy start -n ${ENVOY_NAME} --disable-tls --envoy-config-path envoy_config.yaml -dh ${AGGREGATOR_FQDN} -dp ${AGGREGATOR_PORT}
-
- Open experiment-manager.ipynb in Jupyter Notebook and run all of its cells.
Loss function for experiment with 4 collaborators using distributed system and model from Qu R., et al.
Loss function for experiment with 4 collaborators using simple CNN.
Loss function for experiment with 3 collaborators using simple CNN.
Client_1 train dataset distribution:
Client_1 test dataset distribution:
Client_2 train dataset distribution:
Client_2 test dataset distribution:
Client_3 train dataset distribution:
Client_3 test dataset distribution:
Client_4 train dataset distribution:
Client_4 test dataset distribution: