Coder Social home page Coder Social logo

splatting's Introduction

splatting

This is a reimplementation of softmax-splatting, which can also be executed on CPU only devices.

test status

Coverage Status

setup

This implementation requires PyTorch to be installed. Once PyTorch is installed, the package can be compiled with pip install . or pip install -e ..

Alternatively, the extension can be compiled the first time you import it. Therefore ninja needs to be installed, for example with pip install ninja. Then just import the module in your python script. The first time you import it, the extension will be compiled. The second time, it does not need to compile it anymore.

usage

If you installed the extension with pip, you can simply import it:

from splatting import Splatting

If you choose to JIT compile it, you can add this repository to your project structure like

└── your_code
    ├── file1.py
    ├── file2.py
    └── utils
        └── splatting  // this repository

you can import like this:

from your_code.utils.splatting import Splatting

The splatting function can be used like this:

import torch
from splatting import Splatting, splatting_function

frame = torch.ones([1, 3, 4, 4])
flow = torch.ones([1, 2, 4, 4])

# use of the slatting function
output = splatting_function("average", frame, flow)

# use of the splatting module
output = Splatting("average")(frame, flow)

references

[1]  @inproceedings{Niklaus_CVPR_2020,
         author = {Simon Niklaus and Feng Liu},
         title = {Softmax Splatting for Video Frame Interpolation},
         booktitle = {IEEE International Conference on Computer Vision},
         year = {2020}
     }

splatting's People

Contributors

hperrot avatar

Watchers

James Cloos 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.