Giter VIP home page Giter VIP logo

phase-based-frame-interpolation's Introduction

Phase-based-Frame-Interpolation

This is my personal implementation of the paper "Phase-based frame interpolation for Video". To be precise, this implementation almost matches this MATLAB implementation. As claimed by the orginal author of the MATLAB code, the implementation is highly un-optimized. Nevertheless, I added GPU support to reduce the processing time while still maintaining the clarity of the method.

Also, if you use this implementation, you must cite the following paper:

S. Meyer, O. Wang, H. Zimmer, M. Grosse and A. Sorkine-Hornung
Phase-based frame interpolation for video
2015 IEEE Conference on Computer Vision and Pattern Recognition (CVPR)

This implementation uses a version of pyrtools by Eero Simoncelli in Python modified by me. Please check this website for more information.

Requirements

pyrtools

cupy v3.0.0a1 (fft is not supported in the earlier versions)

scipy

numpy

skimage

Usages

python demo.py image1_path image2_path --dev cpu --n_frames 1 --save 1 --show 1

Use help to see more options.

Results

Two interpolated frames

phase-based-frame-interpolation's People

Contributors

justanhduc avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

phase-based-frame-interpolation's Issues

compile wrapConv.so

test demo.py with https://github.com/justanhduc/pyPyrTools/tree/test-branch, got error

wrapConv.so: invalid ELF header

then rying to compile the library locally:
gcc -shared -L/usr/lib/python2.7/ -I/usr/lib/python2.7/include/ -lpython2.7 -o wrapConv.so -fPIC convolve.c edges.c wrap.c internal_pointOp.c
error:
/tmp/ccmZ6hfE.o: In function internal_pointop': internal_pointOp.c:(.text+0x0): multiple definition of internal_pointop'
/tmp/ccLrDosE.o:wrap.c:(.text+0x11f7): first defined here
collect2: error: ld returned 1 exit sta

found older version wrap.c from https://github.com/LabForComputationalVision/matlabPyrTools/blob/master/MEX/wrap.c.

Successful compiled library locally.

SCFpyr error : No attribute 'xp'

Got this error when I execute demo.py

I installed all the packages needed to make the project run

Traceback (most recent call last): File "demo.py", line 40, in <module> new_frames = interpolate_frame(img1, img2, n_frames=args.n_frames, scale=.5**.25, xp=xp) File "/home/adrien/Bureau/Phase-based-Frame-Interpolation/frame_interp.py", line 149, in interpolate_frame phase_diff = compute_phase_difference(L, R, scale, limit) File "/home/adrien/Bureau/Phase-based-Frame-Interpolation/frame_interp.py", line 21, in compute_phase_difference xp = L['pyramids'][0].xp AttributeError: SCFpyr instance has no attribute 'xp'

Can anyone help me ?

Non Cuda version

Can you please provide a code which supports a cpu without cuda.

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.