Hacker News 熱門精选79

Show HN:MultiMatte,一个可用提示词控制的图像背景移除模型

Show HN: MultiMatte, a Promptable Image Background Removal Model

· 33天前
跳到正文

精选理由

可操作性 86 / 新颖度 78,来自 Hacker News 熱門。

AI 摘要

HN 大家好,我是来自 Feyn 的 Shreyash。我们帮助公司基于其数据构建定制模型。 今天我们发布 MultiMatte,这是一个可以用文字指向目标的背景移除模型。说出图像中的一个对象,MultiMatte 只保留那个对象,并移除其他所有内容。 用你的图像试试看: https://usefeyn.com/multimatte/ 。 演示视频: https://youtu.be/XZ5BJWAkOjs MultiMatte 是开源的。使用我们的 NoBg 库来构建: https://github.com/feyninc/nobg 。模型卡在这里: https://hf.co/feyninc/multimatte MultiMatte 是我们背景移除模型的第二次迭代。第一个是 FeyNoBg,我们曾在这里发布: https://news.ycombinator.com/item?id=49072462 。 最大的升级是可提示性。大多数模型在裁切背景时会保留所有前景元素。MultiMatte 让你可以用提示词指定想要保留的确切对象,并移除其他所有内容。例如,如果你有一张包含一只狗和一个碗的图像,你可以让 MultiMatte 只保留狗。 MultiMatte 基于 Meta 的 SAM 3 构建,SAM 3 是一个可用概念提示的检测器,已经能够理解短语。我们最大的改变在于遮罩。MultiMatte 不使用将每个像素分类为位于对象内部或外部的二值遮罩,而是使用 alpha mattes,为每个像素相对于某个对象分配一个不透明度值。这使我们能够更好地表现头发、毛发、运动模糊以及其他类型的模糊边界。 在我们测量的所有基准测试中,MultiMatte 相比 SAM 3 都显示出阶跃式提升。在 DIS5K 上,S-measure 从 0.674 提升到 0.908(相对提升 34.6%),在 DUT-OMRON 上从 0.792 提升到 0.901(13.7%)。 我们的博客介绍了更多训练细节和结果: https://usefeyn.com/blog/multimatte 。 很乐意回答任何问题! 评论 URL: https://news.ycombinator.com/item?id=49645803 点数:9 评论数:1

正文

MultiMatte: Keep What You Want, Cut the Rest
Research · field note

MultiMatte: Keep What You Want, Cut the Rest

Authors
Hafedh Hichri, Shreyash Nigam
Affiliation
Feyn Labs
Published
September 10, 2026
Reading time
5 min

We’re introducing MultiMatte, a background removal model you can aim with words. MultiMatte keeps the object you name and removes everything else.

Try MultiMatte on your own images at usefeyn.com/multimatte.

MultiMatte is built on SAM 3 (Meta, 2025). We used low-rank fine-tuning to modify 19.49M of its 860M parameters. That update touches only 2.27% of the model weights, yet MultiMatte improves substantially on image segmentation. On the DIS-VD benchmark, it scores a 0.901 S-measure against SAM 3’s 0.667.

Prompt steering drag to compare
The dog kept, everything else removed.The metal bowl kept from the same photograph, the dog and everything else removed.The person's jeans kept from the same photograph, everything else removed. A bulldog looking up at a bowl held by a person in jeans. input Prompt: the dog
Prompt: the dog Prompt: the dog bowl Prompt: the jeans

From Segmentation to Matting

SAM 3 is a concept-promptable detector. Given a phrase, the model returns binary masks for every matching object. These masks classify each pixel as either inside or outside the object. This binary approach fails on fine or translucent elements with fuzzy boundaries, like hair or a blurred screen.

MultiMatte addresses this gap with alpha mattes. Instead of assigning a boolean to each pixel, an alpha matte assigns a continuous opacity value to every pixel. Fuzzy boundaries can then be described as they actually appear.

Alpha mattes earn their keep on benchmarks. Across five high-resolution DIS splits, SAM 3 scores between 0.649 and 0.703. MultiMatte scores between 0.893 and 0.923.

Training MultiMatte

SAM 3 is not one network but several aligned parts: a vision tower, a CLIP text tower, a geometry encoder, a detection encoder and decoder, and a mask decoder. The ability to aim the model with a phrase lives in the alignment between those parts. Our objective was to carry this ability over to matting.

We trained the model with PEFT, using LoRA (Hu et al., 2021). Every targeted linear layer kept its pretrained weight frozen and learned two small matrices that added a low-rank update alongside it. Training this way let us retain SAM 3’s text alignment and original vocabulary while improving its segmentation ability.

The rank-16 adapter followed the configuration principles in Thinking Machines’ LoRA analysis (2025). It targeted the attention and MLP projections in every tower, including the CLIP text tower. We merged the final adapter into the released weights, so inference doesn’t require a separate adapter library.

The training run used 19,953 images spanning salient objects, camouflage, high-resolution subjects, hair, and marine scenes. We trained for 14,000 steps with the semantic segmentation objective SAM 3 already uses: focal loss (Lin et al., 2017) plus Dice loss.

For prompt supervision, we used 4,949 images with human-written labels, so 24.8% of the training set named the specific object in each image. This was enough to teach the new matte head to use the text alignment SAM 3 already has.

Results

We report S-measure, which rewards complete subjects and faithful shapes on a scale from 0 to 1, and mean absolute error over opacity values, where lower is better.

Prompt-free S-measure · SAM 3 → MultiMatte

  • SAM 3
  • MultiMatte
  • †No sibling in training mix

Dichotomous (DIS5K)

DIS-VD+0.233
DIS-TE1+0.234
DIS-TE2+0.220
DIS-TE3+0.235
DIS-TE4+0.244

Salient objects

DAVIS-S†+0.066
HRSOD-TE+0.039
UHRSD-TE+0.084
DUTS-TE+0.062
DUT-OMRON†+0.109

Camouflage

COD10K-TE+0.148
CAMO-TE+0.086
0.60.70.80.91.0
Prompt-free S-measure for SAM 3 and MultiMatte on twelve benchmark splits.
SplitSAM 3MultiMatteChange
DIS-VD0.6670.901+0.233
DIS-TE10.6670.901+0.234
DIS-TE20.7030.923+0.220
DIS-TE30.6850.921+0.235
DIS-TE40.6490.893+0.244
DAVIS-S (no sibling in training mix)0.9130.979+0.066
HRSOD-TE0.9300.969+0.039
UHRSD-TE0.8770.961+0.084
DUTS-TE0.8920.954+0.062
DUT-OMRON (no sibling in training mix)0.7920.901+0.109
COD10K-TE0.7870.934+0.148
CAMO-TE0.8270.914+0.086
Higher is better.

MultiMatte improves on SAM 3 in every split. We treat changes below 0.002 S-measure or 0.0005 MAE as measurement noise.

DAVIS-S and DUT-OMRON are the strongest generalization checks because neither has a sibling in the training mix. MultiMatte reaches its highest absolute score on DAVIS-S at 0.979 and lifts DUT-OMRON from 0.792 to 0.901.

Concept names help even without fine-tuning. On DIS-VD, a real concept name adds 0.150 S-measure to SAM 3 with no gradient steps and still adds 0.036 to MultiMatte. The prompt pathway survived the retrain and contributes on its own. CAMO’s named scores use the same annotator’s phrasing style seen during training, so that result measures in-family prompt generalization rather than cross-domain prompting.

Run MultiMatte

MultiMatte is built with NoBg, the same library we used to train FeyNoBg. Install it with pip install nobg:

from nobg import AutoModel, AutoProcessor

model = AutoModel.from_pretrained("feyninc/multimatte")
processor = AutoProcessor.from_pretrained("feyninc/multimatte")

# Uses the model's generic default prompt.
cutout = model.predict(processor, "photo.jpg")
cutout.save("output.png")

# Names the concept to keep.
cutout = model.predict(processor, "photo.jpg", "the dog")

predict returns an RGBA cutout. Pass return_type="tensor" for the raw matte. The adapter is already merged into the released weights for ease of use.

Try MultiMatte on your own images at usefeyn.com/multimatte.

MultiMatte and NoBg are built by Feyn. Find us on X, GitHub, or LinkedIn.

Acknowledgements

MultiMatte is built on Meta’s SAM 3. FlowDIS (Sargsyan and Navasardyan, 2026) supplied the human-written DIS5K phrases used for training and evaluation. Thinking Machines’ LoRA analysis informed the adapter configuration. We are grateful to the dataset authors whose released work made the training mix and evaluation possible.

References
[1] Meta. "SAM 3: Segment Anything with Concepts." arXiv:2511.16719 (2025).
[2] Hu et al. "LoRA: Low-Rank Adaptation of Large Language Models." arXiv:2106.09685 (2021).
[3] Thinking Machines Lab. "LoRA Without Regret" (2025). https://thinkingmachines.ai/blog/lora/
[4] Lin et al. "Focal Loss for Dense Object Detection." arXiv:1708.02002 (2017).
[5] Sargsyan and Navasardyan. "FlowDIS: Language-Guided Dichotomous Image Segmentation with Flow Matching." CVPR 2026. arXiv:2605.05077.
Cite this note
@note{multimatte2026,
  title  = {MultiMatte: Keep What You Want, Cut the Rest},
  author = {Hichri, Hafedh and Nigam, Shreyash and Feyn Research},
  year   = {2026},
  venue  = {Feyn Field Notes}
}
查看原文(Hacker News 熱門)