Skip to content

chiarapaglioni/MCRT

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

208 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MCRT Denoising

Project Structure

MCRT/
├── data/
├── dataset/
├── scripts/
├── model/
├── renderer/
├── output/
├── utils/
├── config/
├── launch.py
├── mcrt.yml

where:

  • data: raw data (XML) of the scenes/images to be rendered
  • dataset: implementation of custom dataloader class to load and process image and histogram data
  • scripts: jupyter notebooks to render scenes in low/high res (TIFF) and generate histograms (NPZ)
  • model: denoising and generative pipelines for the different modes (Noise2Noise, Hist2Noise, Hist2Hist)
  • renderer: functions used to render noisy and clean images using Mitsuba3 (supports both CPU and GPU)
  • output: folder containing the output (TIFF) files
  • utils: contains utils functions for tone mapping, logging and plotting
  • config: folder containing the configurations for the various tasks
  • launch.py: main file to run the project

Setup

Requirements:

  • Python: 3.9
  • Anaconda or Miniconda
# Create the environment from the YAML file
conda env create -f mcrt.yml

# Activate the environment
conda activate mcrt

Modes

Noise2Noise

  • stat: False --> standard noise2noise denoising pipeline. Takes as input the mean of N samples and the corresponding AOVs.
  • stat: True --> same approach as above but it concatenates the relative variance to the mean.

N2N Overview]

Hist2Noise

  • stat: False --> input consists of histogram with B bins of N samples and the corresponding AOVs.
  • stat: True --> same approach as above but it concatenates the mean and relative variance to the histogram.

H2N Overview]

Hist2Hist

  • stat: False --> input consists of histogram with B bins of N samples and the corresponding AOVs.
  • stat: True --> same approach as above but it concatenates the mean and relative variance to the histogram.

H2H Overview]

How to Run

From project root:

python launch.py data_gen                                           # for rendering dataset images
python launch.py data_loader                                        # for testing data loaders
python launch.py train --config config/train_n2n.yml                # for Noise2Noise (IMG mode)
python launch.py train --config config/train_n2n_stat.yml           # for Noise2Noise (STAT mode)
python launch.py train --config config/train_h2n.yml                # for Hist2Noise
python launch.py eval                                               # for Noise2Noise and Hist2Noise inference
python launch.py train_gen --config config/train_h2h.yml            # for Hist2Hist (HIST mode)
python launch.py train_gen --config config/train_h2h_stat.yml       # for Hist2Hist (STAT mode)
python launch.py eval_gen                                           # for Hist2Hist inference

About

Self-supervised denoising for Monte Carlo Rendering

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors