Bilateral filter for VapourSynth
Project description
VapourSynth-BilateralGPU
Copyright© 2021 WolframRhodium
Bilateral filter in CUDA for VapourSynth.
Description
Bilateral filter is a non-linear, edge-preserving and noise-reducing smoothing filter for images.
The intensity value at each pixel in an image is replaced by a weighted average of intensity values from nearby pixels. This weight can be based on a Gaussian distribution.
Special thanks to Kice for doing most of the work in previous implementation.
Requirements
-
CPU with AVX2 support.
-
CUDA-enabled GPU(s) of compute capability 5.0 or higher (Maxwell+).
-
GPU driver >= v452.39 for GeForce or
bilateral_rtcusers or >= v496.13 in general.
The plugin can run on older generation of GPUs or CPU without AVX2 support by manual compilation.
The _rtc version requires compute capability 3.5 or higher, GPU driver 465 or newer and has dependencies on nvrtc64_112_0.dll/libnvrtc.so.11.2 and nvrtc-builtins64_114.dll/libnvrtc-builtins.so.11.4.50.
Supported Formats
sample type: 8-16 bit integer or 32 bit float Gray/YUV/RGB input
Usage
core.{bilateralgpu, bilateralgpu_rtc}.Bilateral(clip clip, float[] sigma_spatial=3.0, float[] sigma_color=0.02, int[] radius=0, int device_id=0, int num_streams=4, bool use_shared_memory=True)
-
clip: The input clip.
-
sigma_spatial: (Default: 3.0) Filter sigma in the coordinate space. Use an array to assign it for each plane. If "sigma_spatial" for the second plane is not specified, it will be set according to the sigma_spatial of first plane and sub-sampling.
-
sigma_color: (Default: 0.02) Filter sigma in the color space. Use an array to assign it for each plane, otherwise the same sigma_color is used for all the planes. It will be normalized internally, so that for clips with different bit depths, the same values get similar results.
-
radius: (Default: 0) Kernel window size. 0 = automatic calculatation based on "sigma_spatial".
-
device_id: (Default: 0) CUDA device ID.
-
num_streams: (Default: 4) Number of CUDA streams, enables concurrent kernel execution and data transfer.
-
use_shared_memory: (Default: True) Use on-chip memory to reduce bandwidth requirements on memory operations.
-
The
_rtcversion has two experimental parameters:- block_x, block_y: (Default: 16, 8) Block size of launch configuration of the kernel. Don't modify it unless you know what you are doing.
Compilation
cmake -S . -B build -D CMAKE_BUILD_TYPE=Release -D CMAKE_CUDA_FLAGS="--threads 0 --use_fast_math -Wno-deprecated-gpu-targets" -D CMAKE_CUDA_ARCHITECTURES="50;61-real;75-real;86"
cmake --build build --config Release
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distributions
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file vapoursynth_bilateralgpu-14-py3-none-win_amd64.whl.
File metadata
- Download URL: vapoursynth_bilateralgpu-14-py3-none-win_amd64.whl
- Upload date:
- Size: 39.0 MB
- Tags: Python 3, Windows x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
23d284bb8609d4ab64ed2508f75f6e47e7eb5a14aef558173f5b0d610be8eadd
|
|
| MD5 |
8aa23cd7cd05a0ca9fed18e8b3f2bc2e
|
|
| BLAKE2b-256 |
a92cebd80580c1e41676c8818b3c6bee50c450d3159d5a079866da10abb0a9e3
|
Provenance
The following attestation bundles were made for vapoursynth_bilateralgpu-14-py3-none-win_amd64.whl:
Publisher:
publish.yml on WolframRhodium/VapourSynth-BilateralGPU
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
vapoursynth_bilateralgpu-14-py3-none-win_amd64.whl -
Subject digest:
23d284bb8609d4ab64ed2508f75f6e47e7eb5a14aef558173f5b0d610be8eadd - Sigstore transparency entry: 1328600280
- Sigstore integration time:
-
Permalink:
WolframRhodium/VapourSynth-BilateralGPU@4d0b51abb31f32de28f2db814be5ce703e462354 -
Branch / Tag:
refs/heads/master - Owner: https://github.com/WolframRhodium
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@4d0b51abb31f32de28f2db814be5ce703e462354 -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file vapoursynth_bilateralgpu-14-py3-none-manylinux_2_39_x86_64.whl.
File metadata
- Download URL: vapoursynth_bilateralgpu-14-py3-none-manylinux_2_39_x86_64.whl
- Upload date:
- Size: 49.1 MB
- Tags: Python 3, manylinux: glibc 2.39+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c0f9f8d59d60d0f240eaf700958e2504921996f85c0aac3aaaf61a0d8ccb8612
|
|
| MD5 |
de8077cd8b388e077a3375cb2d736e86
|
|
| BLAKE2b-256 |
27fc4fcf8521d248631691289b034b32969a8421e69c36295739b3817f0aa75b
|
Provenance
The following attestation bundles were made for vapoursynth_bilateralgpu-14-py3-none-manylinux_2_39_x86_64.whl:
Publisher:
publish.yml on WolframRhodium/VapourSynth-BilateralGPU
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
vapoursynth_bilateralgpu-14-py3-none-manylinux_2_39_x86_64.whl -
Subject digest:
c0f9f8d59d60d0f240eaf700958e2504921996f85c0aac3aaaf61a0d8ccb8612 - Sigstore transparency entry: 1328600275
- Sigstore integration time:
-
Permalink:
WolframRhodium/VapourSynth-BilateralGPU@4d0b51abb31f32de28f2db814be5ce703e462354 -
Branch / Tag:
refs/heads/master - Owner: https://github.com/WolframRhodium
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@4d0b51abb31f32de28f2db814be5ce703e462354 -
Trigger Event:
workflow_dispatch
-
Statement type: