GithubHelp home page GithubHelp logo

kepengxu / deep-hdrreconstruction Goto Github PK

View Code? Open in Web Editor NEW

This project forked from marcelsan/deep-hdrreconstruction

0.0 0.0 0.0 40.99 MB

Official PyTorch implementation of "Single Image HDR Reconstruction Using a CNN with Masked Features and Perceptual Loss" (SIGGRAPH 2020)

Home Page: https://people.engr.tamu.edu/nimak/Papers/SIGGRAPH2020_HDR

License: BSD 3-Clause "New" or "Revised" License

Python 100.00%

deep-hdrreconstruction's Introduction

Deep-HdrReconstruction

Official PyTorch implementation of "Single Image HDR Reconstruction Using a CNN with Masked Features and Perceptual Loss" (SIGGRAPH 2020) Project | Paper

We propose a novel deep learning approach to reconstruct an HDR image by recovering the saturated pixels of a single input LDR image in a visually pleasing way. Our method can reconstruct regions with high luminance, such as the bright highlights of the windows (red inset), and generate visually pleasing textures and details (green insert). For more information on the method please see the project website.

image

Requirements

This codebase was developed and tested with PyTorch 1.2 and Python 3.6.

  • Python 3.6+
  • Pytorch 1.2
  • torchvision
  • OpenCV
  • Numpy
  • tensorboardX
  • tqdm
  • Pillow
  • pyexr
  • OpenEXR
pip install -r requirements.txt

You may have to install OpenEXR through the appropriate package manager before pip install (e.g. sudo apt-get install openexr and libopenexr-dev on Ubuntu).

Download the repository

https://github.com/marcelsan/Deep-HdrReconstruction.git

Usage

Pretrained model

The pretrained model checkpoints can be found in the checkpoints folder on Google Drive.

Inference

CUDA_VISIBLE_DEVICES=1 python test_hdr.py --test_dir <images/dir> --out_dir <out/dir> --weights <weight/path>.pth 

Parameters and their description:

test_dir: input images directory. A few images are avaible on the data/ folder.
out_dir: path to output directory.
weights: path to the trained CNN weights.


If cuda is available, it will be used. In case you want to run the model on cpu, use --cpu when executing test_hdr.py

References

If you find this work useful for your research, please cite:

@article{Marcel:2020:LDRHDR,
author = {Santos, Marcel Santana and Tsang, Ren and Khademi Kalantari, Nima},
title = {Single Image HDR Reconstruction Using a CNN with Masked Features and Perceptual Loss},
journal = {ACM Transactions on Graphics},
volume = {39},
number = {4},
year = {2020},
month = {7},
doi = {10.1145/3386569.3392403}
}

Contact

Please contact Marcel Santos ([email protected]) if there are any issues/comments/questions.

License

Copyright (c) 2020, Marcel Santana.

All rights reserved.

The code is distributed under a BSD license. See LICENSE for information.

deep-hdrreconstruction's People

Contributors

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