https://github.com/banterle/zeroshot-hdrv

https://github.com/banterle/zeroshot-hdrv

Science Score: 39.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
    Found 6 DOI reference(s) in README
  • Academic publication links
  • Committers with academic emails
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (13.0%) to scientific vocabulary
Last synced: 10 months ago · JSON representation

Repository

Basic Info
  • Host: GitHub
  • Owner: banterle
  • License: bsd-3-clause-clear
  • Language: Python
  • Default Branch: main
  • Size: 7.28 MB
Statistics
  • Stars: 3
  • Watchers: 1
  • Forks: 1
  • Open Issues: 1
  • Releases: 0
Created almost 2 years ago · Last pushed about 1 year ago
Metadata Files
Readme License

README.md

Zeroshot-HDRV (ZHDRV)

HDR-VDP

Zeroshot-HDRV is the official implementation of the paper Self-supervised High Dynamic Range Imaging: What Can Be Learned from a Single 8-bit Video? With Zeroshot-HDRV, a self-supervised approach, we show that, in many cases, a single SDR video is sufficient to generate an HDR video of the same quality or better than other state-of-the-art methods.

ADVANTAGES:

Since our method is self-supervised, it does not require external dataset during the learning phase. Furthermore, if a repeated pattern is well-exposed in some parts of the videos and this pattern is over-exposed in other parts, the method can learn this pattern and use this knowledge to reconstruct the missing pattern in over-exposed areas. Please see the image below: HDR-VDP

Note that the state-of-the-art method, since they are based on static weights that cannot adapt to the video cannot fully reconstruct the missing pattern. Please see the zoom of the previous image here: HDR-VDP

SETUP:

Clone our repo and install dependencies. This is necessary for running ZHDRV.

conda create -n zhdrv conda activate zhdrv conda install ffmpeg pip install -r requirements.txt

FFMPEG is required to process .mp4/.mov files, please follow the instruction for instaling it. Note that if the video is already exported as a sequence of .png files, FFMPEG is not required.

HOW TO RUN IT:

To run Zeroshot-HDRV, you need to launch the file zhdrv.py. Some examples:

Testing Zeroshot-HDRV on a video composed by a series of .png files:

python3 zhdrv.py ./video01_sdr/ --data_type video

Testing Zeroshot-HDRV on a .mp4 video (this requires FFMPEG installed):

python3 zhdrv.py examples/windows.mp4 --data_type video

By default, the method generates -4-stop, -2-stop, +2-stop, and +4-stop exposures. Depending on the input scene, more exposures may be required to recover the dynamic range fully. For example, "examples/fireplace" requires to generate -6-stop to fully recover the fire. To achieve that please use the following command:

python3 zhdrv.py examples/fireplace.mp4 --data_type video --n_exp_down 3 --n_exp_up 2

--nexpdown 3 means that the method generates three low exposures; i.e., -2-stop, -4-stop, and -6-stop. --nexpup 2 means that the method generates two high exposures; i.e., +2-stop and +4-stop.

OUTPUTS:

When running ZHDRV on a video; e.g., fireplace.mp4, a hierarchy sof outputs will be generated in the folder ./runs; here is an example:

run | |___fireplace_lr0.0001_e128_b1_m4_t1_s-2 | |___ckpt | |___fireplace_exr | |___recs | |___logs.csv | |___params.csv

the folder ckpt contains the best and the last weights checkpoints for the network, the folder fireplace_exr containts the EXR final frames of the videos after expansion, and the folder recs containts the exposures results for the most over-exposed frame; this folder is updated during training and it is useful to check what the network is learning. Finally, params.csv contains the paramters of the training and logs.csv the total loss function per epoch.

NOTES ON TIMINGS:

This version of the code is not optimized for speed as the version used for the paper. This version is optimized to maximize compatibility with hardware (it does not require a CUDA-device) and video resolutions. Please refer to the paper timings.

WEIGHTS DOWNLOAD:

There are no weights, this method is completely self-supervised.

REFERENCE:

If you use Zeroshot-HDRV in your work, please cite it using this reference:

@article{10.1145/3648570, author = {Banterle, Francesco and Marnerides, Demetris and Bashford-rogers, Thomas and Debattista, Kurt}, title = {Self-supervised High Dynamic Range Imaging: What Can Be Learned from a Single 8-bit Video?}, year = {2024}, issue_date = {April 2024}, publisher = {Association for Computing Machinery}, address = {New York, NY, USA}, volume = {43}, number = {2}, issn = {0730-0301}, url = {https://doi.org/10.1145/3648570}, doi = {10.1145/3648570}, journal = {ACM Trans. Graph.}, month = {mar}, articleno = {24}, numpages = {16}, keywords = {High dynamic range imaging, inverse tone mapping, deep learning, computational photography} }

Owner

  • Name: Francesco Banterle
  • Login: banterle
  • Kind: user
  • Location: Italy
  • Company: ISTI-CNR

GitHub Events

Total
  • Issues event: 2
  • Watch event: 3
  • Push event: 7
Last Year
  • Issues event: 2
  • Watch event: 3
  • Push event: 7

Committers

Last synced: about 1 year ago

All Time
  • Total Commits: 6
  • Total Committers: 1
  • Avg Commits per committer: 6.0
  • Development Distribution Score (DDS): 0.0
Past Year
  • Commits: 6
  • Committers: 1
  • Avg Commits per committer: 6.0
  • Development Distribution Score (DDS): 0.0
Top Committers
Name Email Commits
Francesco Banterle f****e@g****m 6

Issues and Pull Requests

Last synced: over 1 year ago

All Time
  • Total issues: 1
  • Total pull requests: 0
  • Average time to close issues: N/A
  • Average time to close pull requests: N/A
  • Total issue authors: 1
  • Total pull request authors: 0
  • Average comments per issue: 0.0
  • Average comments per pull request: 0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 1
  • Pull requests: 0
  • Average time to close issues: N/A
  • Average time to close pull requests: N/A
  • Issue authors: 1
  • Pull request authors: 0
  • Average comments per issue: 0.0
  • Average comments per pull request: 0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
  • oliverban (1)
  • GopiRajuMatta (1)
Pull Request Authors
Top Labels
Issue Labels
Pull Request Labels