NeRD: Neural Reflectance Decomposition from Image Collections

Overview

NeRD: Neural Reflectance Decomposition from Image Collections

Project Page | Video | Paper | Dataset

Implementation for NeRD. A novel method which decomposes multiple images into shape, BRDF and illumination.

NeRD: Neural Reflectance Decomposition from Image Collections
Mark Boss1, Raphael Braun1, Varun Jampani2, Jonathan T. Barron2, Ce Liu2, Hendrik P. A. Lensch1
1University of Tübingen, 2Google Research

Datasets

All datasets are uploaded in individual git repositories. We have created a download script which automatically fetches all datasets and downloads them to a specified folder. Usage:

python download_datasets.py /path/to/dataset/root

Citation

@article{Boss2020-NeRD,
  author  = {Boss, Mark and Braun, Raphael and Jampani, Varun and Barron, Jonathan T. and Liu, Ce and Lensch, Hendrik P.A.},
  title   = {NeRD: Neural Reflectance Decomposition from Image Collections},
  journal = {CoRR},
  year    = {2020}
}
Comments
  • Generating new SGs

    Generating new SGs

    Hey, thank you for the awesome work.

    I want to test relighting with custom scenes, how can I convert an exr environment map into SGs? I've tried the fitting script from PhySG. It looks like their SGs is not the same format as yours.

    opened by CyxFTS 2
  • Relighted image generation

    Relighted image generation

    Congrats on such great work!

    In Figure A6 as well as Figure 4 of the paper, a relighted scene under envmap and point light for specific object is captured. Would someone kindly explain to me how is the relighted image generated? Do we need to use a separate rendering for this step or can we get this result from the trained model?

    opened by HollyDQWang 1
  • OpenEXR images are broken in released datasets

    OpenEXR images are broken in released datasets

    Hello, thank you for your great work!

    I executed download_datasets.py and downloaded image datasets, but I found OpenEXR images in synthetic directory are broken. Does anybody have the same problem?

    opened by dkasuga 1
  • Do you have any plans to open your code?

    Do you have any plans to open your code?

    Hi, thank you for your great works. However, you said that you released the code in your paper, but I can't find the available code. Do you have any plans to open your code?

    Best regards.

    opened by Minsoo2022 1
  • Some questions about illumination

    Some questions about illumination

    Hi, thanks for this wonderful job. I have some questions running on my own data. I have just a masked video, and used the mean_sgs.npy you provided as illuminations. After training the network, i tried to render a bullet-time video, but when i changed the view directions, the renderd image are wrong. others like surface normal and brdf seems still right. Is this error caused by the mean_sgs.npy? I'm not familiar with this. It would be great help if you help me with it!

    opened by sunwenzhang1996 0
  • Thanks!

    Thanks!

    How do I run your program? python nerd.py --datadir [DIR_TO_DATASET_FOLDER] --basedir [TRAIN_DIR] --expname [EXPERIMENT_NAME] --gpu [COMMA_SEPARATED_GPU_LIST]

    Can you be a little more specific?

    opened by YoujiaZhang 0
  • tensorflow.python.framework.errors_impl.AlreadyExistsError: Another metric with the same name already exists.

    tensorflow.python.framework.errors_impl.AlreadyExistsError: Another metric with the same name already exists.

    When running the training script right after following the installation instructions this error occurs:

      File "train_nerd.py", line 9, in <module>
        import dataflow.nerd as data
      File "/tmp/NeRD-Neural-Reflectance-Decomposition/dataflow/nerd/__init__.py", line 4, in <module>
        from dataflow.nerd.dataflow import add_args, create_dataflow
      File "/tmp/NeRD-Neural-Reflectance-Decomposition/dataflow/nerd/dataflow.py", line 3, in <module>
        import tensorflow_addons as tfa
      File "/usr/local/google/home/martinarroyo/miniconda3/envs/nerd-tmp/lib/python3.8/site-packages/tensorflow_addons/__init__.py", line 21, in <module>
        from tensorflow_addons import activations
      File "/usr/local/google/home/martinarroyo/miniconda3/envs/nerd-tmp/lib/python3.8/site-packages/tensorflow_addons/activations/__init__.py", line 17, in <module>
        from tensorflow_addons.activations.gelu import gelu
      File "/usr/local/google/home/martinarroyo/miniconda3/envs/nerd-tmp/lib/python3.8/site-packages/tensorflow_addons/activations/gelu.py", line 19, in <module>
        from tensorflow_addons.utils.types import TensorLike
      File "/usr/local/google/home/martinarroyo/miniconda3/envs/nerd-tmp/lib/python3.8/site-packages/tensorflow_addons/utils/types.py", line 24, in <module>
        from keras.engine import keras_tensor
      File "/usr/local/google/home/martinarroyo/miniconda3/envs/nerd-tmp/lib/python3.8/site-packages/keras/__init__.py", line 25, in <module>
        from keras import models
      File "/usr/local/google/home/martinarroyo/miniconda3/envs/nerd-tmp/lib/python3.8/site-packages/keras/models.py", line 20, in <module>
        from keras import metrics as metrics_module
      File "/usr/local/google/home/martinarroyo/miniconda3/envs/nerd-tmp/lib/python3.8/site-packages/keras/metrics.py", line 26, in <module>
        from keras import activations
      File "/usr/local/google/home/martinarroyo/miniconda3/envs/nerd-tmp/lib/python3.8/site-packages/keras/activations.py", line 20, in <module>
        from keras.layers import advanced_activations
      File "/usr/local/google/home/martinarroyo/miniconda3/envs/nerd-tmp/lib/python3.8/site-packages/keras/layers/__init__.py", line 23, in <module>
        from keras.engine.input_layer import Input
      File "/usr/local/google/home/martinarroyo/miniconda3/envs/nerd-tmp/lib/python3.8/site-packages/keras/engine/input_layer.py", line 21, in <module>
        from keras.engine import base_layer
      File "/usr/local/google/home/martinarroyo/miniconda3/envs/nerd-tmp/lib/python3.8/site-packages/keras/engine/base_layer.py", line 43, in <module>
        from keras.mixed_precision import loss_scale_optimizer
      File "/usr/local/google/home/martinarroyo/miniconda3/envs/nerd-tmp/lib/python3.8/site-packages/keras/mixed_precision/loss_scale_optimizer.py", line 18, in <module>
        from keras import optimizers
      File "/usr/local/google/home/martinarroyo/miniconda3/envs/nerd-tmp/lib/python3.8/site-packages/keras/optimizers.py", line 26, in <module>
        from keras.optimizer_v2 import adadelta as adadelta_v2
      File "/usr/local/google/home/martinarroyo/miniconda3/envs/nerd-tmp/lib/python3.8/site-packages/keras/optimizer_v2/adadelta.py", line 22, in <module>
        from keras.optimizer_v2 import optimizer_v2
      File "/usr/local/google/home/martinarroyo/miniconda3/envs/nerd-tmp/lib/python3.8/site-packages/keras/optimizer_v2/optimizer_v2.py", line 36, in <module>
        keras_optimizers_gauge = tf.__internal__.monitoring.BoolGauge(
      File "/usr/local/google/home/martinarroyo/miniconda3/envs/nerd-tmp/lib/python3.8/site-packages/tensorflow/python/eager/monitoring.py", line 360, in __init__
        super(BoolGauge, self).__init__('BoolGauge', _bool_gauge_methods,
      File "/usr/local/google/home/martinarroyo/miniconda3/envs/nerd-tmp/lib/python3.8/site-packages/tensorflow/python/eager/monitoring.py", line 135, in __init__
        self._metric = self._metric_methods[self._label_length].create(*args)
    tensorflow.python.framework.errors_impl.AlreadyExistsError: Another metric with the same name already exists.
    

    This occurs directly in the imports, and it seems to be fixed by upgrading the required version of TensorFlow from 2.6.0 to 2.6.2. Since this does only affect the patch version number, it should not introduce any breaking changes.

    opened by martinarroyo 0
  • Unrealistic training times (~5 days per scene)

    Unrealistic training times (~5 days per scene)

    This paper is simply brilliant, however the implementation appears to require at least 4-5 parallel GPUs. On a single GPU (RTX 2080), about one set of course / fine samples + illuminations are generated per hour. The args file shows fine_samples set to 128. I presume this means, at last on my hardware, that this model will take well over 5 days to train vs. ~30 minutes with the latest photogrammetry tools (with GPU-supported mesh lighting). Is there any way to make results more accessible without spending $10k+ on hardware / cloud services? Even with, say, 5 Tesla V100s, the training time for a small scene will still be over 15 hours. The value-time tradeoff is uneven. Surely, there must be a way to close this gap.

    opened by VisionaryMind 0
  • Blank Results

    Blank Results

    I am trying to follow and reproduce your work but meet some problem. I tried the script in README but find the rgb output is all white. This is my command: python train_nerd.py --datadir /root/Data/synthetic/Chair/ --basedir ~/Experiments --expname 03_nerd_official --gpu 0,1,2,3 --config configs/nerd/blender.txt

    I checked that the ground truth image can be correctlly read. When debugging, I find that 'target' and 'target_mask' are all correct but payload['rgb'] always output 1.0 after training. Any ideas? Thanks a lot!

    opened by Woolseyyy 2
  • Code for mesh extraction

    Code for mesh extraction

    Hello Thanks for your awesome work I wonder If you have any plans to open code for mesh extraction (textured mesh, following 4 steps in your supplementary paper)

    opened by yeong5366 2
  • Running Error

    Running Error

    Hi, it's quite a nice work you have made. So I tried to re-implement it based on the code and command you published. However, when I directly runs your code on the synthetic data, following your commands. The generated testing images are all white, here is my running command:

    nohup python -u train_nerd.py --datadir /home/ma-user/work/zhl/nerd_pro/nerd_data/synthetic/Car --basedir /home/ma-user/work/zhl/nerd_pro/nerd --expname car --gpu 0,1,2,3 --spherify --config configs/nerd/blender.txt > logs/car4.out 2>&1 &

    Where the 'basedir' is the directory that contains 'train_nerd.py'. I tried both to add or not add the 'spherify' option, but the generated testing images are all white. Could you give me some suggestions?

    opened by JiuTongBro 1
Owner
Computergraphics (University of Tübingen)
Computergraphics (University of Tübingen)
Neural Factorization of Shape and Reflectance Under An Unknown Illumination

NeRFactor [Paper] [Video] [Project] This is the authors' code release for: NeRFactor: Neural Factorization of Shape and Reflectance Under an Unknown I

Google 283 Jan 4, 2023
Few-NERD: Not Only a Few-shot NER Dataset

Few-NERD: Not Only a Few-shot NER Dataset This is the source code of the ACL-IJCNLP 2021 paper: Few-NERD: A Few-shot Named Entity Recognition Dataset.

THUNLP 319 Dec 30, 2022
STYLER: Style Factor Modeling with Rapidity and Robustness via Speech Decomposition for Expressive and Controllable Neural Text to Speech

STYLER: Style Factor Modeling with Rapidity and Robustness via Speech Decomposition for Expressive and Controllable Neural Text to Speech Keon Lee, Ky

Keon Lee 114 Dec 12, 2022
This is the code repository implementing the paper "TreePartNet: Neural Decomposition of Point Clouds for 3D Tree Reconstruction".

TreePartNet This is the code repository implementing the paper "TreePartNet: Neural Decomposition of Point Clouds for 3D Tree Reconstruction". Depende

刘彦超 34 Nov 30, 2022
Code for "Unsupervised Layered Image Decomposition into Object Prototypes" paper

DTI-Sprites Pytorch implementation of "Unsupervised Layered Image Decomposition into Object Prototypes" paper Check out our paper and webpage for deta

null 40 Dec 22, 2022
Automatically creates genre collections for your Plex media

Plex Auto Genres Plex Auto Genres is a simple script that will add genre collection tags to your media making it much easier to search for genre speci

Shane Israel 63 Dec 31, 2022
EMNLP 2021 Adapting Language Models for Zero-shot Learning by Meta-tuning on Dataset and Prompt Collections

Adapting Language Models for Zero-shot Learning by Meta-tuning on Dataset and Prompt Collections Ruiqi Zhong, Kristy Lee*, Zheng Zhang*, Dan Klein EMN

Ruiqi Zhong 42 Nov 3, 2022
PyTorch implementation of "Representing Shape Collections with Alignment-Aware Linear Models" paper.

deep-linear-shapes PyTorch implementation of "Representing Shape Collections with Alignment-Aware Linear Models" paper. If you find this code useful i

Romain Loiseau 27 Sep 24, 2022
A Blender python script for getting asset browser custom preview images for objects and collections.

asset_snapshot A Blender python script for getting asset browser custom preview images for objects and collections. Installation: Click the code butto

Johnny Matthews 44 Nov 29, 2022
Collections for the lasted paper about multi-view clustering methods (papers, codes)

Multi-View Clustering Papers Collections for the lasted paper about multi-view clustering methods (papers, codes). There also exists some repositories

Andrew Guan 10 Sep 20, 2022
Functional TensorFlow Implementation of Singular Value Decomposition for paper Fast Graph Learning

tf-fsvd TensorFlow Implementation of Functional Singular Value Decomposition for paper Fast Graph Learning with Unique Optimal Solutions Cite If you f

Sami Abu-El-Haija 14 Nov 25, 2021
[ICLR 2021] Is Attention Better Than Matrix Decomposition?

Enjoy-Hamburger ?? Official implementation of Hamburger, Is Attention Better Than Matrix Decomposition? (ICLR 2021) Under construction. Introduction T

Gsunshine 271 Dec 29, 2022
official code for dynamic convolution decomposition

Revisiting Dynamic Convolution via Matrix Decomposition (ICLR 2021) A pytorch implementation of DCD. If you use this code in your research please cons

Yunsheng Li 110 Nov 23, 2022
Continuous Query Decomposition for Complex Query Answering in Incomplete Knowledge Graphs

Continuous Query Decomposition This repository contains the official implementation for our ICLR 2021 (Oral) paper, Complex Query Answering with Neura

UCL Natural Language Processing 71 Dec 29, 2022
DeepLM: Large-scale Nonlinear Least Squares on Deep Learning Frameworks using Stochastic Domain Decomposition (CVPR 2021)

DeepLM DeepLM: Large-scale Nonlinear Least Squares on Deep Learning Frameworks using Stochastic Domain Decomposition (CVPR 2021) Run Please install th

Jingwei Huang 130 Dec 2, 2022
Learnable Multi-level Frequency Decomposition and Hierarchical Attention Mechanism for Generalized Face Presentation Attack Detection

LMFD-PAD Note This is the official repository of the paper: LMFD-PAD: Learnable Multi-level Frequency Decomposition and Hierarchical Attention Mechani

null 28 Dec 2, 2022
MEND: Model Editing Networks using Gradient Decomposition

MEND: Model Editing Networks using Gradient Decomposition Setup Environment This codebase uses Python 3.7.9. Other versions may work as well. Create a

Eric Mitchell 141 Dec 2, 2022
Autoformer: Decomposition Transformers with Auto-Correlation for Long-Term Series Forecasting

Autoformer (NeurIPS 2021) Autoformer: Decomposition Transformers with Auto-Correlation for Long-Term Series Forecasting Time series forecasting is a c

THUML @ Tsinghua University 847 Jan 8, 2023
Optimal space decomposition based-product quantization for approximate nearest neighbor search

Optimal space decomposition based-product quantization for approximate nearest neighbor search Abstract Product quantization(PQ) is an effective neare

Mylove 1 Nov 19, 2021