All Projects → MarcoForte → knn-matting

MarcoForte / knn-matting

Licence: MIT license
Python implementation of KNN Matting, CVPR 2012 / TPAMI 2013 http://dingzeyu.li/projects/knn/

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to knn-matting

RobustVideoMatting
Robust Video Matting in PyTorch, TensorFlow, TensorFlow.js, ONNX, CoreML!
Stars: ✭ 6,889 (+5411.2%)
Mutual labels:  matting
Mmediting
OpenMMLab Image and Video Editing Toolbox
Stars: ✭ 2,618 (+1994.4%)
Mutual labels:  matting
Backgroundmattingv2
Real-Time High-Resolution Background Matting
Stars: ✭ 5,155 (+4024%)
Mutual labels:  matting
TOM-Net
TOM-Net: Learning Transparent Object Matting from a Single Image (CVPR 2018)
Stars: ✭ 74 (-40.8%)
Mutual labels:  matting
lite.ai.toolkit
🛠 A lite C++ toolkit of awesome AI models with ONNXRuntime, NCNN, MNN and TNN. YOLOX, YOLOP, MODNet, YOLOR, NanoDet, YOLOX, SCRFD, YOLOX . MNN, NCNN, TNN, ONNXRuntime, CPU/GPU.
Stars: ✭ 1,354 (+983.2%)
Mutual labels:  matting
poisson-matting
Python implementation of Poisson matting method
Stars: ✭ 41 (-67.2%)
Mutual labels:  matting
P3M
[ACM MM 2021] Privacy-Preserving Portrait Matting
Stars: ✭ 81 (-35.2%)
Mutual labels:  matting
Segmentation-Series-Chaos
Summary and experiment includes basic segmentation, human segmentation, human or portrait matting for both image and video.
Stars: ✭ 75 (-40%)
Mutual labels:  matting
DeepInteractiveSegmentation
Getting to 99% Accuracy in Interactive Segmentation and Interactive Training and Architecture for Deep Object Selection
Stars: ✭ 99 (-20.8%)
Mutual labels:  matting
Manual-Greenscreen-Matting
Greenscreen Matting done on still images and videos
Stars: ✭ 15 (-88%)
Mutual labels:  matting
image-background-remove-tool
✂️ Automated high-quality background removal framework for an image using neural networks. ✂️
Stars: ✭ 767 (+513.6%)
Mutual labels:  matting
BackgroundMattingV2-TensorFlow
TensorFlow implementation of Real-Time High-Resolution Background Matting
Stars: ✭ 75 (-40%)
Mutual labels:  matting

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])

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].