Skip to main content

VapourSynth-WNNM

Weighted Nuclear Norm Minimization Denoiser for VapourSynth.

Description

WNNM is a denoising algorithm based on block-matching and weighted nuclear norm minimization.

Block matching, which is popularized by BM3D, finds similar blocks and then stacks together in a 3-D group. The similarity between these blocks allows details to be preserved during denoising.

In contrast to BM3D, which denoises the 3-D group based on frequency domain filtering, WNNM utilizes weighted nuclear norm minimization, a kind of low rank matrix approximation. Because of this, WNNM exhibits less blocking and ringing artifact compared to BM3D, but the computational complexity is much higher. This stage is called collaborative filtering in BM3D.

Usage

Prototype:

core.wnnm.WNNM(clip clip[, float[] sigma = 3.0, int block_size = 8, int block_step = 8, int group_size = 8, int bm_range = 7, int radius = 0, int ps_num = 2, int ps_range = 4, bool residual = false, bool adaptive_aggregation = true, clip rclip = None])

  • clip:

    The input clip. Must be of 32 bit float format. Each plane is denoised separately.

  • sigma:

    Denoising strength of each plane.

  • block_size, block_step, group_size, bm_range, radius, ps_num, ps_range:

    Same as those in VapourSynth-BM3D.

  • residual:

    Whether to center blocks before collaborative filtering. Default: False.

  • adaptive_aggregation:

    Whether to aggregate blocks adaptively. Default: True.

  • rclip:

    Reference clip for block matching. Must be of the same dimensions and format as clip.

Implementation

Default values of block_size, block_step, group_size are modified for acceleration.

For spatial denoising, the block-matching implemented is the same as the official implementation, which is similar to that of BM3D without setting a threshold on whether dissimilar blocks should be included in the 3-D group. This is the same strategy implemented in VapourSynth-BM3DCUDA but not in VapourSynth-BM3D.

For temporal denoising, this implementation utilizes the same predictive search proposed by V-BM3D, which is closer to VapourSynth-BM3D (without dissimilar block thresholding) than VapourSynth-BM3DCUDA. The later one implemented a modified temporal predictive search that may finds multiple instances of the same similar block for acceleration.

During collaborative filtering, the official WNNM implementation centers blocks in the 3-D group. This is controlled by the residual parameter and is off by default. The major singular value is untouched when residual is off.

Note: Because of WNNM and the modification, the maximum denoising effect achieved is the best rank-one approximation of the 3-D group when residual is off, or the mean of the group when residual is on, which may not be enough for strong noises. The official implementation uses iterative regularization, which can be easily implemented as

for i in range(num_iterations):
    if i == 0:
        previous = source
    elif i == 1:
        previous = denoised
    else:
        previous = core.std.Expr([source, previous, denoised], "x y - {factor} * z +".format(factor=0.1))
    denoised = WNNM(previous)
# output: `denoised`

The similar blocks are weightedly aggregated by the inverse of the number of non-zero singular values after WNNM, inspired by BM3D. This is controlled by the adaptive_aggregation parameter and is on by default.

The block-matching can be guided by an oracle reference clip rclip in the same manner as ref for BM3D. The collaborative filtering is not guided, unlike BM3D.

Compilation

  • On x86_64, oneMKL is required. Vector class library is also required when compiling with AVX2.

    cmake -S . -B build -D CMAKE_BUILD_TYPE=Release \
    -D MKL_LINK=static -D MKL_THREADING=sequential -D MKL_INTERFACE=lp64
    
    cmake --build build
    
    cmake --install build
    
  • On Aarch64, ArmPL is required.

Example build process can be found in workflows.

Reference

  1. S. Gu, L. Zhang, W. Zuo and X. Feng, "Weighted Nuclear Norm Minimization with Application to Image Denoising," 2014 IEEE Conference on Computer Vision and Pattern Recognition, 2014, pp. 2862-2869.

  2. K. Dabov, A. Foi, V. Katkovnik and K. Egiazarian, "Image Denoising by Sparse 3-D Transform-Domain Collaborative Filtering," in IEEE Transactions on Image Processing, vol. 16, no. 8, pp. 2080-2095, Aug. 2007.

  3. K. Dabov, A. Foi and K. Egiazarian, "Video denoising by sparse 3D transform-domain collaborative filtering," 2007 15th European Signal Processing Conference, 2007, pp. 145-149.

  4. Official implementation

  5. VapourSynth-BM3D

  6. VapourSynth-BM3DCUDA

Metadata

Release files for vapoursynth-wnnm 3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distributions (wheels)

Table of built distributions (wheels) for vapoursynth-wnnm 3
File Interpreter ABI Platform
vapoursynth_wnnm-3-py3-none-win_amd64.whl Python 3 none Windows x86-64 Details
vapoursynth_wnnm-3-py3-none-manylinux_2_38_aarch64.manylinux_2_39_aarch64.whl Python 3 none Linux glibc 2.38+ ARM64, Linux glibc 2.39+ ARM64 Details
vapoursynth_wnnm-3-py3-none-manylinux_2_34_x86_64.manylinux_2_39_x86_64.whl Python 3 none Linux glibc 2.39+ x86-64, Linux glibc 2.34+ x86-64 Details

Total release size: 87.4 MB

Release files / vapoursynth_wnnm-3-py3-none-win_amd64.whl

Download URL vapoursynth_wnnm-3-py3-none-win_amd64.whl
Size 2.4 MB
Tags Python 3 Windows x86-64
SHA-256 checksum
How to use checksums
0698b4b830f6fdd9a8719c768df3cbe8ea19505785b797c0451e9423dcc49c6c
BLAKE2b-256 checksum
How to use checksums
3f896bdd44d0b19d012b144b1c1407dbd024b01c5fb57dcea471076a7d241dfb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Apr 24, 2026.

Transparency log

Release files / vapoursynth_wnnm-3-py3-none-manylinux_2_38_aarch64.manylinux_2_39_aarch64.whl

Download URL vapoursynth_wnnm-3-py3-none-manylinux_2_38_aarch64.manylinux_2_39_aarch64.whl
Size 83.3 MB
Tags Linux glibc 2.38+ ARM64 Linux glibc 2.39+ ARM64 Python 3
SHA-256 checksum
How to use checksums
a2f87bd3fdac6d623b23fa17cd45a299143b0c3281625eaded9b5c7c45862f7c
BLAKE2b-256 checksum
How to use checksums
560782bec54cd3d4a8af1f552be2e23a35394b3d304eb3235adc66152a6801ad
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Apr 24, 2026.

Transparency log

Release files / vapoursynth_wnnm-3-py3-none-manylinux_2_34_x86_64.manylinux_2_39_x86_64.whl

Download URL vapoursynth_wnnm-3-py3-none-manylinux_2_34_x86_64.manylinux_2_39_x86_64.whl
Size 1.7 MB
Tags Linux glibc 2.34+ x86-64 Linux glibc 2.39+ x86-64 Python 3
SHA-256 checksum
How to use checksums
77a617d0d6f518e896ae7a7462113adcaf213cec79b09770e611d45d55b76ae6
BLAKE2b-256 checksum
How to use checksums
2d8df73d37b54ccd0c8a8f8e29b2656ed0ec11a34ea59bf80c016bec53fb27aa
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Apr 24, 2026.

Transparency log

Security for vapoursynth-wnnm 3

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

All 3 files in this release have been uploaded with provenance metadata.

Select from 3 files

Attestation for vapoursynth_wnnm-3-py3-none-win_amd64.whl

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Apr 24, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

Release history Release notifications | RSS feed

This release

3 This release

3 release files Full provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page