The Survival Probability Adapted Nuclear Norm Shrinkage Denoiser
Project description
The Survival Probability Adapted Nuclear Norm Shrinkage (SPANNS) Denoiser
A simple denoiser compatible with VapourSynth.
Supported Formats
The denoiser core supports any 2D numeric matrices. For VapourSynth usage, you need to provide clips with full precision and planes of the same dimensions (e.g., convert YUV422 to YUV444PS or RGBS first).
Usage
spanns.spanns(clip, ...)
Arguments:
- clip (vs.VideoNode): The original video node.
- sigma (int): Denoising strength. Default is
1. - tol (float): Noise tolerance in the range [0, 1]. Default is
0.7. - gamma (float): Texture threshold in the range [0, 1]. Higher values preserve less texture. Default is
0.5. - passes (int): Number of denoising steps. Default is
2. - ref1 (vs.VideoNode): Reference clip, an approximation of the result. Default is a median filter.
- ref2 (vs.VideoNode): Reference clip, a blurred one obtained from the original. It serves as an alternative way to control denoising strength. If provided,
sigmawill be ignored. Default is a box blur with radius equal tosigma. - planes (Sequence[int]): Indices of planes to process. Default is
[0, 1, 2].
Returns:
The denoised clip (vs.VideoNode).
TODO
- Implement GPU acceleration.
Background
In 2019, the author was disappointed by the practical performance of WNNM, a well-regarded but (f******)cumbersome denoising approach proposed years earlier. Although there have been improvements to the technique, most rely on patch matching and increasing complexity, which the author finds unappealing. Reflecting on its limitations, the author implemented a better (but still sh*t) heuristic method: SPANN.
In essence, SPANN damps the orthogonal components according to the noise's survival probability along the axis of component magnitude (the singular values). While the denoising results might not stand out in today's advanced landscape, the author hopes someone can appreciate its simplicity.
Buy Me Coffee
Don't, I can't have coffee.
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 Distribution
Built Distribution
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 spanns-1.0.0.tar.gz.
File metadata
- Download URL: spanns-1.0.0.tar.gz
- Upload date:
- Size: 8.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.0.1 CPython/3.13.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f39985bb11bd68118a4121c1731d3cbaf09a9af9846e80547defcd70dd949405
|
|
| MD5 |
6c6f4177a593021094b79a63dc469b3f
|
|
| BLAKE2b-256 |
2ae1a76e7f90a21cfe28b1b738002da3fcbf692939605ef8ead1f020927c1459
|
File details
Details for the file spanns-1.0.0-py3-none-any.whl.
File metadata
- Download URL: spanns-1.0.0-py3-none-any.whl
- Upload date:
- Size: 8.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.0.1 CPython/3.13.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
70ee2f112980969904e1178b901c2ab9fdf88e444e41e6818b14b4827a58e389
|
|
| MD5 |
836612484f91b674bf0165d41d52796b
|
|
| BLAKE2b-256 |
ec0b9162a5758f975120fa4dbb7b05995e330ebcdb056563fd4c3c5c0f38e758
|