PyMP is a collection of classes and scripts mostly written in Python during my PhD to perform fast decomposition of audio signals on multiscale time-frequency dictionaries.
For now, it can only handle MDCT-based dictionaries
PyMP is very much structured like the MPTK toolbox from INRIA. Some of my research required that I would rewrite the core decomposition algorithm in order to design variants of it. In particular, the rewriting allows the use of Randomized Algorithms, such as the Matching Pursuit with Random Sequences of subdictionaries (RSSMP [1]). If you don’t intend to use this kind of variants, I recommend you use one of the existing implementation (indeed MPTK) as it can be fairly faster and more thoroughly tested that this piece of software.
In the opposite case let’s have a look at how this is built. The archtecture is built upon these objects:
This section only recall MP in order to describe the meaning of PyMP methods and classes. This is NOT an introduction to greedy algorithms.
MP will decompose a signal into a linear combination of atoms taken from a dictionary by iteratively selecting them according to their correlation to the signal. Thus, the algorithm builds an approximant of in iterations such that:
Warning
You will need to have fftw and openMP libraries installed and header accessible. On Debian-based OS you’ll need the following packages:
- libfftw3-dev
- python-dev
Installation has been succesfully tested on linux machines but not on windows. Since Microsoft compiler (at least the free version of it) has bad handling of 64 bits libraries I recommend the use of cygwin on Windows Platform, although it appears matplotlib installation on cygwin may not be as straightforward as it should.
Additionnaly you’ll want to have the following Python packages installed:
- Numpy
- Matplotlib
- Scipy
PyMP is mainly a collection of pure python modules, which installation is quite traditionnal. However, in order to accelerate the inner product computations, it uses a low-level pure C library that is used through a python C extension module.
Which means there are two installation steps:
Build and install the Python C extension module called parallelProjections
Build and install the pure Python modules among which:
Note
Hopefully you won’t need to perform these operations, it will be done for you by executing by the setup.py script in the root directory. Simply run:
$python setup.py install
And (provided all headers and libraries are present and accessible) it should be fine. This should compile the C extension and install all sources and packages in your dist-package local directory. You may need to have writing rights to perform this operation (e.g. using sudo).