Skip to main content

Utilities for JPEG data access and manipulation in pytorch

Project description

TorchJPEG

pipeline status coverage report PyPI License

This package contains a C++ extension for pytorch that interfaces with libjpeg to allow for manipulation of low-level JPEG data. By using libjpeg, quantization results are guaranteed to be consistent with other applications, like image viewers or MATLAB, which use libjpeg to compress and decompress images. This is useful because JPEG images can be effected by round-off errors or slight differences in the decompression procedure. Besides this, this library can be used to read and write DCT coefficients, functionality which is not available from other python interfaces.

Besides this, the library includes many utilities related to JPEG compression, many of which are written using native pytorch code meaning they can be differentiated or GPU accelerated. The library currently includes packages related to the DCT, quantization, metrics, and dataset transformations.

LIBJPEG

Currently builds against: libjpeg-9d. libjpeg is statically linked during the build process. See http://www.ijg.org/files/ for libjpeg source. The full libjpeg source is included with the torchjpeg source code and will be built during the install process (for a source or sdist install).

Install

Packages are hosted on pypi. Install using pip, note that only Linux builds are supported at the moment.

pip install torchjpeg

If there is demand for builds on other platforms it may happen in the future. Also note that the wheel is intended to be compatible with manylinux2014 which means it should work on modern Linux systems, however, because of they way pytorch works, we can't actually build it using all of the manylinux2014 tools. So compliance is not guaranteed and YMMV.

torchjpeg is currently in pre-beta development and consists mostly of converted research code. The public facing API, including any and all names of
parameters and functions, is subject to change at any time. We follow semver for versioning and will adhere to that before making and breaking
changes.

Citation

If you use our code in a publication, we ask that you cite the following paper (bibtex):

Max Ehrlich, Larry Davis, Ser-Nam Lim, and Abhinav Shrivastava. "Quantization Guided JPEG Artifact Correction." In Proceedings of the European Conference on Computer Vision, 2020

Project details


Release history Release notifications | RSS feed

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

torchjpeg-0.9.24.dev1.tar.gz (1.1 MB view details)

Uploaded Source

Built Distributions

File details

Details for the file torchjpeg-0.9.24.dev1.tar.gz.

File metadata

  • Download URL: torchjpeg-0.9.24.dev1.tar.gz
  • Upload date:
  • Size: 1.1 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.15 CPython/3.10.6 Linux/5.4.109+

File hashes

Hashes for torchjpeg-0.9.24.dev1.tar.gz
Algorithm Hash digest
SHA256 1654ab4cacf82e159ce0a11def46c136b6dfdb84188b9c6150cea9c95871694f
MD5 edce62fd685b121663c23ec8c8d3a03c
BLAKE2b-256 85e0fd329ea260ad8c0720c6a84e2d41c14bd5cbfe2d9dd1e24256be040e3806

See more details on using hashes here.

File details

Details for the file torchjpeg-0.9.24.dev1-cp310-cp310-manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for torchjpeg-0.9.24.dev1-cp310-cp310-manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 25122f9d7e9ea06ada9a2f4930e2dd1396868c6aa9a6a9db6f5d9067b8914fdc
MD5 b0e4c6b4ae2653692fb2bb4acaecc1e4
BLAKE2b-256 9b6bb815f55deca1c3d1937ece189f3560f6e6e20cca3e978287d106d36d209a

See more details on using hashes here.

File details

Details for the file torchjpeg-0.9.24.dev1-cp39-cp39-manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for torchjpeg-0.9.24.dev1-cp39-cp39-manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 c0bad4783ade2816764b9d92890547535d7831a3f7e6edfce4e3246df2e5e471
MD5 58ccab565c6a97b8ba64aec16a576e2e
BLAKE2b-256 442a5a3a6fb24b2613c5a4792c58b25de0ee6d8c3fca7836aa96994dc8305212

See more details on using hashes here.

File details

Details for the file torchjpeg-0.9.24.dev1-cp38-cp38-manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for torchjpeg-0.9.24.dev1-cp38-cp38-manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 4849ea2471709bca989cbaefa70462cc6cfbd48e985f781e2ee06620e2891a4d
MD5 98ae403df1e267e475116d71a917d0af
BLAKE2b-256 da951bb331a156ca5b8c76e7a62fdb5e26e1db85655ff4507d4bfaa58f3fb603

See more details on using hashes here.

File details

Details for the file torchjpeg-0.9.24.dev1-cp37-cp37m-manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for torchjpeg-0.9.24.dev1-cp37-cp37m-manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 30ccad92a32431469ab4049598f907bc98e93f9b930b758fa5860549f25fcab3
MD5 464a65f109e9a1c5949d467ab49b3937
BLAKE2b-256 e2c1a8eebe910f549693f1b7368c1fcca50065694f55f6ce94c34dd24855d3b1

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page