Skip to content

mengnitj/sr-ncnn-vulkan

 
 

Repository files navigation

sr-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 sr-ncnn-vulkan -v

Use

from sr_ncnn_vulkan import sr_ncnn_vulkan as sr

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

# add picture ...
# sr.add(...)

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

Example

  • Please see test Example

Build

pip install wheel
python setup.py bdist_wheel

About

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

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • C++ 62.3%
  • C 29.9%
  • Shell 2.9%
  • Roff 1.5%
  • Makefile 0.9%
  • Python 0.7%
  • Other 1.8%