Giter VIP home page Giter VIP logo

ecsic's Introduction

ECSIC

Official code of our WACV paper "ECSIC: Epipolar Cross Attention for Stereo Image Compression" by Matthias Wödlinger, Jan Kotera, Manuel Keglevic, Jan Xu and Robert Sablatnig.

image

Check out the paper on arxiv.

Installation

Install the necessary packages from the requirements.txt file with pip:

pip install -r requirements.txt

Training

Train a new model with train.py. Example:

python train.py gpu_idx exp_name --config configs/rd_cs_ecsic_m48.json --log_dir log_dir [--options]

gpu_idx and exp_name need to be specified. The model weights are saved under log_dir/experiments/HASH_DATE_TIME (where HASH is added to prevent collisons for experiments with the same EXP_NAME).

Testing

Test a model with test.py. Example:

python test.py gpu_idx exp_name --resume_dir experiments/RD_curves/cs/0.01/

where gpu_idx and exp_name need to be specified and resume_dir can be set to any path with a config file config.json and weights file model.pt in it. Weights of trained models are available for download here. If the folder is copied to the project root the command above should replicate the results from our paper on Cityscapes for lambda=0.01 (bpp=0.089, psnr=38.56).

Data

The data can be located anywhere you want, however the train and test scripts expect text files with paths to the data. data/load_cityscapes.py and data/load_instereo2k.py automatically create such text files for the Cityscapes and InStereo2k datasets. In case something does not work you can also create them by hand by creating train.txt, eval.txt and test.txt where each line is left_image, right_image. See data/DATASET_NAME for an example.

Generate RD curves

Use generate_rd_curve.py to generate rate distortion curves. For this specifiy a list of lambda values in the command line as a string. E.g.:

python generate_rd_curve.py gpu_dix exp_name --config configs/rd_cs_ecsic_m48.json --lmda "0.001, 0.01, 0.1"

The program will then perform full train/test runs for all specified lmda values and store the results in a json file in experiments/RD_curves/exp_name/results.json and the model weights for the run with lambda=lmda in experiments/RD_curves/exp_name/lmda.

RD Curves

image

Weights to reproduce these curves are available via google drive.

Citation

If you use this project please cite our work

@inproceedings{wodlinger2024ecsic,
  title={ECSIC: Epipolar Cross Attention for Stereo Image Compression},
  author={W{\"o}dlinger, Matthias and Kotera, Jan and Keglevic, Manuel and Xu, Jan and Sablatnig, Robert},
  booktitle={Proceedings of the IEEE/CVF Winter Conference on Applications of Computer Vision},
  pages={3436--3445},
  year={2024}
}

ecsic's People

Contributors

mwoedlinger avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

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