Skip to content

cxy1997/DiffJPEG

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

DiffJPEG: A PyTorch implementation

This is a pytorch implementation of differentiable jpeg compression algorithm. This work is based on the discussion in this paper. The work relies heavily on the tensorflow implementation in this repository

Requirements

  • PyTorch
  • NumPy

Installation

python -m pip install git+git://github.com/cxy1997/DiffJPEG.git

Usage

DiffJPEG functions as a standard pytorch module/layer. To use, first import the layer and then initialize with the desired parameters:

  • differentaible(bool): If true uses custom differentiable rounding function, if false uses standrard torch.round
  • quality(float): Quality factor for jpeg compression scheme.
from DiffJPEG import DiffJPEG
jpeg = DiffJPEG(height=224, width=224, differentiable=True, quality=80)

image

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%