Rules for using Intel Open Image Denoise in your Bazel builds.
Currently, these rules compile on Ubuntu 22.04 and Windows. Building on macOS is currently not working. If you run the example (see "Quick start") the following output is generated:
Prerequisites:
The following tools should be installed:
Checkout, build, and run:
All platforms:
git clone https://github.com/Vertexwahn/rules_oidn.git
cd rules_oidn
cd tests
Run example with Ubuntu 22.04:
bazel run --config=gcc11 //:example
Run example with Visual Studio 2022:
bazel run --config=vs2022 //:example
See tests/.bazelrc for other supported build configs.
You can also provide a filename as an argument, e.g. on Ubuntu 22.04:
bazel run --config=gcc11 //:example -- --filename=${HOME}/denoised_image.exr
The example provides a noisy rendering of the Cornell Box.
Additionally, there is a corresponding albedo image:
And a normal image:
This serves as an input for the example.
There is a command line tool that makes use of OIDN: https://declanrussell.com/portfolio/intel-open-image-denoiser-2/
How to run it:
.\Denoiser.exe -i .\noisy_10spp.exr -o denoised.exr -a .\albedo_10spp.exr -n .\normal_10spp.exr
python3 .\scripts\blob_to_cpp.py .\weights\rt_alb.tza -o .\weights\rt_alb.tza.cpp -H .\weights\rt_alb.tza.h
python3 .\scripts\blob_to_cpp.py .\weights\rt_hdr.tza -o .\weights\rt_hdr.tza.cpp -H .\weights\rt_hdr.tza.h
python3 .\scripts\blob_to_cpp.py .\weights\rt_hdr_alb.tza -o .\weights\rt_hdr_alb.tza.cpp -H .\weights\rt_hdr_alb.tza.h
python3 .\scripts\blob_to_cpp.py .\weights\rt_hdr_alb_nrm.tza -o .\weights\rt_hdr_alb_nrm.tza.cpp -H .\weights\rt_hdr_alb_nrm.tza.h
python3 .\scripts\blob_to_cpp.py .\weights\rt_hdr_calb_cnrm.tza -o .\weightsrt_hdr_calb_cnrm.tza.cpp -H .\weights\rt_hdr_calb_cnrm.tza.h
python3 .\scripts\blob_to_cpp.py .\weights\rt_ldr.tza -o .\weights\rt_ldr.tza.cpp -H .\weights\rt_ldr.tza.h
python3 .\scripts\blob_to_cpp.py .\weights\rt_ldr_alb.tza -o .\weights\rt_ldr_alb.tza.cpp -H .\weights\rt_ldr_alb.tza.h
python3 .\scripts\blob_to_cpp.py .\weights\rt_ldr_alb_nrm.tza -o .\weights\rt_ldr_alb_nrm.tza.cpp -H .\weights\rt_ldr_alb_nrm.tza.h
python3 .\scripts\blob_to_cpp.py .\weights\rt_ldr_calb_cnrm.tza -o .\weights\rt_ldr_calb_cnrm.tza.cpp -H .\weights\rt_ldr_calb_cnrm.tza.h
python3 .\scripts\blob_to_cpp.py .\weights\rt_nrm.tza -o .\weights\rt_nrm.tza.cpp -H .\weights\rt_nrm.tza.h
python3 .\scripts\blob_to_cpp.py .\weights\rtlightmap_dir.tza -o .\weights\rtlightmap_dir.tza.cpp -H .\weights\rtlightmap_dir.tza.h
python3 .\scripts\blob_to_cpp.py .\weights\rtlightmap_hdr.tza -o .\weights\rtlightmap_hdr.tza.cpp -H .\weights\rtlightmap_hdr.tza.h
This work is published under the Apache 2.0 License.
This repository contains code copied from TensorFlow which is also under the Apache 2.0 License. The copyright of the corresponding files belongs to the TensorFlow authors.