Skip to main content

Neural Network Edge Directed Interpolation 3, using Vulkan compute

Project description

nnedi3vk

NNEDI3 is an intra-field only deinterlacer. It takes in a frame, throws away one field, and then interpolates the missing pixels using only information from the kept field. It has same rate and double rate modes. NNEDI3 is also very good for enlarging images by powers of 2.

Requirement

A Vulkan 1.4 capable GPU and driver.

Usage

nnedi3vk.NNEDI3(vnode clip, int field[, bint dh=False, int[] planes=[0, 1, 2], int nsize=6, int nns=1, int qual=1, int etype=0, int pscrn=2, bint coopvec=True, int device_index=0, bint list_device=False, int num_streams=2])
  • clip: Clip to process. Any format with either 8-16 bit integer or 16/32 bit float is supported.

  • field: Controls the mode of operation (double vs same rate) and which field is kept.

    • 0 = same rate, keep bottom field
    • 1 = same rate, keep top field
    • 2 = double rate (alternates each frame), starts with bottom
    • 3 = double rate (alternates each frame), starts with top
  • dh: Doubles the height of the input. Each line of the input is copied to every other line of the output and the missing lines are interpolated. If field=0, the input is copied to the odd lines of the output. If field=1, the input is copied to the even lines of the output. field must be set to either 0 or 1 when using dh=True.

  • planes: Specifies which planes will be processed. Any unprocessed planes will be simply copied in dh=False, but will contain uninitialized memory in dh=True.

  • nsize: Specifies the size of the local neighborhood around each pixel that is used by the predictor neural network. For image enlargement it is recommended to use 0 or 4. Larger y_diameter settings will result in sharper output. For deinterlacing larger x_diameter settings will allow connecting lines of smaller slope. However, what setting to use really depends on the amount of aliasing (lost information) in the source. If the source was heavily low-pass filtered before interlacing then aliasing will be low and a large x_diameter setting won't be needed, and vice versa.

    • 0 = 8x6
    • 1 = 16x6
    • 2 = 32x6
    • 3 = 48x6
    • 4 = 8x4
    • 5 = 16x4
    • 6 = 32x4
  • nns: Specifies the number of neurons in the predictor neural network. 0 is fastest. 4 is slowest, but should give the best quality. This is a quality vs speed option; however, differences are usually small. The difference in speed will become larger as 'qual' is increased.

    • 0 = 16
    • 1 = 32
    • 2 = 64
    • 3 = 128
    • 4 = 256
  • qual: Controls the number of different neural network predictions that are blended together to compute the final output value. Each neural network was trained on a different set of training data. Blending the results of these different networks improves generalization to unseen data. Possible values are 1 or 2. Essentially this is a quality vs speed option. Larger values will result in more processing time, but should give better results. However, the difference is usually pretty small. I would recommend using qual>1 for things like single image enlargement.

  • etype: Controls which set of weights to use in the predictor nn.

    • 0 = weights trained to minimize absolute error
    • 1 = weights trained to minimize squared error
  • pscrn: Controls whether or not the prescreener neural network is used to decide which pixels should be processed by the predictor neural network and which can be handled by simple cubic interpolation. The prescreener is trained to know whether cubic interpolation will be sufficient for a pixel or whether it should be predicted by the predictor nn. The computational complexity of the prescreener nn is much less than that of the predictor nn. Since most pixels can be handled by cubic interpolation, using the prescreener generally results in much faster processing. The prescreener is pretty accurate, so the difference between using it and not using it is almost always unnoticeable. Higher levels for the new prescreener result in cubic interpolation being used on fewer pixels (so are slower, but incur less error). However, the difference is pretty much unnoticable. Level 2 is closest to the original prescreener in terms of incurred error, but is much faster.

    • 0 = no prescreening
    • 1 = original prescreener
    • 2 = new prescreener level 0
    • 3 = new prescreener level 1
    • 4 = new prescreener level 2
  • coopvec: Runs the predictor neural network with FP16 tensor cores instead of FP32 subgroup GEMV. Requires VK_NV_cooperative_vector and hence NVIDIA only.

  • device_index: Index of the Vulkan device to use.

  • list_device: If True, raises an error listing the available Vulkan devices and their indices.

  • num_streams: Number of streams to run kernels in parallel on the Vulkan device.

Installation

pip install -U vapoursynth-nnedi3vk

Project details


Release history Release notifications | RSS feed

This version

1.0

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

vapoursynth_nnedi3vk-1.0.tar.gz (12.8 MB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

vapoursynth_nnedi3vk-1.0-py3-none-win_amd64.whl (13.1 MB view details)

Uploaded Python 3Windows x86-64

vapoursynth_nnedi3vk-1.0-py3-none-musllinux_1_2_x86_64.whl (13.9 MB view details)

Uploaded Python 3musllinux: musl 1.2+ x86-64

vapoursynth_nnedi3vk-1.0-py3-none-musllinux_1_2_aarch64.whl (13.8 MB view details)

Uploaded Python 3musllinux: musl 1.2+ ARM64

vapoursynth_nnedi3vk-1.0-py3-none-manylinux_2_34_x86_64.whl (12.8 MB view details)

Uploaded Python 3manylinux: glibc 2.34+ x86-64

vapoursynth_nnedi3vk-1.0-py3-none-manylinux_2_34_aarch64.whl (12.8 MB view details)

Uploaded Python 3manylinux: glibc 2.34+ ARM64

vapoursynth_nnedi3vk-1.0-py3-none-macosx_11_0_arm64.whl (12.8 MB view details)

Uploaded Python 3macOS 11.0+ ARM64

vapoursynth_nnedi3vk-1.0-py3-none-macosx_10_15_x86_64.whl (12.8 MB view details)

Uploaded Python 3macOS 10.15+ x86-64

File details

Details for the file vapoursynth_nnedi3vk-1.0.tar.gz.

File metadata

  • Download URL: vapoursynth_nnedi3vk-1.0.tar.gz
  • Upload date:
  • Size: 12.8 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for vapoursynth_nnedi3vk-1.0.tar.gz
Algorithm Hash digest
SHA256 00a96a4cbccbb1a8ce76e4e2fea87d8f2addfc22cbc094d3cb5ecf3c9e3af754
MD5 24296c4da7dabda8b482883140a57f84
BLAKE2b-256 3be7a0064888cfac18a9ff1733c2087ca3078ba39e1f9a0fc5223ac2204dfa0e

See more details on using hashes here.

Provenance

The following attestation bundles were made for vapoursynth_nnedi3vk-1.0.tar.gz:

Publisher: build.yml on HolyWu/VapourSynth-nnedi3vk

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file vapoursynth_nnedi3vk-1.0-py3-none-win_amd64.whl.

File metadata

File hashes

Hashes for vapoursynth_nnedi3vk-1.0-py3-none-win_amd64.whl
Algorithm Hash digest
SHA256 290c8845dead5b24a46db7f8d77ba1375359e578ca0ac177b94829895a063b30
MD5 c6a6950d8df639d4c638f8627256456a
BLAKE2b-256 9f1e44c862fa8325aeaebe89e804ddc5c258840ccf163333c9b7b6a4b1eb6400

See more details on using hashes here.

Provenance

The following attestation bundles were made for vapoursynth_nnedi3vk-1.0-py3-none-win_amd64.whl:

Publisher: build.yml on HolyWu/VapourSynth-nnedi3vk

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file vapoursynth_nnedi3vk-1.0-py3-none-musllinux_1_2_x86_64.whl.

File metadata

File hashes

Hashes for vapoursynth_nnedi3vk-1.0-py3-none-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 a9a8ea6aefe0987a852217f8ed299a9e867fd44b62a9a0bedb2bd0f61609088c
MD5 bf78669b8e8aa5a996884bbd9bdca70b
BLAKE2b-256 ec178ee20187652f657b30e721e239e33df1aa73f9ab36e49b95e2469cd8613e

See more details on using hashes here.

Provenance

The following attestation bundles were made for vapoursynth_nnedi3vk-1.0-py3-none-musllinux_1_2_x86_64.whl:

Publisher: build.yml on HolyWu/VapourSynth-nnedi3vk

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file vapoursynth_nnedi3vk-1.0-py3-none-musllinux_1_2_aarch64.whl.

File metadata

File hashes

Hashes for vapoursynth_nnedi3vk-1.0-py3-none-musllinux_1_2_aarch64.whl
Algorithm Hash digest
SHA256 76e611f2ea767a447ca8a0f97c2ae596c85825b963e9ffec261b79b741537b1b
MD5 dd423fb16d8654722d092b05632992fd
BLAKE2b-256 56f165732d52d571d690abb7ed674a951d661ed72246451059bf10ace552e952

See more details on using hashes here.

Provenance

The following attestation bundles were made for vapoursynth_nnedi3vk-1.0-py3-none-musllinux_1_2_aarch64.whl:

Publisher: build.yml on HolyWu/VapourSynth-nnedi3vk

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file vapoursynth_nnedi3vk-1.0-py3-none-manylinux_2_34_x86_64.whl.

File metadata

File hashes

Hashes for vapoursynth_nnedi3vk-1.0-py3-none-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 634e7036cf45d91145312c42815ffdb11bda10f503cc702dfd718d4221ff52f9
MD5 010c3e937db68ecb2ceb2b37d63f5ac1
BLAKE2b-256 05a42134ad8f09e7a4865efd93c3bf5817c426d401902102c582755c80408f64

See more details on using hashes here.

Provenance

The following attestation bundles were made for vapoursynth_nnedi3vk-1.0-py3-none-manylinux_2_34_x86_64.whl:

Publisher: build.yml on HolyWu/VapourSynth-nnedi3vk

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file vapoursynth_nnedi3vk-1.0-py3-none-manylinux_2_34_aarch64.whl.

File metadata

File hashes

Hashes for vapoursynth_nnedi3vk-1.0-py3-none-manylinux_2_34_aarch64.whl
Algorithm Hash digest
SHA256 a5cf79d87055f3bc7b972efc809b09d2772da094b7a1a89d96777bbb548b066b
MD5 6b5019ba2208008d8a17b8aec91d928d
BLAKE2b-256 e0e7f7e609a8879bb2c7add3b106651b6e808c0e4143bd976e4f2bd528140da9

See more details on using hashes here.

Provenance

The following attestation bundles were made for vapoursynth_nnedi3vk-1.0-py3-none-manylinux_2_34_aarch64.whl:

Publisher: build.yml on HolyWu/VapourSynth-nnedi3vk

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file vapoursynth_nnedi3vk-1.0-py3-none-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for vapoursynth_nnedi3vk-1.0-py3-none-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 deb9b45c539dfaee786d957247c9a6d503f1c03cf4f30b9cc1c84522ff3efbd3
MD5 310b960fb2fde3a99e5e7c8889860e78
BLAKE2b-256 ed3e17752a01d096e8f950099441ebe2c22058c204ae9c40cb2b717fa656b060

See more details on using hashes here.

Provenance

The following attestation bundles were made for vapoursynth_nnedi3vk-1.0-py3-none-macosx_11_0_arm64.whl:

Publisher: build.yml on HolyWu/VapourSynth-nnedi3vk

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file vapoursynth_nnedi3vk-1.0-py3-none-macosx_10_15_x86_64.whl.

File metadata

File hashes

Hashes for vapoursynth_nnedi3vk-1.0-py3-none-macosx_10_15_x86_64.whl
Algorithm Hash digest
SHA256 e962df563f6307a30b46d945b75e3b053c0bf835f46a5425132292ade72a7149
MD5 024c391af1caa3961d8b1c93a51cdcc6
BLAKE2b-256 ca4bfec6455a865b13344d0e507967985d592858abf0d7268e9fadbef76878e6

See more details on using hashes here.

Provenance

The following attestation bundles were made for vapoursynth_nnedi3vk-1.0-py3-none-macosx_10_15_x86_64.whl:

Publisher: build.yml on HolyWu/VapourSynth-nnedi3vk

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page