GithubHelp home page GithubHelp logo

mdyao / hdr-bitnet Goto Github PK

View Code? Open in Web Editor NEW
4.0 1.0 0.0 55.44 MB

[TMM 2023] Official Implementation of "Bidirectional Translation Between UHD-HDR and HD-SDR Videos"

License: MIT License

Python 100.00%
enhancement hdr hdr-image image hdr-standard sdr-to-hdr bidirectional hdr-generation hdr-video

hdr-bitnet's Introduction

Bidirectional Translation between UHD-HDR and HD-SDR Videos Paper

Mingde Yao, Dongliang He, Xin Li, Zhihong Pan, and Zhiwei Xiong*

*Corresponding Author, University of Science and Technology of China (USTC)

๐Ÿš€ This is the official repository of HDR-BiTNet (TMM 2023).

HDR-BiTNet aims at addressing the practical translation between UHD-HDR (HDRTV) and HD-SDR (SDRTV) videos.

We provide the training and test code along with the trained weights and the dataset (train+test) used for the HDR-BiTNet.

โค๏ธ If you find this repository useful, please star this repo ๐ŸŒŸ and cite our paper ๐Ÿ“„.

Reference:

Mingde Yao, Dongliang He, Xin Li, Zhihong Pan, and Zhiwei Xiong, "Bidirectional Translation Between UHD-HDR and HD-SDR Videos", IEEE Transactions on Multimedia, 2023.

Bibtex:

@article{yao2023bidirectional,
  title={Bidirectional Translation Between UHD-HDR and HD-SDR Videos},
  author={Yao, Mingde and He, Dongliang and Li, Xin and Pan, Zhihong and Xiong, Zhiwei},
  journal={IEEE Transactions on Multimedia},
  year={2023},
  publisher={IEEE}
}

Video example

test_set_AdobeExpress_AdobeExpress_AdobeExpress

This GIF image has been tone-mapped to SDR and compressed for visibility.

See more comparison of SDR video and HDR video in example/ folder.

โš ๏ธ Note: The HDR.mp4 file is encoded to comply with the HDR10 standard. For the best viewing experience, please watch the video on certified HDR displays with maximum brightness. Alternatively, a Mac Book Pro can be used for convenience.

Test code

Quick Start

  1. Download the test dataset from this link.
  2. Unzip and place the 'test' dataset in a proper folder, e.g., /testdata.
  3. Put the pretrained model file (./model.pth) in a proper folder.
  4. Set a config file in options/test/, then run as following:
python test.py -opt options/test/test.yml

Code Framework

The code framework follows BasicSR.

Contents

Config: options/ Configure the options for data loader, network structure, model, training strategies and etc.

Data: data/ A data loader to provide data for training, validation and testing.

Model: models/ Construct models for training and testing.

Network: models/modules/ Construct network architectures.

Contact

If you have any problem with the released code, please do not hesitate to open an issue.

For any inquiries or questions, please contact me by email ([email protected]).

hdr-bitnet's People

Contributors

mdyao avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar

hdr-bitnet's Issues

How to run a simple png -> png with this code?

How can I use this code to run a simple PNG to PNG image test?
I see your example code but it does not show how you have made the very impressive video example?
I would like to learn how to do this.

Not able to run the test

Hello, thank you for your repository!

I am having trouble executing the test, I was hoping you could provide some guidance @mdyao ?

I got as far as modifying this line to load the SDR file but I then get the following error below. Do you have any advice what I am doing wrong?

image

Original Traceback (most recent call last):
  File "C:\Python39\lib\site-packages\torch\utils\data\_utils\worker.py", line 308, in _worker_loop
    data = fetcher.fetch(index)
  File "C:\Python39\lib\site-packages\torch\utils\data\_utils\fetch.py", line 51, in fetch
    data = [self.dataset[idx] for idx in possibly_batched_index]
  File "C:\Python39\lib\site-packages\torch\utils\data\_utils\fetch.py", line 51, in <listcomp>
    data = [self.dataset[idx] for idx in possibly_batched_index]
  File "C:\Users\Development\HDR-BiTNet\data\JSH_dataset_val.py", line 42, in __getitem__
    S = extrac_structure(HDR_img, SDR_img)
  File "C:\Users\Development\HDR-BiTNet\models\extrac_S.py", line 50, in extrac_structure
    out, HDR, SDR = extract_S(hdr, sdr)
  File "C:\Users\Development\HDR-BiTNet\models\extrac_S.py", line 36, in extract_S
    out = (SDR + HDR)/2
ValueError: operands could not be broadcast together with shapes (1,1,3840,2160) (1,1,1920,1080)

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.