Code Monkey home page Code Monkey logo

cdl's Introduction

Addressing Non-IID Problem in Federated Autonomous Driving with Contrastive Divergence Loss

Federated learning has been widely applied in autonomous driving since it enables training a learning model among vehicles without sharing users' data. However, data from autonomous vehicles usually suffer from the non-independent-and-identically-distributed (non-IID) problem, which may cause negative effects on the convergence of the learning process. In this paper, we propose a new contrastive divergence loss to address the non-IID problem in autonomous driving by reducing the impact of divergence factors from transmitted models during the local learning process of each silo. We also analyze the effects of contrastive divergence in various autonomous driving scenarios, under multiple network infrastructures, and with different centralized/distributed learning schemes. Our intensive experiments on three datasets demonstrate that our proposed contrastive divergence loss significantly improves the performance over current state-of-the-art approaches.

Fig-1

Figure 1: The Siamese setup when our CDL is applied for training federated autonomous driving mode.

This repository is the implementation of Addressing Non-IID Problem in Federated Autonomous Driving with Contrastive Divergence Loss. We benchmark our method on three public datasets: Udacity+ (A non-IID version of Udacity), Carla, and Gazebo.

For the detail, please refer to link.

This repository is based on and inspired by @Binh X. Nguyen work. We sincerely thank for their sharing of the codes.

Summary

Prerequisites

PYTHON 3.6

CUDA 9.2

Please install dependence package by run following command:

pip install -r requirements.txt

Datasets

  • For UDACITY+ dataset, we provide:

    • The split train/test dataset for GAIA network at link. You can download and extract them into "data/driving_udacity/" folder.
  • For GAZEBO dataset, we provide:

    • The original dataset and the split train/test dataset for GAIA network at link. You can download and extract them into "data/driving_gazebo/" folder.
  • For CARLA dataset, we provide:

    • The original dataset and the split train/test dataset for GAIA network at link. You can download and extract them into "data/driving_carla/" folder.

Networks

Important: Before running any command lines in this section, please run following command to access 'graph_utils' folder:

cd graph_utils

And now, you are in 'graph_utils' folder.

Please download graph data at link and put into data folder.

  • To generate networks for UDACITY+ dataset and compute the cycle time for them:

    bash generate_network_driving-udacity.sh
    
  • To generate networks for GAZEBO dataset and compute the cycle time for them:

    bash generate_network_driving-gazebo.sh
    
  • To generate networks for CARLA dataset and compute the cycle time for them:

    bash generate_network_driving-carla.sh
    

Training

  • To train our method on UDACITY+ dataset with GAIA network, run:
bash train_udacity_gaia.sh
  • To train our method on CARLA/GAZEBO dataset with GAIA network, you can use the same setup on UDACITY+.

Pretrained models and Testing

We provide the pretrained models which are trained on UDACITY+ dataset with GAIA network by our method at the last epoch. Please download at link and extracted them into the "pretrained_models/DRIVING-UDACITY_GAIA/" folder.

The models can be evaluated in UDACITY+ train and test set via:

bash test_udacity_gaia.sh

Citation

If you use this code as part of any published research, we'd really appreciate it if you could cite the following paper:

coming soon!

License

MIT License

More information

AIOZ AI Homepage: https://ai.aioz.io

cdl's People

Contributors

xuanbinh-nguyen96 avatar gazeal avatar

Stargazers

 avatar

Watchers

Quang D. Tran avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.