Skip to content
/ MODNet Public
forked from ZHKKKe/MODNet

A Trimap-Free Solution for Portrait Matting in Real Time

Notifications You must be signed in to change notification settings

2meeltd/MODNet

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

39 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MODNet: Trimap-Free Portrait Matting in Real Time

MODNet is a model for real-time portrait matting with only RGB image input.
MODNet是一个仅需RGB图片输入实时人像抠图模型。

Commercial Solution (商用方案) | Research Demo | Arxiv Preprint | Supplementary Video

Community | Code | PPM Benchmark | License | Acknowledgement | Citation | Contact


Commercial Solution (商用方案)

The commercial solution for portrait matting is coming!
人像抠图商用方案发布了!

Portrait Image Matting Solution (图片抠像方案)

A Single Model! Only 7M! Process 2K resolution image with a Fast speed on common PCs or Mobiles!
单个模型!大小仅为7M!可以在普通PC或移动设备上快速处理具有2K分辨率的图像!

Now you can try our portrait image matting online via this website.
现在,您可以通过此网站在线使用我们的图片抠像功能。

The API interface for portrait image matting is published on RapidAPI - Portrait Solo. Pay-as-you-go for small-scale use at affordable prices.
图片抠像的商用API接口已发布在RapidAPI - Portrait Solo。适合小规模使用的按需付费。

If you are interest in a portrait image matting SDK, please contact [email protected].
如果您对图片抠像SDK感兴趣,请联系[email protected]

Portrait Video Matting Solution (视频抠像方案)

Stay tuned.
敬请期待。


Research Demo

All the models behind the following demos are trained on the datasets mentioned in our paper.

Portrait Image Matting

We provide an online Colab demo for portrait image matting.
It allows you to upload portrait images and predict/visualize/download the alpha mattes.

Portrait Video Matting

We provide two real-time portrait video matting demos based on WebCam. When using the demo, you can move the WebCam around at will. If you have an Ubuntu system, we recommend you to try the offline demo to get a higher fps. Otherwise, you can access the online Colab demo.
We also provide an offline demo that allows you to process custom videos.

Community

We share some cool applications/extentions of MODNet built by the community.

  • WebGUI for Portrait Image Matting
    You can try this WebGUI (hosted on Gradio) for portrait image matting from your browser without code!

  • Colab Demo of Bokeh (Blur Background)
    You can try this Colab demo (built by @eyaler) to blur the backgroud based on MODNet!

  • ONNX Version of MODNet
    You can convert the pre-trained MODNet to an ONNX model by using this code (provided by @manthan3C273). You can also try this Colab demo for MODNet image matting (ONNX version).

  • TorchScript Version of MODNet
    You can convert the pre-trained MODNet to an TorchScript model by using this code (provided by @yarkable).

  • TensorRT Version of MODNet
    You can access this Github repository to try the TensorRT version of MODNet (provided by @jkjung-avt).

There are some resources about MODNet from the community.

Code

We provide the code of MODNet training iteration, including:

  • Supervised Training: Train MODNet on a labeled matting dataset
  • SOC Adaptation: Adapt a trained MODNet to an unlabeled dataset

In the code comments, we provide examples for using the functions.

PPM Benchmark

The PPM benchmark will be released in a separate repository PPM.

License

All resources in this repository (code, models, demos, etc.) are released under the Creative Commons Attribution NonCommercial ShareAlike 4.0 license.
The license will be changed to allow commercial use after our paper is accepted.

Acknowledgement

Citation

If this work helps your research, please consider to cite:

@article{MODNet,
  author = {Zhanghan Ke and Kaican Li and Yurou Zhou and Qiuhua Wu and Xiangyu Mao and Qiong Yan and Rynson W.H. Lau},
  title = {Is a Green Screen Really Necessary for Real-Time Portrait Matting?},
  journal={ArXiv},
  volume={abs/2011.11961},
  year = {2020},
}

Contact

This repository is currently maintained by Zhanghan Ke (@ZHKKKe).
For commercial questions, please contact [email protected].
For research questions, please contact [email protected].

About

A Trimap-Free Solution for Portrait Matting in Real Time

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%