SAM2Matting: Generalized Image and Video Matting

Upload an image and SAM2Matting will produce a high-quality alpha matte with fine detail (hair, fur, translucent edges). Optionally provide a rough foreground mask; if you don't, one is auto-generated for you via Inspyrenet-Rembg.

Paper | GitHub | Model

Background Color for Composite
Examples

Tips

  • The mask should roughly cover the foreground object (white = foreground).
  • Grayscale masks work best — softer edges give the model a hint about uncertainty.
  • Try different background colors to inspect cut-out quality.
  • Uses SAM2.1-Tiny backbone (smallest/fastest variant).

License

CC-BY-NC-SA-4.0 (non-commercial research use only).