Giter Site home page Giter Site logo

tum-adlr-ws21-10's Introduction

Differentiable Bayesian Filters

This repository contains our study on Differentiable Bayesian Filters.

The package provides implementations of both standard and differentiable Particle Filters, as well as already trained models and a simple simulation environment with moving discs, which should be followed by the filters based on the beacon measurements.

Installation

We recommend creating a virtual/conda environment for the installation. This code was tested on both python=3.8 and python=3.9.

Run the following commands in the repository`s main directory:

pip install -r requirements.txt
pip install .

Usage

I. Training

The training script train.py is used to train the different models. In the script, hyperparameters, path to datasets and other settings can be easily changed. The training itself can be executed by running the script:

python pf/train.py

II. Inference and Testing

The try.py script can be used to easily test and visualize different filters, as well as create datasets that can be used for training or validation, by running:

python pf/try.py

Note: Please check all the parameters before running the filter!

  • For creating a dataset, the following snippet should be included with a specified path:

    if __name__ == "__main__":
        create_dataset("path")
    

    Other settings can be also changed, for more information please take a look at dataset.py. Please also study the contents of the datasets folder to find suitable created dataset.

  • For testing the standard particle filter, the following snippet must be included:

    if __name__ == "__main__":
        run_filter()
    

    Parameters regarding the simulation as well as other hyperparameters can be easily changed in the function.

  • For testing the differentiable particle filter, the following snippet must be included:

    if __name__ == "__main__":
        run_diff_filter()
    

    Parameters regarding the simulation, other hyperparameters as well as the model path must be appropriately specified in the function.

Before running the script, we advise checking the saved_models folder, which contains already trained models in different environments.

For the saved models, we provide the state dicts with trained weights, the TF-records, setup.txt file with model parameters, as well as some visualization videos:

Code Structure

The implemented filters and their components can be found under:

Our simulation environment can be found under:

Repository Structure

Currently, there are un-merged branches in the repository:

  • dev-fixed-cov contains the older model, which can only be learned with fixed covariance matrices.
  • experiment-1st-milestone contains code to generate the RMSE graphics (from the paper), which are then used to compare different models between each other.

We are not planning to either merge or delete these branches.

tum-adlr-ws21-10's People

Contributors

arseniid avatar zizo1111 avatar

Stargazers

 avatar

Watchers

 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.