Skip to content

A simple, pure python dtw (dynamic time warping) implementation.

License

Notifications You must be signed in to change notification settings

kylerbrown/ezdtw

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ezdtw

example

ezdtw is a pure Python dynamic time warping library, intended for warping acoustic spectrograms.

This implementation uses two performance tricks:

  1. Distances are computed using Scipy's cdist function.
  2. The cumulative minimum distance calculation uses the numba jit compiler for a 500x speedup.

Computing the warp path between two typical zebra finch song motif spectrograms takes approximately 60ms of computation time.

Requirments

  • Python 3
  • numpy
  • scipy
  • numba

You may want to use resin for creating spectrograms.

Installation

git clone https://github.com/kylerbrown/ezdtw.git
cd ezdtw
pip install .

Usage

from ezdtw import dtw

x, y = dtw(A, B)

See an example in the example/ folder.

About

A simple, pure python dtw (dynamic time warping) implementation.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages