All Projects → InterDigitalInc → Compressai

InterDigitalInc / Compressai

Licence: apache-2.0
A PyTorch library and evaluation platform for end-to-end compression research

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to Compressai

Caffe
Caffe for Sparse and Low-rank Deep Neural Networks
Stars: ✭ 339 (+37.8%)
Mutual labels:  deep-neural-networks, compression
Aimet
AIMET is a library that provides advanced quantization and compression techniques for trained neural network models.
Stars: ✭ 453 (+84.15%)
Mutual labels:  deep-neural-networks, compression
Compression
Data compression in TensorFlow
Stars: ✭ 458 (+86.18%)
Mutual labels:  deep-neural-networks, compression
Deep Unet For Satellite Image Segmentation
Satellite Imagery Feature Detection with SpaceNet dataset using deep UNet
Stars: ✭ 227 (-7.72%)
Mutual labels:  deep-neural-networks
Snap N Eat
Food detection and recommendation with deep learning
Stars: ✭ 229 (-6.91%)
Mutual labels:  deep-neural-networks
Lcnn
LCNN: End-to-End Wireframe Parsing
Stars: ✭ 234 (-4.88%)
Mutual labels:  deep-neural-networks
3d Reconstruction With Deep Learning Methods
List of projects for 3d reconstruction
Stars: ✭ 244 (-0.81%)
Mutual labels:  deep-neural-networks
Awesome Gans And Deepfakes
A curated list of GAN & Deepfake papers and repositories.
Stars: ✭ 224 (-8.94%)
Mutual labels:  deep-neural-networks
Hierarchical Attention Networks Pytorch
Hierarchical Attention Networks for document classification
Stars: ✭ 239 (-2.85%)
Mutual labels:  deep-neural-networks
Nanodet
⚡Super fast and lightweight anchor-free object detection model. 🔥Only 980 KB(int8) / 1.8MB (fp16) and run 97FPS on cellphone🔥
Stars: ✭ 3,640 (+1379.67%)
Mutual labels:  deep-neural-networks
Pyconv
Pyramidal Convolution: Rethinking Convolutional Neural Networks for Visual Recognition (https://arxiv.org/pdf/2006.11538.pdf)
Stars: ✭ 231 (-6.1%)
Mutual labels:  deep-neural-networks
Octconv.pytorch
PyTorch implementation of Octave Convolution with pre-trained Oct-ResNet and Oct-MobileNet models
Stars: ✭ 229 (-6.91%)
Mutual labels:  deep-neural-networks
Appnp
A PyTorch implementation of "Predict then Propagate: Graph Neural Networks meet Personalized PageRank" (ICLR 2019).
Stars: ✭ 234 (-4.88%)
Mutual labels:  deep-neural-networks
Zipson
JSON parse and stringify with compression
Stars: ✭ 229 (-6.91%)
Mutual labels:  compression
Gdcm
Grassroots DICOM read-only mirror. Only for Pull Request. Please report bug at http://sf.net/p/gdcm
Stars: ✭ 240 (-2.44%)
Mutual labels:  compression
Qs
Quick serialization of R objects
Stars: ✭ 225 (-8.54%)
Mutual labels:  compression
Dlwpt Code
Code for the book Deep Learning with PyTorch by Eli Stevens, Luca Antiga, and Thomas Viehmann.
Stars: ✭ 3,054 (+1141.46%)
Mutual labels:  deep-neural-networks
Darkon
Toolkit to Hack Your Deep Learning Models
Stars: ✭ 231 (-6.1%)
Mutual labels:  deep-neural-networks
Smol V
SMOL-V: like Vulkan/Khronos SPIR-V, but smaller.
Stars: ✭ 230 (-6.5%)
Mutual labels:  compression
Super Slomo
PyTorch implementation of Super SloMo by Jiang et al.
Stars: ✭ 2,714 (+1003.25%)
Mutual labels:  deep-neural-networks

ID-CompressAI-logo

CompressAI

CompressAI (compress-ay) is a PyTorch library and evaluation platform for end-to-end compression research.

CompressAI currently provides:

  • custom operations, layers and models for deep learning based data compression
  • a partial port of the official TensorFlow compression library
  • pre-trained end-to-end compression models for learned image compression
  • evaluation scripts to compare learned models against classical image/video compression codecs

PSNR performances plot on Kodak

Note: Multi-GPU support is now experimental.

Installation

CompressAI only supports python 3.6+ (currently <3.9 for PyTorch support) and PyTorch 1.4+. A C++17 compiler, a recent version of pip (19.0+), and common python packages (see setup.py for the full list) are also required.

To get started and install CompressAI, run the following commands in a virtual environment:

git clone https://github.com/InterDigitalInc/CompressAI compressai
cd compressai
pip install -U pip && pip install -e .

For a custom installation, you can also run one of the following commands:

  • pip install -e '.[dev]': install the packages required for development (testing, linting, docs)
  • pip install -e '.[tutorials]': install the packages required for the tutorials (notebooks)
  • pip install -e '.[all]': install all the optional packages

This is the currently recommended installation method. Docker images and PyPI packages will be released in the future. Conda environments are not officially supported.

Documentation

Tests

Run tests with pytest:

pytest -sx --cov=compressai --cov-append --cov-report term-missing tests

Slow tests can be skipped with the -m "not slow" option.

Usage

Examples

Script and notebook examples can be found in the examples/ directory.

To encode/decode images with the provided pre-trained models, run the codec.py example:

python3 examples/codec.py --help

An examplary training script with a rate-distortion loss is provided in examples/train.py. You can replace the model used in the training script with your own model implemented within CompressAI, and then run the script for a simple training pipeline:

python3 examples/train.py -d /path/to/my/image/dataset/ --epochs 300 -lr 1e-4 --batch-size 16 --cuda --save

Note: the training example uses a custom ImageFolder structure.

A jupyter notebook illustrating the usage of a pre-trained model for learned image compression is also provided in the examples directory:

pip install -U ipython jupyter ipywidgets matplotlib
jupyter notebook examples/

Evaluation

To evaluate a trained model on your own dataset, CompressAI provides an evaluation script:

python3 -m compressai.utils.eval_model checkpoint /path/to/images/folder/ -a $ARCH -p $MODEL_CHECKPOINT...

To evaluate traditional image/video codecs:

python3 -m compressai.utils.bench --help
python3 -m compressai.utils.bench bpg --help
python3 -m compressai.utils.bench vtm --help

License

CompressAI is licensed under the Apache License, Version 2.0

Contributing

We welcome feedback and contributions. Please open a GitHub issue to report bugs, request enhancements or if you have any questions.

Before contributing, please read the CONTRIBUTING.md file.

Authors

  • Jean Bégaint, Fabien Racapé, Simon Feltman and Akshay Pushparaja, InterDigital AI Lab.

Citation

If you use this project, please cite the relevant original publications for the models and datasets, and cite this project as:

@article{begaint2020compressai,
	title={CompressAI: a PyTorch library and evaluation platform for end-to-end compression research},
	author={B{\'e}gaint, Jean and Racap{\'e}, Fabien and Feltman, Simon and Pushparaja, Akshay},
	year={2020},
	journal={arXiv preprint arXiv:2011.03029},
}

Related links

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].