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

Uploaded Source

Built Distributions

torchjpeg-0.9.23-cp310-cp310-manylinux2014_x86_64.whl (4.1 MB view details)

Uploaded CPython 3.10

torchjpeg-0.9.23-cp39-cp39-manylinux2014_x86_64.whl (4.1 MB view details)

Uploaded CPython 3.9

torchjpeg-0.9.23-cp38-cp38-manylinux2014_x86_64.whl (4.1 MB view details)

Uploaded CPython 3.8

torchjpeg-0.9.23-cp37-cp37m-manylinux2014_x86_64.whl (4.1 MB view details)

Uploaded CPython 3.7m

File details

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

File metadata

  • Download URL: torchjpeg-0.9.23.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.23.tar.gz
Algorithm Hash digest
SHA256 697cf7a9a1a367f1f5480ec791437da4b8ba1da0cbf7261ed2f644f08dbc87a8
MD5 b8d8f1f10de769bc0423757b672e230d
BLAKE2b-256 77edf596af377500a81864c55f4f224edbe91cc83072fbda3eda2f27d9b52724

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for torchjpeg-0.9.23-cp310-cp310-manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 0238d1602d5e8ac7e74202c5758111640ef6f0b856076a7f9fd57c69e3218397
MD5 1503f963cf331a76e173818ce3fe93ca
BLAKE2b-256 ec4ddbc345d08a0231aeb8bb061eb247acea75ca0d83fb05082fda315b3709b1

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for torchjpeg-0.9.23-cp39-cp39-manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 c15780dbf807b270c8b7a4ef23f21e1c2e10e1555f0d30ba87251501ab40f176
MD5 acc269f81ba5072dd1a1d3801f4d37c5
BLAKE2b-256 6e008b4348357a646c23771c5f0f8aefd35d40c008fdfea6513ba7ba5b01deac

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for torchjpeg-0.9.23-cp38-cp38-manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 10e58ad579a2ef9c73478e6ecf6b23a4a1c3e2f5e831240e2e4acee7738230e0
MD5 c742a1a9d1208bd5d3da05ff7c39ff04
BLAKE2b-256 5ab59d8571d544e4e0aa38011887a0fa7cab7010404780a96498b00b971476f3

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for torchjpeg-0.9.23-cp37-cp37m-manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 e474451288baad452ff1ccab8726351f463cbbd9133f25a6f72afb97a0c6ac79
MD5 276eaae76c335a960dd71e59d4090ac3
BLAKE2b-256 ac73c62757e9d1cc606a6fa7812e9e6eb288574a1f2d03b3ce557c8234a1a2a7

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