{"id":52037715,"url":"https://github.com/adobe/sbmc","last_synced_at":"2026-08-01T21:03:22.980Z","repository":{"id":45213362,"uuid":"211863921","full_name":"adobe/sbmc","owner":"adobe","description":"Sample-based Monte Carlo Denoising using a Kernel-Splatting Network [Siggraph 2019]","archived":false,"fork":false,"pushed_at":"2024-04-08T12:48:45.000Z","size":1220,"stargazers_count":91,"open_issues_count":0,"forks_count":14,"subscribers_count":8,"default_branch":"master","last_synced_at":"2026-04-21T06:38:51.303Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/adobe.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-09-30T13:16:55.000Z","updated_at":"2026-04-07T07:23:48.000Z","dependencies_parsed_at":"2022-09-03T02:50:25.572Z","dependency_job_id":null,"html_url":"https://github.com/adobe/sbmc","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/adobe/sbmc","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adobe%2Fsbmc","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adobe%2Fsbmc/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adobe%2Fsbmc/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adobe%2Fsbmc/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/adobe","download_url":"https://codeload.github.com/adobe/sbmc/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adobe%2Fsbmc/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":36170392,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-07-20T02:08:10.276Z","status":"online","status_checked_at":"2026-08-01T02:00:05.789Z","response_time":100,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2026-08-01T21:03:22.379Z","updated_at":"2026-08-01T21:03:22.973Z","avatar_url":"https://github.com/adobe.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Sample-based Monte Carlo Denoising using a Kernel-Splatting Network\n\n![teaser_image](assets/teaser.png)\n\nMichaël Gharbi (\u003cmgharbi@adobe.com\u003e), Tzu-Mao Li, Miika Aittala, Jaakko\nLehtinen, Frédo Durand\n\nCheck out our [project page](http://groups.csail.mit.edu/graphics/rendernet/).\n\n\n## Quick start\n\nThe quickest way to get started is to run the code from a Docker image. Proceed\nas follows:\n\n1. Download and [install Docker on your machine](https://docs.docker.com/install/linux/docker-ce/ubuntu/#install-docker-engine---community).\n\n2. Allow `docker` to be executed without `sudo`\n\n    1. Add username to the `docker` group\n\n    ```shell\n    sudo usermod -aG docker ${USER}\n    ```\n\n    2. To apply the new group membership, log out of the server and back in, or type the following:\n    ```shell\n    su - ${USER}\n    ```\n\n    3. Confirm that your user is now added to the `docker` group by typing:\n    ```shell\n    id -nG\n    ```\n\n2. To enable GPU acceleration in your Docker instance, install the NVidia\n   container toolkit: \u003chttps://github.com/NVIDIA/nvidia-docker\u003e.\n   We provide a shortcut to install the latter:\n\n   ```shell\n   make nvidia_docker \n   ```\n\n3. Once these prerequisites are installed, you can build a pre-configured Docker image\nand run it:\n\n    ```shell\n    make docker_build\n    make docker_run\n    ```\n\n    If all goes well, this will launch a shell on the Docker instance and you\n    should not have to worry about configuring the Linux or Python environment.\n\n    Alternatively, you can build a CPU-only version of the Docker image:\n\n    ```shell\n    make docker_build_cpu\n    make docker_run_cpu\n    ```\n\n4. (optional) From within the running Docker instance, run the package's tests:\n\n    ```shell\n    make test\n    ```\n\n5. Again, within the Docker instance. Try a few demo commands, e.g. run a pretrained denoiser on a test input:\n\n    ```shell\n    make demo/denoise\n    ```\n\n    This should download the pretrained models to `$(DATA)/pretrained_models`,\n    some demo scenes to `$(DATA)/demo/scenes`, and render some noisy samples data\n    to `$(OUTPUT)/demo/test_samples`. After that, our model will be run to produce a denoised output:\n    `$(OUTPUT)/demo/ours_4spp.exr` (linear radiance)  and `$(OUTPUT)/demo/ours_4spp.png`\n    (clamped 8bit rendering).\n\n    In the docker, `$(OUTPUT)` maps to `/sbmc_app/output` by default. Outside\n    the docker this is mapped to the `output` subfolder of this repository, so\n    that both data and output persist across runs.\n\n    See below, or have a look at the `Makefile` for more `demo/*` commands you can try.\n\n\n\n## Docker-less installation and dependencies\n\nIf you just intend to install our library, you can run:\n\n```shell\nHALIDE_DISTRIB_DIR=\u003cpath/to/Halide\u003e python setup.py install\n```\n\nfrom the root of this repo. In any cases the docker file in `dockerfiles`\nshould help you configure your runtime environment.\n\nWe build on the following dependencies:\n\n- Halide: our splatting kernel operator is implemented in Halide\n\u003chttps://halide-lang.org/\u003e. The `setup.py` script looks for the path to the Halide\ndistribution root under the environment variable `HALIDE_DISTRIB_DIR`. If this variable\nis not defined, the script will prompt you whether to download the Halide\nlocally.\n- Torch-Tools: we use the `ttools` library for PyTorch helpers and our training\nand evaluation scripts \u003chttps://github.com/mgharbi/ttools\u003e. This should get installed\nautomatically when running `python setup.py install`.\n\n\n## Demo\n\nWe provide a patch to PBRTv2's commit #e6f6334f3c26ca29eba2b27af4e60fec9fdc7a8d\n\u003chttps://github.com/mmp/pbrt-v2\u003e in `pbrt_patches/sbmc_pbrt.diff`. This patch\ncontains our modification to the renderer to save individual samples to disk.\n\n\n### Render samples from a PBRTv2 test scene\n\nTo render samples as `.bin` files from a `.pbrt` scene description, use the\n`scripts/render_samples.py` script. This script assumes the PBRT scene file\ncontains only the scene description. It will create the appropriate header\ndescription for the camera, sampler, path-tracer, etc. For an example, try:\n\n```shell\nmake demo/render_samples\n```\n\n\n### Generating new random scenes for training\n\nIn the manuscript we described a scene generation procedure that used the \nSunCG dataset. Because of the legal issues that were later discovered with \nthis dataset, we decided to no longer support this source of training scenes.\n\nYou can still use our custom, outdoor random scenes generator to generate\ntraining data, `scripts/generate_training_data.py`. For an example, run:\n\n```shell\nmake demo/generate_scenes\n```\n\n### Visualizing the image content of .bin sample files.\n\nWe provide a helper script to inspect the content of .bin sample files,\n`scripts/visualize_dataset.py`. For instance, to visualize the training data\ngenerated in the previous section, run:\n\n```shell\nmake demo/visualize\n```\n\n### Run pretrained models\n\nTo run a pre-trained model, use `scripts/denoise.py`. The command below runs\nour model and that of [Bako2017] on a test image:\n\n```shell\nmake demo/denoise\n```\n\n### Comparisons to previous work\n\nIn the dockerfile, we setup the code from several previous work to facilitate\ncomparison. We provide our modifications to the original codebases as patch\nfiles in `pbrt_patches/`. The changes are mostly simple modification to the C++\ncode so it compiles with gcc.\n\nThe comparison include:\n* [Sen2011] \"On Filtering the Noise from the Random Parameters in Monte Carlo Rendering\"\n* [Rousselle2012] \"Adaptive Rendering with Non-Local Means Filtering\"\n* [Kalantari2015] \"A Machine Learning Approach for Filtering Monte Carlo Noise\"\n* [Bitterli2016] \"Nonlinearly Weighted First-order Regression for Denoising Monte Carlo Renderings\"\n* [Bako2017] \"Kernel-Predicting Convolutional Networks for Denoising Monte Carlo Renderings\"\n\nTo run the comparisons:\n\n```shell\nmake demo/render_reference\nmake demo/comparisons\n```\n\n\n### Training a new model\n\nTo train your own model, you can use the\nscript `scripts/train.py`. For instance,\nto train our model:\n\n```shell\nmake demo/train\n```\n\nOr to train that of Bako et al.:\n\n```shell\nmake demo/train_kpcn\n```\n\nThose scripts will also launch a Visdom server to enable you to monitor the\ntraining. In your web browser, to view the plots navigate to \u003chttp://localhost:2001\u003e.\n\n\n### Numerical evaluation\n\nThe script `scripts/compute_metrics.py` can be used to\nevaluate a set of .exr renderings numerically. It will print out\nthe averages and save the result to .csv files.\n\nFor example, you can download the renderings we produced for our paper evaluation\nand compute the metrics by running:\n\n```shell\nmake demo/eval\n```\n\n\n## Precomputed .exr results from our submission\n\nWe provide the pre-rendered .exr results used in our Siggraph submission\non-demand. To download them, run the command below. Please note this data is\nrather large (54 GB).\n\n```shell\nmake precomputed_renderings\n```\n\n\n## Test scene for evaluation\n\nYou can download the .pbrt scenes we used for evaluation by running:\n\n```shell\nmake test_scenes\n```\n\nThis will only download the scene description and assets. The images (or\nsamples) themselves still need to be rendered from this data, using the\n`scripts/render_exr.py` and `scripts/render_samples.py` scripts respectively.\n\n\n## Samples data: our .bin fileformat\n\nSome sample data used throughout the `demo` commands can be downloaded using:\n\n```shell\nmake demo_data\n```\n\n\n## Pretrained models\n\nDownload our pretrained models with the following command:\n\n```shell\nmake pretrained_models\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fadobe%2Fsbmc","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fadobe%2Fsbmc","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fadobe%2Fsbmc/lists"}