shlogg · Early preview
Super Kai (Kazuya Ito) @superkai_kazuya

Software Engineering And Web Development: JPEG Compression In PyTorch

JPEG compression applied to images with quality range [0, 100] using torchvision.transforms.v2.JPEG. Example usage: JPEG(quality=[50, 100])

Buy Me a Coffee☕
*Memos:

My post explains OxfordIIITPet().

JPEG() can randomly apply JPEG compression to an image as shown below:
*Memos:

The 1st argument for initialization is quality(Required-Type:int):
*Memos:

It's the range of the quality [min, max] so it must be min <= max.
It must be 0 <= x <= 100.
A tuple/list must be the 1D with 2 elements.
A single value means [quality, quality].


There is the 1st argument(Required-Type:PIL Image or tensor(int(uint8))). *A tensor must be 3D.

v2 is recommended to use according to V1 or V2? Which one should I use?.


from torchvision.datasets imp...