hustvl/Matte-Anything
关于
[Image and Vision Computing(2024 年 7 月,第 147 卷)] 使用 Segment Anything 模型进行交互式自然图像抠图
设计与媒体可以做什么
- Matte Anything with Simple Interaction
- High Quality Matting Results
- Ability to Process Transparent Object
实测星标增长
- 24小时
- 0
- 7天
- 0
- 15天
- +1
- 1个月
- 正在收集历史
各周期内的星标净变化,周期相互重叠,并非每日新增。缺失的测量保持空白。星标代表关注度,不代表软件质量。
README.md
原文Matte Anything!🐒
Interactive Natural Image Matting with Segment Anything Models
Authors: Jingfeng Yao, Xinggang Wang:email:, Lang Ye, Wenyu Liu
Institute: School of EIC, HUST
(:email:) corresponding author
📢 News
2024/05/04Matte Anything has been accepted by the Journal of Image and Vision Computing!2024/01/02Now you can get alpha materials with MatAny! Check it now!2023/07/01We release a new version that enables text input and transparency correction!2023/06/08We release arxiv tech report!2023/06/08We 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.
🔥 Transparent Materials of Yourself !
MatAny could get matting results as RGBA images. It will be saved into your_demos/your_demo.png. You can specify the saving name of it in our UI. We hope MatAny could help.
📜 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.

🌞 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!

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
- Upload the image and click on it (default:
foreground point). - Click
Start!. - Modify
erode_kernel_sizeanddilate_kernel_sizefor a better trimap (optional).
🎬 Demo
https://github.com/hustvl/Matte-Anything/assets/74295796/dfe051c2-b5d1-442d-9eff-cd1fcfd1f51b
Visualization of SAM and MatAny on real-world data from AM-2K and P3M-500 .
Visualization of SAM and MatAny on Composition-1k

📋 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{yao2024matte,
title={Matte anything: Interactive natural image matting with segment anything model},
author={Yao, Jingfeng and Wang, Xinggang and Ye, Lang and Liu, Wenyu},
journal={Image and Vision Computing},
pages={105067},
year={2024},
publisher={Elsevier}
}
探索相关项目
加载中…