Code Monkey home page Code Monkey logo

nhdrrnet-pytorch's Introduction

NHDRRNet-pytorch

๐Ÿ“ท NHDRRNet (TIP'20) implementation using PyTorch framework

Introduction

This repository is the implementation of NHDRRNet [2] using PyTorch framework. The author did not open the code, therefore, we create this repository to implement NHDRRNet using PyTorch framework.

Requirements

  • PyTorch 1.4+
  • Cuda version 10.1+
  • OpenCV
  • numpy, tqdm, scipy, etc

Getting Started

Download Dataset

The Kalantari Dataset can be downloaded from https://www.robots.ox.ac.uk/~szwu/storage/hdr/kalantari_dataset.zip [2].

Dataset Model Selection

There are two dataset models provided in dataset folder. Using HDRpatches.py will generate patches in patches folder and will cost ~200GB spaces, but it runs faster. Using HDR.py (default) will open image file only when it needs to do so, thus it will save disk space. Feel free to choose the method you want.

Configs Modifications

  • You may modify the arguments in Configs() to satisfy your own environment, for specific arguments descriptions, see utils/configs.py.
  • You may modify arguments of NHDRRNet to train a better model, for specific arguments descriptions, see config dictionary in models/NHDRRNet.py.

Train

python train.py

Test

First, make sure that you have models (checkpoint.tar) under checkpoint_dir (which is defined in Configs()).

python test.py

Note. test.py will dump the result images in sample folder.

Tone-mapping (post-processing)

Generated HDR images are in .hdr format, which may not be properly displayed in your image viewer directly. You may use Photomatix for tonemapping [2]:

  • Download Photomatix free trial, which won't expire.
  • Load the generated .hdr file in Photomatix.
  • Adjust the parameter settings. You may refer to pre-defined styles, such as Detailed and Painterly2.
  • Save your final image in .tif or .jpg.

Reference

[1] Yan, Qingsen, et al. "Deep hdr imaging via a non-local network." IEEE Transactions on Image Processing 29 (2020): 4308-4322.

[2] elliottwu/DeepHDR repository: https://github.com/elliottwu/DeepHDR

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.