Skip to main content

A waifu2x tool, use vulkan.

Project description

waifu2x-ncnn-vulkan-python

  • This is modified waifu2x-ncnn-vulkan, Export pyd and so files to Python
  • Support Linux, Windows, MacOs
  • Support JPG, PNG, BMP
  • Need support vulkan gpu

Install

pip install waifu2x-vulkan

Use

import waifu2x_vulkan

# init
sts = waifu2x_vulkan.init()
assert sts==0
gpuList = waifu2x_vulkan.getGpuInfo()
print(gpuList)
sts = waifu2x_vulkan.initSet(gpuId=0, threadNum=2)
assert sts==0

# Model List:
#'MODEL_ANIME_STYLE_ART_RGB_NOISE0', 'MODEL_ANIME_STYLE_ART_RGB_NOISE0_TTA', 'MODEL_ANIME_STYLE_ART_RGB_NOISE1', 'MODEL_ANIME_STYLE_ART_RGB_NOISE1_TTA', 'MODEL_ANIME_STYLE_ART_RGB_NOISE2', 'MODEL_ANIME_STYLE_ART_RGB_NOISE2_TTA', 'MODEL_ANIME_STYLE_ART_RGB_NOISE3', 'MODEL_ANIME_STYLE_ART_RGB_NOISE3_TTA', 'MODEL_ANIME_STYLE_ART_RGB_NO_NOISE', 'MODEL_ANIME_STYLE_ART_RGB_NO_NOISE_TTA', 'MODEL_CUNET_NOISE0', 'MODEL_CUNET_NOISE0_TTA', 'MODEL_CUNET_NOISE1', 'MODEL_CUNET_NOISE1_TTA', 'MODEL_CUNET_NOISE2', 'MODEL_CUNET_NOISE2_TTA', 'MODEL_CUNET_NOISE3', 'MODEL_CUNET_NOISE3_TTA', 'MODEL_CUNET_NO_NOISE', 'MODEL_CUNET_NO_NOISE_TTA', 'MODEL_CUNET_NO_SCALE_NOISE0', 'MODEL_CUNET_NO_SCALE_NOISE0_TTA', 'MODEL_CUNET_NO_SCALE_NOISE1', 'MODEL_CUNET_NO_SCALE_NOISE1_TTA', 'MODEL_CUNET_NO_SCALE_NOISE2', 'MODEL_CUNET_NO_SCALE_NOISE2_TTA', 'MODEL_CUNET_NO_SCALE_NOISE3', 'MODEL_CUNET_NO_SCALE_NOISE3_TTA', 'MODEL_CUNET_NO_SCALE_NO_NOISE', 'MODEL_CUNET_NO_SCALE_NO_NOISE_TTA', 'MODEL_PHOTO_NOISE0', 'MODEL_PHOTO_NOISE0_TTA', 'MODEL_PHOTO_NOISE1', 'MODEL_PHOTO_NOISE1_TTA', 'MODEL_PHOTO_NOISE2', 'MODEL_PHOTO_NOISE2_TTA', 'MODEL_PHOTO_NOISE3', 'MODEL_PHOTO_NOISE3_TTA', 'MODEL_PHOTO_NO_NOISE', 'MODEL_PHOTO_NO_NOISE_TTA'

# add picture ...
# waifu2x.add(data=imgData, modelIndex=waifu2x_vulkan.MODEL_ANIME_STYLE_ART_RGB_NOISE0, backId=0, scale=2.5)
# waifu2x.add(data=imgData, modelIndex=waifu2x_vulkan.MODEL_ANIME_STYLE_ART_RGB_NOISE0, backId=0, format="png", width=1000, high=1000)

# load picture...
# newData, status, backId, tick = waifu2x.load(0)

Project details


Download files

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

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

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

waifu2x_vulkan-1.0.4-cp36.cp37.cp38.cp39.cp310-none-win_amd64.whl (34.4 MB view details)

Uploaded CPython 3.10CPython 3.6CPython 3.7CPython 3.8CPython 3.9Windows x86-64

waifu2x_vulkan-1.0.4-cp36.cp37.cp38.cp39.cp310-none-manylinux2014_x86_64.whl (36.2 MB view details)

Uploaded CPython 3.10CPython 3.6CPython 3.7CPython 3.8CPython 3.9

File details

Details for the file waifu2x_vulkan-1.0.4-cp36.cp37.cp38.cp39.cp310-none-win_amd64.whl.

File metadata

  • Download URL: waifu2x_vulkan-1.0.4-cp36.cp37.cp38.cp39.cp310-none-win_amd64.whl
  • Upload date:
  • Size: 34.4 MB
  • Tags: CPython 3.10, CPython 3.6, CPython 3.7, CPython 3.8, CPython 3.9, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.7.9

File hashes

Hashes for waifu2x_vulkan-1.0.4-cp36.cp37.cp38.cp39.cp310-none-win_amd64.whl
Algorithm Hash digest
SHA256 1708faefbb36e167322cec4d46a46756f0b80f5282a78e786f6b020d1ce49bac
MD5 7956c8ecebd7ec560b054ebe243a0949
BLAKE2b-256 a583325e7e63c1507c16a9fca8d47330ec531829d65a0cc59be0ff7d28124788

See more details on using hashes here.

File details

Details for the file waifu2x_vulkan-1.0.4-cp36.cp37.cp38.cp39.cp310-none-manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for waifu2x_vulkan-1.0.4-cp36.cp37.cp38.cp39.cp310-none-manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 a09106e32f01db30dacf7d7041d87db4b1eb8075a142e6836077b565136357cc
MD5 ad97f6c2d7d16e42df1d689f5ee4bcd8
BLAKE2b-256 38af6c54e7342a5bc760c24ef8b18ec3477a77683732e6361ac58539d73d9a24

See more details on using hashes here.

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