Giter VIP home page Giter VIP logo

unpaired_hdr_tmo's Introduction

Unpaired Learning for High Dynamic Range Image Tone Mapping

Pytorch implementation of our method for HDR image tome mapping using GAN.



Installation

Installation via Docker [Recommended]

We provide a docker that contains the code and all the necessary libraries. It's simple to install and run.

docker build -t unpaired_tmo .
docker run --name unpaired_tmo -it -p 8888:8888 unpaired_tmo /bin/bash

Installation via Pip/Conda/Virtualenv

  1. Clone the repo:
git clone https://github.com/yael-vinker/unpaired_hdr_tmo.git
cd unpaired_hdr_tmo
  1. Create a new environment and install the libraries:
python3.6 -m venv hdr_venv
source hdr_venv/bin/activate
pip install -r requirements.txt


Quickstart (Run Demo Locally)

Run a model on your own image

To run the trained model of a task on a specific image:

cd activate_trained_model
python run_trained_model.py

Specify the path to a folder containing the input images using --input_images_path, the tone mapped images will be saved to the folder under --output_path.

unpaired_hdr_tmo's People

Contributors

clipasso avatar yael-vinker avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

unpaired_hdr_tmo's Issues

About license of the code

Thank you for sharing great code!
Could you kindly let us know about the license of this project?

If we could know the exact license of this code, we can use this project for our internal R&D projects!

cuDNN error

I followed the instructions and installed the requirements in the environment.yaml but I get the following error:ย 

Traceback (most recent call last):
  File "run_trained_model.py", line 147, in <module>
    run_trained_model(opt)
  File "run_trained_model.py", line 53, in run_trained_model
    output_images_path, args.f_factor_path, None, model_params["final_shape_addition"])
  File "run_trained_model.py", line 68, in run_model_on_path
    model_params, f_factor_path, final_shape_addition)
  File "/media/cgl/MUSKETEER_DATA/frameworks/unpaired_hdr_tmo/utils/model_save_util.py", line 209, in run_model_on_single_image
    fake = G_net(gray_im_log.unsqueeze(0), apply_crop=model_params["add_frame"], diffY=diffY, diffX=diffX)
  File "/home/cgl/miniconda3/envs/vinker/lib/python3.6/site-packages/torch/nn/modules/module.py", line 547, in __call__
    result = self.forward(*input, **kwargs)
  File "/media/cgl/MUSKETEER_DATA/frameworks/unpaired_hdr_tmo/models/unet_multi_filters/Unet.py", line 86, in forward
    next_x = self.inc(x)
  File "/home/cgl/miniconda3/envs/vinker/lib/python3.6/site-packages/torch/nn/modules/module.py", line 547, in __call__
    result = self.forward(*input, **kwargs)
  File "/media/cgl/MUSKETEER_DATA/frameworks/unpaired_hdr_tmo/models/unet_multi_filters/unet_parts.py", line 202, in forward
    x = self.conv(x)
  File "/home/cgl/miniconda3/envs/vinker/lib/python3.6/site-packages/torch/nn/modules/module.py", line 547, in __call__
    result = self.forward(*input, **kwargs)
  File "/media/cgl/MUSKETEER_DATA/frameworks/unpaired_hdr_tmo/models/unet_multi_filters/unet_parts.py", line 64, in forward
    x = self.conv(x)
  File "/home/cgl/miniconda3/envs/vinker/lib/python3.6/site-packages/torch/nn/modules/module.py", line 547, in __call__
    result = self.forward(*input, **kwargs)
  File "/home/cgl/miniconda3/envs/vinker/lib/python3.6/site-packages/torch/nn/modules/conv.py", line 343, in forward
    return self.conv2d_forward(input, self.weight)
  File "/home/cgl/miniconda3/envs/vinker/lib/python3.6/site-packages/torch/nn/modules/conv.py", line 340, in conv2d_forward
    self.padding, self.dilation, self.groups)
RuntimeError: cuDNN error: CUDNN_STATUS_EXECUTION_FAILED

One question about the result

Hi, I encountered one problem when I use the default belgium.hdr for inference.
test
There is a darker part on the upper edge of the door. I wonder if it is normal ?

Configuation for Reproduction from Scratch

Thank you for sharing your great research.

Short Quesition: What is the exact configuration (config.py) to train the model from scratch?
I would like to train your model using the training code (main_train.py) but I am somewhat unable to figure out the details of the training configuration.

Thank you.

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.