Giter Site home page Giter Site logo

pnrnet's Introduction

PNRNet

Code for PNRNet: Physically-inspired Neural Rendering for Any-to-Any Relighting.

Method Overview

We present a deep learning-based method that incorporates the physical principles of image formation into our neural rendering design, with the aim of eliminating the task-aliasing effects and maintaining the attached-shadow details.

pipeline

Examples results: results

Dependencies and Installation

This code requires PyTorch 1.7+ and python 3+. Also, please install other dependencies by

pip install -r requirements.txt

Testing

Test our pretrained model on the NTRIE 2021 Relighting Track2 validation set.

You should set a config file in configs/config_test.json, and run as following:

python test.py

Before running the above script, you need to download the [pretrained model] (code: n3ne) and put it in the folder pretrained_models.

You also need to download the NTRIE 2021 Track2 [validation set] (code: 0td8) and unzip it to the folder Datasets/NTIRE2021_Challenge.

Training

Train three sub-networks (i.e., LENet, CTTNet and LDTNet) on the NTRIE 2021 Relighting Track2 training set separately.

Data Preparation

You should download the [train data] and unzip it to the folder Datasets/NTIRE2021_Challenge.

We also provide [normal map] (code: hv5w) and [position map] (code: ir2f). Download and put them in the folder Datasets/NTIRE2021_Challenge/track2_train.

Training LENet

Set a config file in configs/config_lenet.json, and run as following:

python train_lenet.py

Training CTTNet

Set a config file in configs/config_cttnet.json, and run as following:

python train_cttnet.py

Training LDTNet

Set a config file in configs/config_ldtnet.json, and run as following:

python train_ldtnet.py

Citation

If you use this code or these models in your research, please cite:

@article{hu2022pnrnet,
  title={{PNRNet}: Physically-inspired Neural Rendering for Any-to-Any Relighting},
  author={Hu, Zhongyun and Nsampi, Ntumba Elie and Wang, Xue and Wang, Qing},
  journal={IEEE Transactions on Image Processing},
  year={2022},
  volume={31},
  pages={3935-3948}
}

Acknowledgement

Part of the codes benefit from DPR and GridDehazeNet.

Contact

If you have any questions, please contact [email protected].

pnrnet's People

Contributors

waldenlakes avatar

Stargazers

DingbinSun avatar Huiming Jiang avatar  avatar  avatar

Watchers

 avatar

Forkers

peterzs

pnrnet's Issues

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.