Giter Club home page Giter Club logo

abcd's Introduction

ABCD : Arbitrary Bitwise Coefficient for De-quantization

This repository contains the official implementation for ABCD introduced in the following paper:

ABCD : Arbitrary Bit-wise Coefficient for De-quantization (CVPR 2023)

DEMO

label_abcd_result_demo_github.mp4

Our ABCD reconstruct randomly quantized images with single training!

Installation

Our code is based on Ubuntu 20.04, pytorch 1.10.0, CUDA 11.3 (NVIDIA RTX 3090 24GB, sm86) and python 3.6.

For enviorment setup, we recommend to use conda for installation:

conda env create --file environment.yaml
conda activate abcd

Datasets

Our train and valid sets follows the prior work Punnappurath et. al., sampled from MIT-Adove FiveK and Sintel dataset.

For the benchmark part in Tab 1, we tested Kodak, TESTIMAGES1200 (\B01C00 folder), and ESPLv2 datasets.

Train

The basic train code is :

python train.py --config configs/train_ABCD/SomeConfigs.yaml --gpu 0

We provide configurations of our main paper

EDSR-ABCD : configs/train_ABCD/train_EDSR-ABCD.yaml

RDN-ABCD : configs/train_ABCD/train_RDN-ABCD.yaml

SwinIR-ABCD : configs/train_ABCD/train_SwinIR-ABCD.yaml

EDSR-baseline_ABCD : configs/train_ABCD/train_EDSR-baseline_ABCD.yaml

If you want to modify some configuration (e.g. the range of input bit-depth) modify .yaml files and run

python train.py --config configs/train_ABCD/FancyConfiguration.yaml --gpu 0

Pretrained Models

We provide pre-trained models of our ABCD. Test our models with test codes below.

Check the training time and required the number of GPU for training.

Model Training time (# GPU)
EDSR-ABCD 65h (1 GPU)
RDN-ABCD 82h (2 GPU)
SwinIR-ABCD 130h (4 GPU)

We recommend trying EDSR-baseline_ABCD since it is lighter than models above.

Test

To test our model, run the code below :

python test.py --config configs/test_ABCD/abcd_test-16bits.yaml --model save/PATHS/MODEL.pth --LBD 4 --HBD 8 --gpu 0

16-bit image dataset : /configs/test_ABCD/abcd_test-16bits.yaml (e.g. MIT-5K, TESTIMAGES1200)

8-bit image dataset : /configs/test_ABCD/abcd_test-8bits.yaml (e.g. Kodak)

If you want to test another labels, you may change flag 'LBD' and 'HBD' to test your model.

(e.g. 3-bits to 12-bits --LBD 3 --HBD 12, respectively)

For SwinIR based ABCD, test code needs additional flag --window 8

You can save results with using the flag --save 1.

Acknowledgements

This code is built on LIIF,LTE and SwinIR. We thank the authors for sharing their codes.

abcd's People

Contributors

wookyounghan 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.