GithubHelp home page GithubHelp logo

yanwang202199 / elic-reimplemetation Goto Github PK

View Code? Open in Web Editor NEW

This project forked from vincentchandelier/elic-reimplemetation

0.0 0.0 0.0 111 KB

Implemetation of ELIC: Efficient Learned Image Compression with Unevenly Grouped Space-Channel Contextual Adaptive Coding

Python 100.00%

elic-reimplemetation's Introduction

ELIC: Efficient Learned Image Compression withUnevenly Grouped Space-Channel Contextual Adaptive Coding.

A Pytorch Implementation of "ELIC: Efficient Learned Image Compression withUnevenly Grouped Space-Channel Contextual Adaptive Coding."

Note that This Is Not An Official Implementation Code.

More details can be found in the following paper:

@inproceedings{he2022elic,
  title={Elic: Efficient learned image compression with unevenly grouped space-channel contextual adaptive coding},
  author={He, Dailan and Yang, Ziming and Peng, Weikun and Ma, Rui and Qin, Hongwei and Wang, Yan},
  booktitle={Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition},
  pages={5718--5727},
  year={2022}
}

Related links

Available Checkpoint

lambda Link
0.45 0.45
0.15 0.15
0.032 0.032
0.016 0.0016
0.008 0.008
0.004 0.004

dataset

According to the paper, They train the models on the largest 8000 images picked from ImageNet dataset. so download the ImageNet

unzip those download images

# cd the imagedatasetSavingDir
for tar in *.tar;  do tar xvf $tar; done

Run the code to prepare the Training dataset.

Environment

This code is based on the CompressAI.

   pip3 install torch torchvision torchaudio
   pip3 install compressai=1.1.5
   pip3 install thop, ptflops, timm

Usage

Train Usage

cd Code
python3 train.py -d ./dataset --N 192 --M 320 -e 4000 -lr 1e-4 -n 8 --lambda 13e-3 --batch-size 16 --test-batch-size 16 --aux-learning-rate 1e-3 --patch-size 256 256 --cuda --save --seed 1926 --clip_max_norm 1.0

In ELIC, each model is finetune by 200 epoches.

python3 train.py -d ./dataset --N 192 --M 320 -e 4000 -lr 1e-4 -n 8 --lambda 13e-3 --batch-size 16 --test-batch-size 16 --aux-learning-rate 1e-3 --patch-size 256 256 --cuda --save --seed 1926 --clip_max_norm 1.0 --pretrained --checkpoint Pretrained4000epoch_checkpoint.pth.tar

Update the entropy model

python3 -m updata.py checkpoint -n updatacheckpoint-name

Test

python Inference.py --dataset ./dataset/Kodak --output_path ELIC_0450_ft_3980_Plateau -p /root/ELICReIm/ELIC_0450_ft_3980_Plateau.pth.tar --patch 64

RD Results

We trained the network and ask the RD points from the author.

elic-reimplemetation's People

Contributors

vincentchandelier avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.