Git Product home page Git Product logo

knn-matting's Introduction

knn-matting

Python port of source code for KNN Matting, CVPR 2012 / TPAMI 2013 http://dingzeyu.li/projects/knn/

Requirements

  • python 3.5 (Though it should run on 2.7)
  • scipy
  • numpy
  • matplotlib
  • sklearn

Running the demo

  • '''python knn_matting.py'''
  • mylambda (λ) is a constant controlling the users confidence in the constraints
  • image size not larger than 640*480 reccomended for speed and memory reasons.

Results

Original image

Trimap image

Result image

More Information

The sparse matrix solve step may be greatly sped up by using the scikit-umfpack wrapper of UMFPACK sparse direct solver, https://github.com/scikit-umfpack/scikit-umfpack
For more information see the orginal paper and it's website here http://dingzeyu.li/projects/knn/ The original matlab code is here https://github.com/dingzeyuli/knn-matting

Disclaimer

The code is free for academic/research purpose. Use at your own risk and we are not responsible for any loss resulting from this code. Feel free to submit pull request for bug fixes.

Contact

Marco Forte ([email protected])

Original authors:
Qifeng Chen ([email protected]) and Dingzeyu Li ([email protected])

knn-matting's People

Contributors

marcoforte avatar

Watchers

 avatar  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.