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.

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

Uploaded Source

Built Distributions

File details

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

File metadata

  • Download URL: torchjpeg-0.9.7.dev2.tar.gz
  • Upload date:
  • Size: 1.0 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.0.10 CPython/3.8.5 Linux/4.19.78-coreos

File hashes

Hashes for torchjpeg-0.9.7.dev2.tar.gz
Algorithm Hash digest
SHA256 29276dbbaf4fcbfe01719bd0ac98f75ab5a0a1943121a343920d421ea87a14fb
MD5 8cb92be48f05ea44e55f5434161184c4
BLAKE2b-256 e4a7cf633d3bbbd2ea23150232684dedc151de37e65fb288d8e74552dcf4addb

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for torchjpeg-0.9.7.dev2-cp38-cp38-manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 61883508d03e5167842e9652a69a3e988c9f62a5a93229cf41544291b0bf75f4
MD5 763ae2045a3f36cf7b2fed88b0a64f43
BLAKE2b-256 fada4ca0bb3e52e6cf002e9351e5786f734c107f62b53f8bc5ac1c22ccb743ef

See more details on using hashes here.

File details

Details for the file torchjpeg-0.9.7.dev2-cp37-cp37m-manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for torchjpeg-0.9.7.dev2-cp37-cp37m-manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 0f701a64ee210aad85ce32bc38580714be90b7e61c294550e7f2b95ea890f683
MD5 e98bf3b4e6f22206e3e070cc7465ca1d
BLAKE2b-256 9240f21a527241be288c112ec12d1d72a9a243534efdbb8b826e14faed8e9dc7

See more details on using hashes here.

File details

Details for the file torchjpeg-0.9.7.dev2-cp36-cp36m-manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for torchjpeg-0.9.7.dev2-cp36-cp36m-manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 25e639f506f33a2900803fa889666b9b9d63e9a41872274971483826453fcf22
MD5 ab17e1ec640393b0f1b25f579bf8e7fb
BLAKE2b-256 461bd9c1a3f32e145baa3917bb7797db85965f9f277b8ada24e0dc60689c47c2

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