# Matting-Anything **Repository Path**: ymfjly/Matting-Anything ## Basic Information - **Project Name**: Matting-Anything - **Description**: No description available - **Primary Language**: Unknown - **License**: MIT - **Default Branch**: main - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2023-12-10 - **Last Updated**: 2023-12-10 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # Matting Anything [](https://www.youtube.com/watch?v=XY2Q0HATGOk) [](https://huggingface.co/spaces/shi-labs/Matting-Anything) [](https://pytorch.org/) [](https://opensource.org/licenses/MIT) [Jiachen Li](https://chrisjuniorli.github.io/), [Jitesh Jain](https://praeclarumjj3.github.io/), [Humphrey Shi](https://www.humphreyshi.com/home) [[`Project page`](https://chrisjuniorli.github.io/project/Matting-Anything/)] [[`ArXiv`](https://arxiv.org/abs/2306.05399)] [[`Pdf`](https://arxiv.org/pdf/2306.05399.pdf)] [[`Video`](https://www.youtube.com/watch?v=XY2Q0HATGOk)] [[`Demo`](https://huggingface.co/spaces/shi-labs/Matting-Anything)]  ## Updates - **`2023/07/17`**: Added MAM checkpoints based on SAM ViT-L and SAM ViT-H. - **`2023/06/28`**: [**Getting Started**](https://github.com/SHI-Labs/Matting-Anything/blob/main/GETTING_STARTED.md) is updated with training and evaluation instructions. - **`2023/06/09`**: [**HuggingFace Demo**](https://huggingface.co/spaces/shi-labs/Matting-Anything) is released. - **`2023/06/08`**: [**Arxiv Preprint**](https://arxiv.org/abs/2306.05399) is released. - **`2023/06/06`**: [**Project Page**](https://chrisjuniorli.github.io/project/Matting-Anything) and [**Demo Video**](https://www.youtube.com/watch?v=XY2Q0HATGOk) are released. ## Contents - [Matting-Anything](#matting-anything) - [Installation](#installation) - [Getting Started](#getting-started) - [Third-Party Projects](#third-party-projects) ## Matting Anything ### Abstract In this paper, we propose the Matting Anything Model (MAM), an efficient and versatile framework for estimating the alpha matte of any instance in an image with flexible and interactive visual or linguistic user prompt guidance. MAM offers several significant advantages over previous specialized image matting networks: (i) MAM is capable of dealing with various types of image matting, including semantic, instance, and referring image matting with only a single model; (ii) MAM leverages the feature maps from the Segment Anything Model (SAM) and adopts a lightweight Mask-to-Matte (M2M) module to predict the alpha matte through iterative refinement, which has only 2.7 million trainable parameters. (iii) By incorporating SAM, MAM simplifies the user intervention required for the interactive use of image matting from the trimap to the box, point, or text prompt. We evaluate the performance of MAM on various image matting benchmarks, and the experimental results demonstrate that MAM achieves comparable performance to the state-of-the-art specialized image matting models under different metrics on each benchmark. Overall, MAM shows superior generalization ability and can effectively handle various image matting tasks with fewer parameters, making it a practical solution for unified image matting. ### Architecture