Skip to content

Latest commit

 

History

21 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

bigdn

A benchmarking toolkit comparing various CPU, OpenMP, and CUDA implementations of classical image denoising algorithms, specifically targetting Monte-Carlo render noise.

Build Instructions

To build the project, run the CMake configuration and build commands from the root directory:

cmake -B build -S . -DCMAKE_CUDA_COMPILER=/opt/cuda/bin/nvcc
cmake --build build

This will configure CMake and compile the executable into the build directory.

Running the Toolkit

Run the GUI or command line utility using the compiled binary.

Running in GUI Mode

To launch the interactive split screen interface, run the executable with no arguments (or explicitly pass --gui):

./build/bigdn

Running in CLI Mode

To run in CLI mode, specify a filter using the -f or --filter flag:

./build/bigdn -f <filter_name> [options]

Options

-h, --help              #Show help message and exit
-f, --filter <name>     #Filter to run: mean, gaussian, guided, joint_guided, atrous, masked_atrous, or benchmark (default: benchmark)
-d, --device <name>     #Execution device/implementation: cpu, omp, or cuda (default: cuda)
-i, --input <path>      #Noisy beauty input image path (default: TEST_IMAGES/NOISY.png)
-n, --normal <path>     #Normal map input image path (default: TEST_IMAGES/NORMAL.png)
-a, --albedo <path>     #Albedo map input image path (default: TEST_IMAGES/ALBEDO.png)
-o, --output <path>     #Denoised output image path (default: denoised.png)
-g, --gt <path>         #Clean ground truth image path for metric computation (default: TEST_IMAGES/GROUNDTRUTH.png)
-k, --kernel-size <N>   #Kernel size (must be a positive odd integer, default: 15)
-p, --passes <N>        #Number of A Trous passes (default: 5)
-sc, --sigma-color <V>  #Color sigma parameter (default: 0.15)
-sn, --sigma-normal <V> #Normal sigma parameter (default: 0.1)
-sa, --sigma-albedo <V> #Albedo sigma parameter (default: 0.05)
-mk, --median-kernel <N>   #Median kernel size (3 or 5, default: 3)
-mt, --median-threshold <V> #Median outlier threshold (default: 0.05)
-r, --runs <N>          #Number of iterations to run during benchmark mode (default: 5)

Running a Specific Filter

Ex- To run the CUDA A Trous denoiser on custom images:

./build/bigdn -f atrous -i TEST_IMAGES/NOISY.png -n TEST_IMAGES/NORMAL.png -a TEST_IMAGES/ALBEDO.png -o output.png -p 5 -sc 0.15 -sn 0.1

Benchmark Results

Execution Performance (1920x1080, Kernel Size: 15)

Filter / Implementation Median Time Speedup vs CPU (ST)
Mean (Single-Threaded) ~3488.67 ms 1.00x
Mean (OpenMP) ~98.99 ms 35.24x
Mean (CUDA) ~1.11 ms 3144.42x
Gaussian (Single-Threaded) ~1133.40 ms 1.00x
Gaussian (OpenMP) ~106.92 ms 10.60x
Gaussian (CUDA) ~1.13 ms 1003.00x
Guided (Single-Threaded) ~230.45 ms 1.00x
Guided (OpenMP) ~125.75 ms 1.83x
Guided (CUDA) ~5.20 ms 44.30x
Joint Guided (CUDA) ~6.08 ms
À-Trous Wavelet (CUDA, 5 passes) ~12.36 ms
Masked Median + À-Trous (CUDA) ~44.20 ms

Denoising Quality Metrics

Quality metrics obtained relative to the clean reference image (TEST_IMAGES/GROUNDTRUTH.png). Higher values for both PSNR and MS-SSIM indicate better denoising quality:

Denoising Interface Screenshot

Implementation PSNR (dB) MS-SSIM
Mean Filter 28.45 dB 0.9937
Gaussian Filter 33.52 dB 0.9985
Guided Filter 34.23 dB 0.9978
Joint Guided Filter (CUDA) 34.92 dB 0.9990
À-Trous Wavelet Filter (CUDA) 30.24 dB 0.9963
Masked Median + À-Trous Filter (CUDA) 33.08 dB 0.9989

Known Issues

  • Classical edge preserving filters (Guided, Joint Guided, A Trous) have a hard mathematical limit distinguishing high frequency noise from true details, which can leave splotchiness in high noise renders.
  • The Joint Guided and A Trous filters are only supported on the CUDA device.
  • Standard A Trous does not denoise salt and pepper noise well because pixel outlier spikes are treated as edges and are not smoothed. Resolved by using the Masked Median + A-Trous Wavelet Filter, which pre-filters outlier spike pixels with a selective median filter before using variance-guided A Trous denoising.
  • Joint Guided filter is prone to smudginess and detail loss in low-feature areas.
  • Gaussian filter is too smudgy and completely blurs geometric edges.

About

Implementations of a few image denoising algorithms in CUDA

Resources

Stars

13 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages