Utilities for JPEG data access and manipulation in pytorch
Project description
TorchJPEG
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
Built Distributions
File details
Details for the file torchjpeg-0.9.28.dev1.tar.gz
.
File metadata
- Download URL: torchjpeg-0.9.28.dev1.tar.gz
- Upload date:
- Size: 1.1 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.3.1 CPython/3.10.9 Linux/5.4.109+
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3ebd3f08d1809de95032aa137550a476f4eae8e1bd86f68c563c011f065fb881 |
|
MD5 | 2eed5408b52e83841b0615227c07e658 |
|
BLAKE2b-256 | 4228d4a84b78c2be539c92d3347f6981aa14e0fc25e4d8fa9ebfc9573c252c30 |
File details
Details for the file torchjpeg-0.9.28.dev1-cp310-cp310-manylinux2014_x86_64.whl
.
File metadata
- Download URL: torchjpeg-0.9.28.dev1-cp310-cp310-manylinux2014_x86_64.whl
- Upload date:
- Size: 4.1 MB
- Tags: CPython 3.10
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.3.1 CPython/3.10.9 Linux/5.4.109+
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 85df6127e02a6c09fe465318759c69df45290cb2fed2090091613d738bfab1b4 |
|
MD5 | 33fb618458b8c5bc97beffff946da020 |
|
BLAKE2b-256 | e24d047089c94a03fc884737ed20a52291a4d1ac8d596959b87647971004f668 |
File details
Details for the file torchjpeg-0.9.28.dev1-cp39-cp39-manylinux2014_x86_64.whl
.
File metadata
- Download URL: torchjpeg-0.9.28.dev1-cp39-cp39-manylinux2014_x86_64.whl
- Upload date:
- Size: 4.1 MB
- Tags: CPython 3.9
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.3.1 CPython/3.10.9 Linux/5.4.109+
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3a279dbb34a09a178a4e41b9adf290c1bd40f0901597f34fc508966175dcff29 |
|
MD5 | b5e946b82d0bfde75a4abc4f5db58284 |
|
BLAKE2b-256 | bf2475fc3f66376bf872bb2bc3846138e53bfd3db327170eaea067c59816b201 |
File details
Details for the file torchjpeg-0.9.28.dev1-cp38-cp38-manylinux2014_x86_64.whl
.
File metadata
- Download URL: torchjpeg-0.9.28.dev1-cp38-cp38-manylinux2014_x86_64.whl
- Upload date:
- Size: 4.1 MB
- Tags: CPython 3.8
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.3.1 CPython/3.10.9 Linux/5.4.109+
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 615734dbfc0e9d8704fe9c900bb1473ec6cf2389105bfa7469bde86d7cea0f87 |
|
MD5 | 420572a02c271d2c07e906beb230a201 |
|
BLAKE2b-256 | 5d4b61b9bb5ed1437cb5f89d3e1b09053248326d19d72f94d162d8427937f497 |
File details
Details for the file torchjpeg-0.9.28.dev1-cp37-cp37m-manylinux2014_x86_64.whl
.
File metadata
- Download URL: torchjpeg-0.9.28.dev1-cp37-cp37m-manylinux2014_x86_64.whl
- Upload date:
- Size: 4.1 MB
- Tags: CPython 3.7m
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.3.1 CPython/3.10.9 Linux/5.4.109+
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4b353c5e4641dbc7a5d3ab32361d6e84aee74487f2ca584bb563747f41416676 |
|
MD5 | 64fdef2aaa81779ca348c25a7ff85287 |
|
BLAKE2b-256 | 6571cda640580d2dff13e23f663afd4c31e762231283bceadf688663d7e47f0b |