Flexe is a new framework for simulation of Federated Learning (FL) in Connected and Autonomous Vehicle (CAVs). Its adaptable design allows for the implementation of a variety of FL schemes, including horizontal, vertical, and Federated Transfer Learning. Flexe and PyFlexe are free to download and use, built for customization, and allows for the realistic simulation of wireless networking and vehicle dynamics. The project was partitioned into two, one of which is responsible for vehicle-to-vehicle communication (Flexe) and the other for the construction and training of models (PyFlexe).
We developed FLEXE to make it possible to implement and develop vehicular FL applications within the context of CAVs. It further simplifies the process of modeling specific Machine Learning (ML) and FL applications into environments suitable for CAVs. Specifically, we developed Flexe on top of the Veins network simulator to simulate the dynamics of communication between vehicles.
PyFlexe requires the following software to be installed
- OMNeT++
- conan
- grpc
- TensorFlow
- PyTorch
Please do follow the instructions from the official OMNeT documentation
Please do follow the instructions from the official conan documentation
Please do follow the instructions from the official GRPC documentation
python3 -m pip install grpcio
python3 -m pip install grpcio-tools
python3 -m pip install protobuf==3.20.1
or
python3 -m pip install protobuf==3.20.0 (Windows)
Please do follow the instructions from the official TensorFlow documentation
python3 -m pip install tensorflow==2.11.0
Please do follow the instructions from the official Scikit-Learn documentation
pip install scikit-learn
Please do follow the instructions from the official OpenCV documentation
pip install opencv-python
Please do follow the instructions from the official PyTorch documentation
After performing the installation, it may be necessary to run the python3 -m grpc.tools.protoc -I . --python_out=. --grpc_python_out=. flexe.proto
command inside the core/proto/
folder and replace the line import flexe_pb2
with import core.proto.flexe_pb2 as flexe_pb2
python server_flexe.py --ip 127.0.0.1:5000 --dataset MNIST #OLD WAY
python server_flexe.py #NEW VERSION
You may use Instant Flexe, a virtual machine, to run Flexe to rapidly test. Flexe
├── core
│ ├── application
│ │ ├── tf
│ │ └── torch
│ ├── dataset
│ ├── model
│ ├── proto
│ └── server
│ └── common
├── data
│ ├── CIFAR10
│ ├── MNIST
│ ├── motion_sense
│ └── UCI-HAR
├── doc
├── download.sh
├── img
│ └── Flexe_logo.png
└── server_flexe.py
Please read CONTRIBUTING.md for details on our code of conduct, and the process for submitting pull requests to us.
We use SemVer for versioning.
- Wellington Lobato - WellingtonLobato
- Joahannes B. D. da Costa - joahannes
- Allan M. de Souza - AllanMSouza
- Denis Rosario
- Christoph Sommer - sommer
- Leandro A. Villas
PyFlexe and Flexe can reproduce results in the following papers:
@INPROCEEDINGS{Lobato2022,
author={Lobato, Wellington and Costa, Joahannes B. D. Da and Souza, Allan M. de and Rosário, Denis and Sommer, Christoph and Villas, Leandro A.},
booktitle={2022 IEEE 96th Vehicular Technology Conference (VTC2022-Fall)},
title={FLEXE: Investigating Federated Learning in Connected Autonomous Vehicle Simulations},
year={2022},
pages={1-5},
doi={10.1109/VTC2022-Fall57202.2022.10012905}
}
Flexe Version 3.0.0 in the development phase.
This project is licensed under the GPL-2.0 license - see the COPYING.md file for details