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

Uploaded Source

Built Distributions

torchjpeg-0.9.27-cp310-cp310-manylinux2014_x86_64.whl (4.2 MB view details)

Uploaded CPython 3.10

torchjpeg-0.9.27-cp39-cp39-manylinux2014_x86_64.whl (4.2 MB view details)

Uploaded CPython 3.9

torchjpeg-0.9.27-cp38-cp38-manylinux2014_x86_64.whl (4.2 MB view details)

Uploaded CPython 3.8

torchjpeg-0.9.27-cp37-cp37m-manylinux2014_x86_64.whl (4.2 MB view details)

Uploaded CPython 3.7m

File details

Details for the file torchjpeg-0.9.27.tar.gz.

File metadata

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

File hashes

Hashes for torchjpeg-0.9.27.tar.gz
Algorithm Hash digest
SHA256 1e4023aa24f3868d4b61df975ad50e44c8fc58502143b88e8ce335b36165f20a
MD5 fae123ff18de6b21bf114e3214dfe746
BLAKE2b-256 0ce39d03dbf8fc3793d67dc08195c763577eb409cd299238572fd01fca052343

See more details on using hashes here.

File details

Details for the file torchjpeg-0.9.27-cp310-cp310-manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for torchjpeg-0.9.27-cp310-cp310-manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 ba988e531112e8b6d07d9ccb4c807ea0a561d9bda3018f1f68430fecdc895411
MD5 f69f9d7b922a8ccd5d8fbce2adb0c70e
BLAKE2b-256 f63ea9f23af76df57352c20fec4087f650e6536adc6d09e3950504eb4d4ae692

See more details on using hashes here.

File details

Details for the file torchjpeg-0.9.27-cp39-cp39-manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for torchjpeg-0.9.27-cp39-cp39-manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 989a89b77cb4fcd2c2fb6f8b934e953a602b74b61a360fad4bf1fb5ff8f6758d
MD5 a55f9b821be2a7ca84fb65aacdf94775
BLAKE2b-256 f180581c539385c7792e6e8ec35bb40ca2c9076b2c5f62eb6d60ee444734adbb

See more details on using hashes here.

File details

Details for the file torchjpeg-0.9.27-cp38-cp38-manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for torchjpeg-0.9.27-cp38-cp38-manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 06df01268cee8550fc54183662fc520440f15817ad621f31543abfcc03802f42
MD5 4b031610c2ed6936c495dba0a8c7501e
BLAKE2b-256 43d27ae39a908e6ee3da27c2a30bdae559bb57f192918ed4e4f14a553c3bda47

See more details on using hashes here.

File details

Details for the file torchjpeg-0.9.27-cp37-cp37m-manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for torchjpeg-0.9.27-cp37-cp37m-manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 1001200d70dbf97aba6b8c5276cd098638e556a26fb6802715668f30d6fe129f
MD5 93471d7b2db84a971d6223843ef29333
BLAKE2b-256 0d16ed1e41961b5607a0bee2ec554547a008e69656c07264c333dbd4b7cc84fa

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