kymatio


Namekymatio JSON
Version 0.3.0 PyPI version JSON
download
home_pagehttps://www.kymat.io
SummaryWavelet scattering transforms in Python with GPU acceleration
upload_time2022-09-05 07:24:49
maintainer
docs_urlNone
authorEdouard Oyallon, Eugene Belilovsky, Sergey Zagoruyko, Michael Eickenberg, Mathieu Andreux, Georgios Exarchakis, Louis Thiry, Vincent Lostanlen, Joakim Andén, Tomás Angles, Gabriel Huang, Roberto Leonarduzzi
requires_python>=3.6
licenseBSD-3-Clause
keywords
VCS
bugtrack_url
requirements numpy scipy appdirs configparser packaging
Travis-CI No Travis.
coveralls test coverage No coveralls.
            Kymatio: Wavelet scattering in Python - v0.3.0 “Erdre”
======================================================

Kymatio is an implementation of the wavelet scattering transform in the Python programming language, suitable for large-scale numerical experiments in signal processing and machine learning.
Scattering transforms are translation-invariant signal representations implemented as convolutional networks whose filters are not learned, but fixed (as wavelet filters).

![Build status](https://github.com/kymatio/kymatio/actions/workflows/pip.yml/badge.svg)


Use Kymatio if you need a library that:
* supports 1-D, 2-D, and 3-D wavelets,
* integrates wavelet scattering in a deep learning architecture, and
* runs seamlessly on CPU and GPU hardware, with major deep learning APIs, such
  as PyTorch, TensorFlow, and Jax.

# The Kymatio environment

## Flexibility

The Kymatio organization associates the developers of several pre-existing packages for wavelet scattering, including `ScatNet`, `scattering.m`, `PyScatWave`, `WaveletScattering.jl`, and `PyScatHarm`.

Interfacing Kymatio into deep learning frameworks allows the programmer to backpropagate the gradient of wavelet scattering coefficients, thus integrating them within an end-to-end trainable pipeline, such as a deep neural network.

## Portability

Each of these algorithms is written in a high-level imperative paradigm, making it portable to any Python library for array operations as long as it enables complex-valued linear algebra and a fast Fourier transform (FFT).

Each algorithm comes packaged with a frontend and backend. The frontend takes care of
interfacing with the user. The backend defines functions necessary for
computation of the scattering transform.

Currently, there are eight available frontend–backend pairs, NumPy (CPU), scikit-learn (CPU), pure PyTorch (CPU and GPU), PyTorch>=1.10 (CPU and GPU), PyTorch+scikit-cuda (GPU), PyTorch>=1.10+scikit-cuda (GPU), TensorFlow (CPU and GPU), Keras (CPU and GPU), and Jax (CPU and GPU).

## Scalability

Kymatio integrates the construction of wavelet filter banks in 1D, 2D, and 3D, as well as memory-efficient algorithms for extracting wavelet scattering coefficients, under a common application programming interface.

Running Kymatio on a graphics processing unit (GPU) rather than a multi-core conventional central processing unit (CPU) allows for significant speedups in computing the scattering transform.
The current speedup with respect to CPU-based MATLAB code is of the order of 10 in 1D and 3D and of the order of 100 in 2D.

We refer to our [official benchmarks](https://www.kymat.io/userguide.html#benchmarks) for further details.

## How to cite

If you use this package, please cite our paper *Kymatio: Scattering Transforms in Python*:

Andreux M., Angles T., Exarchakis G., Leonarduzzi R., Rochette G., Thiry L., Zarka J., Mallat S., Andén J., Belilovsky E., Bruna J., Lostanlen V., Chaudhary M., Hirn M. J., Oyallon E., Zhang S., Cella C., Eickenberg M. (2020). Kymatio: Scattering Transforms in Python. Journal of Machine Learning Research 21(60):1−6, 2020. [(paper)](http://jmlr.org/papers/v21/19-047.html) [(bibtex)](http://jmlr.org/papers/v21/19-047.bib)


# Installation


## Dependencies

Kymatio requires:

* Python (>= 3.7)
* SciPy (>= 0.13)


### Standard installation
We strongly recommend running Kymatio in an Anaconda environment, because this simplifies the installation of other
dependencies. You may install the latest version of Kymatio using the package manager `pip`, which will automatically download
Kymatio from the Python Package Index (PyPI):

```
pip install kymatio
```

Linux and macOS are the two officially supported operating systems.


# Frontends

## NumPy

To explicitly call the NumPy frontend, run:

```
from kymatio.numpy import Scattering2D
scattering = Scattering2D(J=2, shape=(32, 32))
```

## Scikit-learn

You can call also call `Scattering2D` as a scikit-learn `Transformer` using:

```
from kymatio.sklearn import Scattering2D

scattering_transformer = Scattering2D(2, (32, 32))
```

## PyTorch

Using PyTorch, you can instantiate `Scattering2D` as a `torch.nn.Module`:

```
from kymatio.torch import Scattering2D

scattering = Scattering2D(J=2, shape=(32, 32))
```

## TensorFlow and Keras

Similarly, in TensorFlow, you can instantiate `Scattering2D` as a `tf.Module`:

```
from kymatio.tensorflow import Scattering2D

scattering = Scattering2D(J=2, shape=(32, 32))
```

Alternatively, you can call `Scattering2D` as a Keras `Layer` using:

```
from tensorflow.keras.layers import Input
from kymatio.keras import Scattering2D

inputs = Input(shape=(32, 32))
scattering = Scattering2D(J=2)(inputs)
```

## Jax

Finally, with Jax installed, you can also instantiate a Jax `Scattering2D` object:

```
from kymatio.jax import Scattering2D

scattering = Scattering2D(J=2, shape=(32, 32))
```

# Installation from source

Assuming the Kymatio source has been downloaded, you may install it by running

```
pip install -r requirements.txt
python setup.py install
```

Developers can also install Kymatio via:

```
pip install -r requirements.txt
python setup.py develop
```


## GPU acceleration

Certain frontends, `numpy` and `sklearn`, only allow processing on the CPU and are therefore slower. The `torch`, `tensorflow`, `keras`, and `jax` frontends, however, also support GPU processing, which can significantly accelerate computations. Additionally, the `torch` backend supports an optimized `skcuda` backend which currently provides the fastest performance in computing scattering transforms.

To use it, you must first install the `scikit-cuda` and `cupy` dependencies:
```
pip install scikit-cuda cupy
```
Then you may instantiate a scattering object using the `backend='torch_skcuda'` argument:

```
from kymatio.torch import Scattering2D

scattering = Scattering2D(J=2, shape=(32, 32), backend='torch_skcuda')
```

# Documentation

The documentation of Kymatio is officially hosted on the [kymat.io](https://www.kymat.io/) website.


## Online resources

* [GitHub repository](https://github.com/kymatio/kymatio)
* [GitHub issue tracker](https://github.com/kymatio/kymatio/issues)
* [BSD-3-Clause license](https://github.com/kymatio/kymatio/blob/master/LICENSE.md)
* [List of authors](https://github.com/kymatio/kymatio/blob/master/AUTHORS.md)
* [Code of conduct](https://github.com/kymatio/kymatio/blob/master/CODE_OF_CONDUCT.md)


## Building the documentation from source
The documentation can also be found in the `doc/` subfolder of the GitHub repository.
To build the documentation locally, please clone this repository and run

```
pip install -r requirements_optional.txt
cd doc; make clean; make html
```

## Support

We wish to thank the Scientific Computing Core at the Flatiron Institute for the use of their computing resources for testing.


We would also like to thank École Normale Supérieure for their support.


## Kymatio

Kyma (*κύμα*) means *wave* in Greek. By the same token, Kymatio (*κυμάτιο*) means *wavelet*.

Note that the organization and the library are capitalized (*Kymatio*) whereas the corresponding Python module is written in lowercase (`import kymatio`).

The recommended pronunciation for Kymatio is *kim-ah-tio*. In other words, it rhymes with patio, not with ratio.



            

Raw data

            {
    "_id": null,
    "home_page": "https://www.kymat.io",
    "name": "kymatio",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.6",
    "maintainer_email": "",
    "keywords": "",
    "author": "Edouard Oyallon, Eugene Belilovsky, Sergey Zagoruyko, Michael Eickenberg, Mathieu Andreux, Georgios Exarchakis, Louis Thiry, Vincent Lostanlen, Joakim And\u00e9n, Tom\u00e1s Angles, Gabriel Huang, Roberto Leonarduzzi",
    "author_email": "edouard.oyallon@lip6.fr, belilove@iro.umontreal.ca, sergey.zagoruyko@inria.fr, michael.eickenberg@flatironinstitute.org, mathieu.andreux@ens.fr, georgios.exarchakis@ens.fr, louis.thiry@ens.fr, vincent.lostanlen@nyu.edu, janden@kth.se, tomas.angles@ens.fr, gabriel.huang@umontreal.ca, roberto.leonarduzzi@ens.fr",
    "download_url": "https://github.com/kymatio/kymatio/releases",
    "platform": null,
    "description": "Kymatio: Wavelet scattering in Python - v0.3.0 \u201cErdre\u201d\n======================================================\n\nKymatio is an implementation of the wavelet scattering transform in the Python programming language, suitable for large-scale numerical experiments in signal processing and machine learning.\nScattering transforms are translation-invariant signal representations implemented as convolutional networks whose filters are not learned, but fixed (as wavelet filters).\n\n![Build status](https://github.com/kymatio/kymatio/actions/workflows/pip.yml/badge.svg)\n\n\nUse Kymatio if you need a library that:\n* supports 1-D, 2-D, and 3-D wavelets,\n* integrates wavelet scattering in a deep learning architecture, and\n* runs seamlessly on CPU and GPU hardware, with major deep learning APIs, such\n  as PyTorch, TensorFlow, and Jax.\n\n# The Kymatio environment\n\n## Flexibility\n\nThe Kymatio organization associates the developers of several pre-existing packages for wavelet scattering, including `ScatNet`, `scattering.m`, `PyScatWave`, `WaveletScattering.jl`, and `PyScatHarm`.\n\nInterfacing Kymatio into deep learning frameworks allows the programmer to backpropagate the gradient of wavelet scattering coefficients, thus integrating them within an end-to-end trainable pipeline, such as a deep neural network.\n\n## Portability\n\nEach of these algorithms is written in a high-level imperative paradigm, making it portable to any Python library for array operations as long as it enables complex-valued linear algebra and a fast Fourier transform (FFT).\n\nEach algorithm comes packaged with a frontend and backend. The frontend takes care of\ninterfacing with the user. The backend defines functions necessary for\ncomputation of the scattering transform.\n\nCurrently, there are eight available frontend\u2013backend pairs, NumPy (CPU), scikit-learn (CPU), pure PyTorch (CPU and GPU), PyTorch>=1.10 (CPU and GPU), PyTorch+scikit-cuda (GPU), PyTorch>=1.10+scikit-cuda (GPU), TensorFlow (CPU and GPU), Keras (CPU and GPU), and Jax (CPU and GPU).\n\n## Scalability\n\nKymatio integrates the construction of wavelet filter banks in 1D, 2D, and 3D, as well as memory-efficient algorithms for extracting wavelet scattering coefficients, under a common application programming interface.\n\nRunning Kymatio on a graphics processing unit (GPU) rather than a multi-core conventional central processing unit (CPU) allows for significant speedups in computing the scattering transform.\nThe current speedup with respect to CPU-based MATLAB code is of the order of 10 in 1D and 3D and of the order of 100 in 2D.\n\nWe refer to our [official benchmarks](https://www.kymat.io/userguide.html#benchmarks) for further details.\n\n## How to cite\n\nIf you use this package, please cite our paper *Kymatio: Scattering Transforms in Python*:\n\nAndreux M., Angles T., Exarchakis G., Leonarduzzi R., Rochette G., Thiry L., Zarka J., Mallat S., And\u00e9n J., Belilovsky E., Bruna J., Lostanlen V., Chaudhary M., Hirn M. J., Oyallon E., Zhang S., Cella C., Eickenberg M. (2020). Kymatio: Scattering Transforms in Python. Journal of Machine Learning Research 21(60):1\u22126, 2020. [(paper)](http://jmlr.org/papers/v21/19-047.html) [(bibtex)](http://jmlr.org/papers/v21/19-047.bib)\n\n\n# Installation\n\n\n## Dependencies\n\nKymatio requires:\n\n* Python (>= 3.7)\n* SciPy (>= 0.13)\n\n\n### Standard installation\nWe strongly recommend running Kymatio in an Anaconda environment, because this simplifies the installation of other\ndependencies. You may install the latest version of Kymatio using the package manager `pip`, which will automatically download\nKymatio from the Python Package Index (PyPI):\n\n```\npip install kymatio\n```\n\nLinux and macOS are the two officially supported operating systems.\n\n\n# Frontends\n\n## NumPy\n\nTo explicitly call the NumPy frontend, run:\n\n```\nfrom kymatio.numpy import Scattering2D\nscattering = Scattering2D(J=2, shape=(32, 32))\n```\n\n## Scikit-learn\n\nYou can call also call `Scattering2D` as a scikit-learn `Transformer` using:\n\n```\nfrom kymatio.sklearn import Scattering2D\n\nscattering_transformer = Scattering2D(2, (32, 32))\n```\n\n## PyTorch\n\nUsing PyTorch, you can instantiate `Scattering2D` as a `torch.nn.Module`:\n\n```\nfrom kymatio.torch import Scattering2D\n\nscattering = Scattering2D(J=2, shape=(32, 32))\n```\n\n## TensorFlow and Keras\n\nSimilarly, in TensorFlow, you can instantiate `Scattering2D` as a `tf.Module`:\n\n```\nfrom kymatio.tensorflow import Scattering2D\n\nscattering = Scattering2D(J=2, shape=(32, 32))\n```\n\nAlternatively, you can call `Scattering2D` as a Keras `Layer` using:\n\n```\nfrom tensorflow.keras.layers import Input\nfrom kymatio.keras import Scattering2D\n\ninputs = Input(shape=(32, 32))\nscattering = Scattering2D(J=2)(inputs)\n```\n\n## Jax\n\nFinally, with Jax installed, you can also instantiate a Jax `Scattering2D` object:\n\n```\nfrom kymatio.jax import Scattering2D\n\nscattering = Scattering2D(J=2, shape=(32, 32))\n```\n\n# Installation from source\n\nAssuming the Kymatio source has been downloaded, you may install it by running\n\n```\npip install -r requirements.txt\npython setup.py install\n```\n\nDevelopers can also install Kymatio via:\n\n```\npip install -r requirements.txt\npython setup.py develop\n```\n\n\n## GPU acceleration\n\nCertain frontends, `numpy` and `sklearn`, only allow processing on the CPU and are therefore slower. The `torch`, `tensorflow`, `keras`, and `jax` frontends, however, also support GPU processing, which can significantly accelerate computations. Additionally, the `torch` backend supports an optimized `skcuda` backend which currently provides the fastest performance in computing scattering transforms.\n\nTo use it, you must first install the `scikit-cuda` and `cupy` dependencies:\n```\npip install scikit-cuda cupy\n```\nThen you may instantiate a scattering object using the `backend='torch_skcuda'` argument:\n\n```\nfrom kymatio.torch import Scattering2D\n\nscattering = Scattering2D(J=2, shape=(32, 32), backend='torch_skcuda')\n```\n\n# Documentation\n\nThe documentation of Kymatio is officially hosted on the [kymat.io](https://www.kymat.io/) website.\n\n\n## Online resources\n\n* [GitHub repository](https://github.com/kymatio/kymatio)\n* [GitHub issue tracker](https://github.com/kymatio/kymatio/issues)\n* [BSD-3-Clause license](https://github.com/kymatio/kymatio/blob/master/LICENSE.md)\n* [List of authors](https://github.com/kymatio/kymatio/blob/master/AUTHORS.md)\n* [Code of conduct](https://github.com/kymatio/kymatio/blob/master/CODE_OF_CONDUCT.md)\n\n\n## Building the documentation from source\nThe documentation can also be found in the `doc/` subfolder of the GitHub repository.\nTo build the documentation locally, please clone this repository and run\n\n```\npip install -r requirements_optional.txt\ncd doc; make clean; make html\n```\n\n## Support\n\nWe wish to thank the Scientific Computing Core at the Flatiron Institute for the use of their computing resources for testing.\n\n\nWe would also like to thank \u00c9cole Normale Sup\u00e9rieure for their support.\n\n\n## Kymatio\n\nKyma (*\u03ba\u03cd\u03bc\u03b1*) means *wave* in Greek. By the same token, Kymatio (*\u03ba\u03c5\u03bc\u03ac\u03c4\u03b9\u03bf*) means *wavelet*.\n\nNote that the organization and the library are capitalized (*Kymatio*) whereas the corresponding Python module is written in lowercase (`import kymatio`).\n\nThe recommended pronunciation for Kymatio is *kim-ah-tio*. In other words, it rhymes with patio, not with ratio.\n\n\n",
    "bugtrack_url": null,
    "license": "BSD-3-Clause",
    "summary": "Wavelet scattering transforms in Python with GPU acceleration",
    "version": "0.3.0",
    "project_urls": {
        "Authors": "https://github.com/kymatio/kymatio/blob/master/AUTHORS.md",
        "Documentation": "https://www.kymat.io/codereference.html",
        "Download": "https://github.com/kymatio/kymatio/releases",
        "Homepage": "https://www.kymat.io",
        "Source": "https://github.com/kymatio/kymatio/",
        "Tracker": "https://github.com/kymatio/kymatio/issues"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "e0b128bad41e1d44e6f085c5e59d921824e0b2bcaea5b2bdebe4d1647c9e5841",
                "md5": "ffa755091351331ef626c0a7dd403eb6",
                "sha256": "e517113bc98a52795144eb80549f0686ee8a57dbbd9839b935f10dbceba0ec6b"
            },
            "downloads": -1,
            "filename": "kymatio-0.3.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "ffa755091351331ef626c0a7dd403eb6",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.6",
            "size": 87598,
            "upload_time": "2022-09-05T07:24:49",
            "upload_time_iso_8601": "2022-09-05T07:24:49.079652Z",
            "url": "https://files.pythonhosted.org/packages/e0/b1/28bad41e1d44e6f085c5e59d921824e0b2bcaea5b2bdebe4d1647c9e5841/kymatio-0.3.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2022-09-05 07:24:49",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "kymatio",
    "github_project": "kymatio",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "requirements": [
        {
            "name": "numpy",
            "specs": []
        },
        {
            "name": "scipy",
            "specs": []
        },
        {
            "name": "appdirs",
            "specs": []
        },
        {
            "name": "configparser",
            "specs": []
        },
        {
            "name": "packaging",
            "specs": []
        }
    ],
    "lcname": "kymatio"
}
        
Elapsed time: 0.15366s