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. Our code and models are open-sourced at https://github.com/SHI-Labs/Matting-Anything.
翻译:本文提出任意物体抠图模型(Matting Anything Model,MAM),一种高效且通用的框架,能够根据灵活交互的视觉或语言用户提示引导,估计图像中任意实例的alpha遮罩。与以往专用图像抠图网络相比,MAM具有多项显著优势:(i)MAM仅通过单一模型即可处理多种类型的图像抠图任务,包括语义抠图、实例抠图及指代图像抠图;(ii)MAM利用分段任意模型(Segment Anything Model,SAM)的特征图,并采用轻量级遮罩到遮罩(Mask-to-Matte,M2M)模块通过迭代精炼预测alpha遮罩,该模块仅含270万个可训练参数;(iii)通过融合SAM,MAM将图像抠图交互操作所需的用户干预从三分图(trimap)简化为边界框、点或文本提示。我们在多个图像抠图基准上评估MAM性能,实验结果表明,在各基准的不同指标下,MAM均可达到与当前最先进专用图像抠图模型相当的性能。总体而言,MAM展现出卓越的泛化能力,能够以更少的参数有效处理各类图像抠图任务,为统一图像抠图提供实用解决方案。我们的代码与模型已在https://github.com/SHI-Labs/Matting-Anything开源。