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.31.dev2.tar.gz (1.1 MB view details)

Uploaded Source

Built Distributions

File details

Details for the file torchjpeg-0.9.31.dev2.tar.gz.

File metadata

  • Download URL: torchjpeg-0.9.31.dev2.tar.gz
  • Upload date:
  • Size: 1.1 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.5.1 CPython/3.11.4 Linux/5.4.109+

File hashes

Hashes for torchjpeg-0.9.31.dev2.tar.gz
Algorithm Hash digest
SHA256 010e87fd195ada076d7ab5b9a02db148018c2ce3d69e09a27e2d021c27045815
MD5 c98189ae3a09bc41387a5987bc82a30b
BLAKE2b-256 8591680e67812dd289c08a75e8d045bea761b63fbf9caa302d97b42ad772bad0

See more details on using hashes here.

File details

Details for the file torchjpeg-0.9.31.dev2-cp311-cp311-manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for torchjpeg-0.9.31.dev2-cp311-cp311-manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 a3a34a91084cf93f7e87035bcdcdb50d3f10ae0cc5b48a775b70f5fd8fe9f7b8
MD5 e90c75c133432ef36cf9468412662f3b
BLAKE2b-256 e716de411cc1a89e998eb978962ee2c45461f6b4aa144e7eba61e510ae00fa80

See more details on using hashes here.

File details

Details for the file torchjpeg-0.9.31.dev2-cp310-cp310-manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for torchjpeg-0.9.31.dev2-cp310-cp310-manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 73228c59cfa8ef06241e5a9685bfd25329350397617618d001717978361d1fed
MD5 6ba376127bf6a4ee67807330ad0cd86f
BLAKE2b-256 99542972e8f5529091780d4954757fb0f612e4fa4bf47ffd8e8f1627d53bc74c

See more details on using hashes here.

File details

Details for the file torchjpeg-0.9.31.dev2-cp39-cp39-manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for torchjpeg-0.9.31.dev2-cp39-cp39-manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 bfa88a701d4f34e7319940129934bc36415546278a00da1cf6fa2d17b9b3a41b
MD5 a89b1001c28306d0d32e6008bd07214e
BLAKE2b-256 d6b93f7d1b724a25831a095ce59ece437df5510ea255f8ed8e67c0ef236708e3

See more details on using hashes here.

File details

Details for the file torchjpeg-0.9.31.dev2-cp38-cp38-manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for torchjpeg-0.9.31.dev2-cp38-cp38-manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 40c5e4966b913182fdb7127aacfd92d793dddce85f00eac9f2d39560bd098550
MD5 a13f35d897df8f741b969d1f751a789b
BLAKE2b-256 23b6d611d0a490f849d8c64d05dd2c470a21024deef90f60e13e664ac3196bf4

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