Giter Site home page Giter Site logo

matte-anything's Introduction

Matte Anything!๐Ÿ’

Interactive Natural Image Matting with Segment Anything Models

Authors: Jingfeng Yao, Xinggang Wang๐Ÿ“ง, Lang Ye, Wenyu Liu

Institute: School of EIC, HUST

(๐Ÿ“ง) corresponding author

arxiv paper video license authors

demo

๐Ÿ“ข News

  • 2023/07/01 We release a new version that enables text input and transparency correction!
  • 2023/06/08 We release arxiv tech report!
  • 2023/06/08 We release source codes of Matte Anything!

The program is still in progress. You can try the early version first! Thanks for your attention. If you like Matte Anything, you may also like its previous foundation work ViTMatte.

๐Ÿ“œ Introduction

We propose Matte Anything (MatAny), an interactive natural image matting model. It could produce high-quality alpha-matte with various simple hints. The key insight of MatAny is to generate pseudo trimap automatically with contour and transparency prediction. We leverage task-specific vision models to enhance the performance of natural image matting.

web_ui

๐ŸŒž Features

  • Matte Anything with Simple Interaction
  • High Quality Matting Results
  • Ability to Process Transparent Object

๐ŸŽฎ Quick Start

Try our Matte Anything with our web-ui!

web_ui

Quick Installation

Install Segment Anything Models as following:

pip install git+https://github.com/facebookresearch/segment-anything.git

Install ViTMatte as following:

python -m pip install 'git+https://github.com/facebookresearch/detectron2.git'
pip install -r requirements.txt

Install GroundingDINO as following:

cd Matte-Anything
git clone https://github.com/IDEA-Research/GroundingDINO.git
cd GroundingDINO
pip install -e .

Download pretrained models SAM_vit_h, ViTMatte_vit_b, and GroundingDINO-T. Put them in ./pretrained

Run our web-ui!

python matte_anything.py

How to use

  1. Upload the image and click on it (default: foreground point).
  2. Click Start!.
  3. Modify erode_kernel_size and dilate_kernel_size for a better trimap (optional).

๐ŸŽฌ Demo

matte_anything.mp4

Visualization of SAM and MatAny on real-world data from AM-2K and P3M-500 . web_ui Visualization of SAM and MatAny on Composition-1k web_ui

๐Ÿ“‹ Todo List

  • adjustable trimap generation
  • arxiv tech report
  • support user transparency correction
  • support text input
  • add example data
  • finetune ViTMatte for better performance

๐ŸคAcknowledgement

Our repo is built upon Segment Anything, GroundingDINO, and ViTMatte. Thanks to their work.

Citation

@article{matte_anything,
  title={Matte Anything: Interactive Natural Image Matting with Segment Anything Models},
  author={Yao, Jingfeng and Wang, Xinggang and Ye, Lang and Liu, Wenyu},
  journal={arXiv preprint arXiv:2306.04121},
  year={2023}
}

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.