Official implementation of MC Denoising via Auxiliary Feature Guided Self-Attention (SIGGRAPH Asia 2021 paper) [PDF]
While self-attention has been successfully applied in a variety of natural language processing and computer vision tasks, its application in Monte Carlo (MC) image denoising has not yet been well explored. This paper presents a self-attention based MC denoising deep learning network based on the fact that self-attention is essentially non-local means filtering in the embedding space which makes it inherently very suitable for the denoising task. Particularly, we modify the standard self-attention mechanism to an auxiliary feature guided self-attention that considers the by-products (e.g., auxiliary feature buffers) of the MC rendering process. As a critical prerequisite to fully exploit the performance of self-attention, we design a multi-scale feature extraction stage, which provides a rich set of raw features for the later self-attention module. As self-attention poses a high computational complexity, we describe several ways that accelerate it. Ablation experiments validate the necessity and effectiveness of the above design choices. Comparison experiments show that the proposed self-attention based MC denoising method outperforms the current state-of-the-art methods.
Model weights w/o diffuse and specular decomposition can be downloaded from googledrive
Please put the weights in models\wo_diff_spec_decomp.
Model weights w/ diffuse and specular decomposition will be published soon!
Please put the weights in models\w_diff_spec_decomp.
For more options, please refer to the code.
python train.py -i PATH_TO_IMAGE_FOLDER -d PATH_TO_TRAIN_H5_FOLDER -o PATH_TO_OUTPUT_FOLDER
*Example (with subfolders 32spp and 32768spp in the folder image and storing the dataset .h5 file in the folder dataset):
python train.py -i image -d dataset -o output
python test.py -i PATH_TO_TEST_H5_FOLDER -o PATH_TO_OUTPUT_FOLDER
*Example (with test_4.h5 in the folder h5):
python test.py -i h5 -o output --datasetSPP 4
python inference.py -i PATH_TO_IMAGE_FOLDER -o PATH_TO_OUTPUT_FOLDER --fileName NAME_OF_IAMGE
*Example (with veach-ajar.exr and veach-ajar_gt.exr in the folder image):
python inference.py -i image -o output --fileName veach-ajar --isLoadGt
If you find our work useful in your research, please consider citing:
Some of our code is adapted/ported from KPCN (implemented in PyTorch) and ACFM. Credit to these PyTorch projects.