NeuralCompression
What's New
- July 2021 (image compression) - Released implemenation of Scale Hyperprior
- July 2021 (video compression) - Released implementation of DVC
About
NeuralCompression is a Python repository dedicated to research of neural networks that compress data. The repository includes tools such as JAX-based entropy coders, image compression models, video compression models, and metrics for image and video evaluation.
NeuralCompression is alpha software. The project is under active development. The API will change as we make releases, potentially breaking backwards compatibility.
Installation
NeuralCompression is a project currently under development. You can install the repository in development mode.
Development Installation
To match your local environment to the test environment, first run
pip install -r requirements.txt
Then, you can install the package in development mode by running
pip install -e .
If you are not interested in extending the package and running tests, then you only need to apply the second step to install.
Repository Structure
We use a 2-tier repository structure. The neuralcompression package contains
a core set of tools for doing neural compression research. Code committed to
the core package requires stricter linting, high code quality, and rigorous
review. The projects folder contains code for reproducing papers and training
baselines. Code in this folder is not linted aggressively, we don't enforce
type annotations, and it's okay to omit unit tests.
The 2-tier structure enables rapid iteration and reproduction via code in
projects that is built on a backbone of high-quality code in
neuralcompression.
neuralcompression
neuralcompression- base packagedata- PyTorch data loaders for various data setsentropy_coders- lossless compression algorithms in JAXcraystack- an implementation of the rANS algorithm with the craystack API
functional- methods for image warping, information cost, etc.layers- building blocks for compression modelsmetrics-torchmetricsclasses for assessing model performancemodels- complete compression models
projects
projects- recipes and code for reproducing papersscale_hyperprior_lightningScale Hyperprior (Balle et al., 2018)deep_video_compressionDVC (Lu et al., 2019)
Getting Started
For an example of package usage, see the Scale Hyperprior for an example of how to train an image compression model in PyTorch Lightning. See DVC for a video compression example.
Contributions
Please read our CONTRIBUTING guide and our CODE_OF_CONDUCT prior to submitting a pull request.
We test all pull requests. We rely on this for reviews, so please make sure any
new code is tested. Tests for neuralcompression go in the tests folder in
the root of the repository. Tests for individual projects go in those projects'
own tests folder.
We use black for formatting, isorst for import sorting,
flake8 for linting, mypy for type checking. We enforce these on the
neuralcompression package, but not in the projects folder.
License
NeuralCompression is MIT licensed, as found in the LICENSE file.
Cite
If you find NeuralCompression useful in your work, feel free to cite
@misc{muckley2021neuralcompression,
author={Matthew Muckley and Jordan Juravsky and Daniel Severo and Mannat Singh and Quentin Duval and Karen Ullrich},
title={NeuralCompression},
howpublished={\url{https://github.com/facebookresearch/NeuralCompression}},
year={2021}
}
Metadata
Release files for neuralcompression 0.1.0.post20210719
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| neuralcompression-0.1.0.post20210719.tar.gz | 40.8 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| neuralcompression-0.1.0.post20210719-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 90.6 kB
Release files / neuralcompression-0.1.0.post20210719.tar.gz
| Download URL | neuralcompression-0.1.0.post20210719.tar.gz |
|---|---|
| Size | 40.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
078900d898df2b3cfce2cab1763b3971d1b83c8d32f317bfd16fa98f257c77aa
|
|
BLAKE2b-256 checksum How to use checksums |
294fd6a51668eecd332bb5d6476cae026cfd705067443cc698d21d06b281d7a8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.4.1 importlib_metadata/4.6.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.61.2 CPython/3.9.6
|
Release files / neuralcompression-0.1.0.post20210719-py3-none-any.whl
| Download URL | neuralcompression-0.1.0.post20210719-py3-none-any.whl |
|---|---|
| Size | 49.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
219b018165f452984a2ebaad1eff13a015d08f1c58574a573418f0c648e8e65d
|
|
BLAKE2b-256 checksum How to use checksums |
e1af3c2a4706e132f90d53229642c35b37590df777f284b83825a700a82d2b5a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.4.1 importlib_metadata/4.6.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.61.2 CPython/3.9.6
|