Skip to content

waifu2x-ncnn-vulkan-python, use nihui/waifu2x-ncnn-vulkan

License

Notifications You must be signed in to change notification settings

tonquer/waifu2x-vulkan

Repository files navigation

waifu2x-ncnn-vulkan-python

  • This is modified waifu2x-ncnn-vulkan, Export pyd and so files to Python
  • Support Linux, Windows, MacOs
  • Support import JPG, PNG, BMP, GIF, WEBP, Animated WEBP, APNG
  • Support export JPG, PNG, BMP, WEBP, Animated WEBP, APNG

Install

pip install waifu2x-vulkan -v

Use

from waifu2x_vulkan import waifu2x_vulkan

# init
waifu2x_vulkan.setDebug(True)
sts = waifu2x_vulkan.init()
if sts < 0:
    # cpu model
    isCpuModel = True
gpuList = waifu2x_vulkan.getGpuInfo()
print(gpuList)
sts = waifu2x_vulkan.initSet(gpuId=0, threadNum=2)
assert sts==0

# add picture ...
# waifu2x.add(...)

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

Example

Build

pip install wheel
python setup.py bdist_wheel