Skip to content

This repository contains working code base of MONAI-FL.

Notifications You must be signed in to change notification settings

pawelpreczynski-digica/monaifl

 
 

Repository files navigation


MONAI-FL

This repository contains the basic federated learning example of monai code considering substra's opener and algo classes.

Table of Contents

  1. About The Project
  2. Getting Started
  3. Usage
  4. Roadmap
  5. Contributing
  6. License
  7. Contact
  8. Acknowledgements

About The Project

MONAI-FL is planned to be a tool-agnostic federated learning platform for medical imaging applications. We envision the below-mentioned architecture for our code-base, however, please feel free to modify the code-base considering your own application requirements.

MONAI-FL

Built With

Getting Started

To get a local copy up and running follow these simple steps.

Prerequisites

Following platforms are neccessary to run this project.

  • Linux Installation (preferably Ubuntu distributions). [For other Operating Systems, you can try and share your experience with us :-)]

  • install visual studio code

    https://code.visualstudio.com/docs/setup/linux
  • install conda environment

    https://docs.conda.io/en/latest/

Installation

  1. Clone the repo
    git clone https://github.com/habibcomsats/monaifl.git
  2. Create conda environment
    conda create -n monaifl python=3
  3. Activate conda environment
    conda activate monaifl
  4. Install your system compatible pytorch version
    https://pytorch.org/get-started/locally/
  5. Install MONAI with Nibabel and TQDM
https://docs.monai.io/en/latest/installation.html
  1. Install grpc with python compiler
python -m pip install grpcio
python -m pip install grpcio-tools
  1. Install Pandas
conda install pandas
  1. Install Numpy
conda install numpy

Usage

Reference notebook

https://github.com/Project-MONAI/tutorials/blob/master/2d_classification/mednist_tutorial.ipynb

Mount the dataset: This repository contains the demo dataset. If you are cloning this repository, you do not need to mount any dataset. Otherwise, you must execute the cell 5 from the reference notebook, extract the dataset at your preferred location and set the path in testmonai.py

Running Server:

  1. Open a new terminal
  2. Activate conda environment
  3. Navigate into code repository (currently it is not dockerized)
$ cd monaifl
  1. Run the server@($monaifl/)
  python aggregator/coordinator/src/server.py

Running Client:

  1. Open a new terminal
  2. Activate conda environment
  3. Navigate into code repository (currently it is not dockerized)
$ cd monaifl
  1. Run the client@($monaifl/)
python trainer/substra/testmonai.py

CAUTION: The server side code does not require any GPU installation but for the client side you must have a CUDA-enabled device to initiate the training.

Roadmap

See the open issues for a list of proposed features (and known issues).

Contributing

Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. Commit your Changes (git commit -m 'Add some AmazingFeature')
  4. Push to the Branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

License

Distributed under the MIT License. See LICENSE for more information.

Contact

Habib Rehman - @habibcomsats - email (habibcomsats@gmail.com or mhrehman@ieee.org)

Project Link: https://github.com/habibcomsats/monaifl

Acknowledgements

About

This repository contains working code base of MONAI-FL.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published