Coder Social home page Coder Social logo

rife-ncnn-vulkan-python's Introduction

RIFE ncnn Vulkan Python

CI

Introduction

rife-ncnn-vulkan is nihui's ncnn implementation of Real-World Super-Resolution via Kernel Estimation and Noise Injection super resolution.

rife-ncnn-vulkan-python wraps rife-ncnn-vulkan project by SWIG to make it easier to integrate rife-ncnn-vulkan with existing python projects.

Downloads

Linux/Windos/Mac X86_64 build releases are available now. However, for Linux you may need to compile it yourself if you are using distro with GLIBC < 2.29 .

Build

First, you have to install python, python development package (Python native development libs in Visual Studio), vulkan SDK and SWIG on your platform. And then:

Linux

git clone https://github.com/ArchieMeng/rife-ncnn-vulkan-python.git
cd rife-ncnn-vulkan-python
git submodule update --init --recursive
cmake -B build src
cd build
make

Windows

I used Visual Studio 2019 and msvc v142 to build this project for Windows.

Install visual studio and open the project directory, and build. Job done.

The only problem on Windows is that, you cannot use CMake for Windows to generate the Visual Studio solution file and build it. This will make the lib crash on loading.

The only way is use Visual Studio to open the project as directory, and build it from Visual Studio.

About RIFE

RIFE (Real-Time Intermediate Flow Estimation for Video Frame Interpolation)

https://github.com/hzwer/arXiv2020-RIFE

Huang, Zhewei and Zhang, Tianyuan and Heng, Wen and Shi, Boxin and Zhou, Shuchang

https://rife-vfi.github.io

https://arxiv.org/abs/2011.06294

Usages

Example Program

from PIL import Image
from rife_ncnn_vulkan import RIFE

im0, im1 = Image.open("0.png"), Image.open("1.png")
rife = RIFE(0)
im = rife.process(im0, im1)
im.save("interframe.png")

If you encounter a crash or error, try upgrading your GPU driver:

Model

model upstream version
rife 1.2
rife-HD 1.5
rife-UHD 1.6
rife-anime 1.8
rife-v2 2.0
rife-v2.3 2.3
rife-v2.4 2.4

Sample Images

Original Image

origin0 origin1

Interpolate with rife rife-anime model

rife

Interpolate with rife rife-anime model + TTA-s

rife

Original RIFE Project

Other Open-Source Code Used

rife-ncnn-vulkan-python's People

Contributors

archiemeng avatar

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.