Skip to content

Implemenation of "Consistent Post-Reconstruction for Progressive Photon Mapping" (Pacific Graphics 2021)

License

Notifications You must be signed in to change notification settings

CGLab-GIST/consistent-recon

Repository files navigation

Consistent Post-Reconstruction for Progressive Photon Mapping

Authors: Hajin Choi, Bochang Moon

This is an official implementation of the paper "Consistent Post-Reconstruction for Progressive Photon Mapping", which is presented in Pacific Graphics 2021. This repository includes training/test codes with four test images needed to reproduce the results in the paper. For re-training using other images, please refer to the paper and scripts/config.py to see how the input images should be consist of. We recommend the Mitsuba renderer for generating the SPPM images.

Setup

Tested environments

  • OS: Ubuntu 20.04
  • CPU: AMD Ryzen Threadripper 3990X
  • GPU: NVIDIA RTX 3090

Prerequisites

Installation

  1. Clone this repository
  2. Inside the cloned directory, build a docker image by
    docker build . -t IMAGE_NAME
  3. Create a container by
    docker run -d -it -v $PWD:/consistent-recon --gpus all IMAGE_NAME

Configurations

  • For training, set following things in scripts/config.py
    # Mode select (TRAINING, TEST)
    config["mode"] = "TRAINING"
    # Number of epochs
    config['epochs'] = 100
    # Prefix for dataset directory. Note that it will be used to find the refereces too (e.g., dataset_refereces). Same for test.
    config["datasetPrefix"] = "dataset"
    # Directory of training dataset
    config["trainDatasetDirectory"] = "dataset_train"
    # List of scenes (e.g., dataset_train/box)
    config["trainScenes"] = ['box', 'sponza']
  • For test, set following things in scripts/config.py
    # Mode select (TRAINING, TEST)
    config["mode"] = "TEST"
    # Epoch of checkpoint to load
    config["loadEpoch"] = "100"
    # Directory of test dataset
    config["testDatasetDirectory"] = "dataset_test"
    # List of scenes (e.g., dataset_test/box)
    config["testScenes"] = ['bookshelf', 'breakfast-room', 'pool', 'water']
  • Others are optional and can be left at their default values.
  • Outputs of the test will be stored in /consistent-recon/output

Run

  1. Attach to the container by a docker command e.g.,
    docker exec -w /consistent-recon -it CONTAINER_ID bash
  2. Run the code by python scripts/main.py
    • If you meet a weird memory increase along the epochs, then run the script with TCMalloc
      LD_PRELOAD="/usr/lib/x86_64-linux-gnu/libtcmalloc_minimal.so.4.3.0" python scripts/main.py

Citation

License

All source codes are released under a BSD License.

Credits

We used exr-related operations using the script scripts/exr.py from KPCN.

About

Implemenation of "Consistent Post-Reconstruction for Progressive Photon Mapping" (Pacific Graphics 2021)

Topics

Resources

License

Stars

Watchers

Forks