Code Monkey home page Code Monkey logo

fast-approx-dtw's Introduction

fast-approx-dtw

This is an experimental implementation of the Dynamic Time Warping algorithm that focuses on performance and usability in embedded environments. It's a #[no_std] crate that runs entirely in the stack.

Basic DTW implementations have quadratic time complexity due to the need to calculate errors and paths over an NxN (where N is the signal length) grid. This implementation* repeatedly downsamples the signals to half their size until they can't be evenly divided by 2 anymore. It then solves the smallest downsample and uses the generated path to guide the solution of the next largest one, only calculating errors and paths that lie near the downsampled path. It works its way back up the "stack" of downsamples until it solves the original input signals, resulting in linear time complexity.

There are situations where a downsampled signal can generate a path that's wildly different from the most correct path on the upsampled signal. In that case, this implementation will not generate the most optimal path, hence the "approximate" in fast-approx-dtw. This appears to only be an issue if the input signals are vastly different from each other. This library's main goal is to eventually be useful for generating depth maps between stereo images in real time on embedded devices. Since these images should be very similar to each other, this isn't expected to be an issue.

* Based on FastDTW: Toward Accurate Dynamic Time Warping in Linear Time and Space

fast-approx-dtw's People

Contributors

past9 avatar

Watchers

 avatar  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.