Giter VIP home page Giter VIP logo

vapoursynth-fsrcnn-ncnn-vulkan's Introduction

Vapoursynth FSRCNN Vulkan

ncnn implementation of fsrcnn converter for vapoursynth.

Build for Windows x64

install Visual Studio Community 2019

Start → Programs → Visual Studio 2019 → 64 Native Tools Command Prompt for VS 2019

build vs-fsrcnn-vulkan

mkdir build
cd build
cmake -G"NMake Makefiles" ..
nmake

Usage

clip = mvf.ToRGB(clip, depth=32, sample=1) #Convert to RGB32
clip = core.fsrcnn.Filter(clip)

Reference

vapoursynth-fsrcnn-ncnn-vulkan's People

Contributors

sg4dylan avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

Forkers

tatsh

vapoursynth-fsrcnn-ncnn-vulkan's Issues

fail build in linux

Hi

after some changes in the CMakeLists for adapt the paths to linux, when build i get:

[ 66%] Building CXX object CMakeFiles/vs_fsrcnn_vulkan.dir/fsrcnn.cpp.o
/tmp/makepkg/vapoursynth-plugin-fsrcnn-ncnn-vulkan-git/src/fsrcnn-ncnn-vulkan/fsrcnn.cpp: In function 'void new_to_gray(const ncnn::Mat&, float*)':
/tmp/makepkg/vapoursynth-plugin-fsrcnn-ncnn-vulkan-git/src/fsrcnn-ncnn-vulkan/fsrcnn.cpp:136:15: error: 'max' was not declared in this scope
  136 |   *gray = min(max(*ptr, 0), 255);
      |               ^~~
/tmp/makepkg/vapoursynth-plugin-fsrcnn-ncnn-vulkan-git/src/fsrcnn-ncnn-vulkan/fsrcnn.cpp:136:15: note: suggested alternatives:
In file included from /usr/include/c++/9.2.1/algorithm:62,
                 from /usr/include/opencv4/opencv2/core/base.hpp:55,
                 from /usr/include/opencv4/opencv2/core.hpp:54,
                 from /tmp/makepkg/vapoursynth-plugin-fsrcnn-ncnn-vulkan-git/src/fsrcnn-ncnn-vulkan/fsrcnn.cpp:9:
/usr/include/c++/9.2.1/bits/stl_algo.h:3462:5: note:   'std::max'
 3462 |     max(initializer_list<_Tp> __l, _Compare __comp)
      |     ^~~
In file included from /tmp/makepkg/vapoursynth-plugin-fsrcnn-ncnn-vulkan-git/src/fsrcnn-ncnn-vulkan/fsrcnn.cpp:9:
/usr/include/opencv4/opencv2/core.hpp:1455:17: note:   'cv::max'
 1455 | CV_EXPORTS void max(const UMat& src1, const UMat& src2, UMat& dst);
      |                 ^~~
/tmp/makepkg/vapoursynth-plugin-fsrcnn-ncnn-vulkan-git/src/fsrcnn-ncnn-vulkan/fsrcnn.cpp:136:11: error: 'min' was not declared in this scope
  136 |   *gray = min(max(*ptr, 0), 255);
      |           ^~~
/tmp/makepkg/vapoursynth-plugin-fsrcnn-ncnn-vulkan-git/src/fsrcnn-ncnn-vulkan/fsrcnn.cpp:136:11: note: suggested alternatives:
In file included from /usr/include/c++/9.2.1/algorithm:62,
                 from /usr/include/opencv4/opencv2/core/base.hpp:55,
                 from /usr/include/opencv4/opencv2/core.hpp:54,
                 from /tmp/makepkg/vapoursynth-plugin-fsrcnn-ncnn-vulkan-git/src/fsrcnn-ncnn-vulkan/fsrcnn.cpp:9:
/usr/include/c++/9.2.1/bits/stl_algo.h:3450:5: note:   'std::min'
 3450 |     min(initializer_list<_Tp> __l, _Compare __comp)
      |     ^~~
In file included from /tmp/makepkg/vapoursynth-plugin-fsrcnn-ncnn-vulkan-git/src/fsrcnn-ncnn-vulkan/fsrcnn.cpp:9:
/usr/include/opencv4/opencv2/core.hpp:1434:17: note:   'cv::min'
 1434 | CV_EXPORTS void min(const UMat& src1, const UMat& src2, UMat& dst);
      |                 ^~~
make[2]: *** [CMakeFiles/vs_fsrcnn_vulkan.dir/build.make:76: CMakeFiles/vs_fsrcnn_vulkan.dir/fsrcnn.cpp.o] Error 1
make[2]: Leaving directory '/tmp/makepkg/vapoursynth-plugin-fsrcnn-ncnn-vulkan-git/src/build'
make[1]: *** [CMakeFiles/Makefile2:76: CMakeFiles/vs_fsrcnn_vulkan.dir/all] Error 2
make[1]: Leaving directory '/tmp/makepkg/vapoursynth-plugin-fsrcnn-ncnn-vulkan-git/src/build'
make: *** [Makefile:84: all] Error 2

i've found in inet somethig like include <algoritm> and change to std::foo, but not works for me,
also found this

#ifndef min
#define min(a,b) ((a) <= (b) ? (a) : (b))
#endif
#ifndef max
#define max(a,b) ((a) >= (b) ? (a) : (b))
#endif

works, but i'm not sure if is the best for this

any help?

greetings

编译失败

水平有限,fsrcnn编译失败,能不能发个vs版的dll呀,我只能用Waifu2x-w2xc,不知哪个模式是基于fsrcnn的。
已经发了个邮件给楼主,万分感谢!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.