LibreAI / Bild / SAM 2
// image · facebookresearch/sam2

SAM 2

SAM 2 ist ein Open-Source-Projekt aus der Kategorie Bild von facebookresearch (facebookresearch/sam2 auf GitHub). Es hat 20.061 Sterne auf GitHub und 2.581 Forks, wird unter der Lizenz Apache-2.0 veröffentlicht und wurde zuletzt am 30. Mai 2026 auf GitHub aktualisiert.

SAM 2 — Meta's Segment Anything Model 2: promptable segmentation for images and video, Apache-2.0

★ 20,1 Tsd. Sterne⑂ 2,6 Tsd. ForksApache-2.0aktualisiert Mai 2026
▦ Visual — das README dieses Projekts enthält keinen einbettbaren Screenshot,
darum hier ein Platzhalter. Die Anleitung unten ist trotzdem vollständig.
// projektdaten

Projektdaten

GitHub-Sterne
20.061
Forks
2.581
Lizenz
Apache-2.0
Zuletzt auf GitHub aktualisiert
30. Mai 2026
Kategorie
Bild
Eintragstyp
Vollständige Installationsanleitung
// so funktioniert es

So funktioniert es

  1. Install PyTorch and TorchVision first

    SAM 2 needs Python 3.10+, torch 2.5.1+ and torchvision 0.20.1+ — install those from the PyTorch site before anything else.

  2. Clone and install SAM 2

    Clone the repo and install it in editable mode; add the notebooks extra for the example notebooks.

  3. Download checkpoints and segment

    Download a SAM 2 checkpoint, then run image or video prediction with the predictor from the example notebooks.

// funktionen

Warum es so beliebt ist

Promptable segmentation

Point, box or mask prompts select exactly the object you mean — no training on your subject required.

Images and video

The step beyond SAM 1: the same model tracks a segmented object across video frames.

Example notebooks included

Image prediction and video prediction notebooks show the full workflow, with jupyter and matplotlib as the only extras.

A foundation for editing tools

Segmentation masks feed background removal, object cut-out, inpainting and video effects pipelines.

Advertisement
// selbst ausführen

Führe es selbst aus

  1. Install

    The README install route: clone, then editable install.

    git clone https://github.com/facebookresearch/sam2.git && cd sam2
    pip install -e .
  2. Add the notebooks

    Required for the example notebooks (jupyter and matplotlib).

    pip install -e ".[notebooks]"
  3. Download checkpoints

    Checkpoints are separate from the code — download them per the README Getting Started section, then run image or video prediction.

    https://github.com/facebookresearch/sam2#getting-started
// anwendungsfälle

Was du damit bauen kannst

Advertisement
// häufige fragen

Häufige Fragen

Who makes SAM 2?

Meta's Facebook Research team, as the successor to the Segment Anything Model.

Is SAM 2 free?

Yes — Apache-2.0 licensed code; checkpoints carry their own licence terms.

How is SAM 2 different from SAM 1?

SAM 2 adds video: it segments and tracks objects across frames, where SAM 1 handled single images.

Do I need a GPU?

For practical use, yes — the install compiles a custom CUDA kernel, and the README recommends a GPU machine (WSL on Windows).

How do I get started?

Install PyTorch 2.5.1+ and TorchVision, clone and pip install -e ., download a checkpoint, and follow the image or video prediction notebooks.

// weiter entdecken

Ähnliche Tools

Bild

Real-ESRGAN

Real-ESRGAN — practical blind super-resolution for real-world photos and video: restores and upscales degraded images with models trained on pure synthetic data, BSD-3-Clause

★ 37,1 Tsd. SterneBSD-3-Clause
Anleitung ansehen →
Bild

backgroundremover

Background Remover lets you Remove Background from images and video using AI with a simple command line interface that is free and open source.

★ 8,1 Tsd. SterneMIT
Anleitung ansehen →
Bild

UpscalerJS

Enhance images in JavaScript — upscale, denoise, deblur and dehaze with AI

★ 901 SterneMIT
Anleitung ansehen →
Bild

MuseUI

Browser-only AI interface for UI mockups, covers, logos and social images

★ 56 SterneMIT
Anleitung ansehen →
// alternativen

Alternativen im Bereich Bild

Die anderen Projekte der Kategorie Bild mit den meisten Sternen im LibreAI-Katalog — die realistische Auswahl, falls SAM 2 nicht das Richtige ist.

// mehr in image

Mehr in Bild

Verwandte Projekte der Kategorie Bild im Katalog, die SAM 2 bei den Sternen am nächsten stehen — zum Weiterstöbern auf beiden Seiten.

Hol dir SAM 2

Kostenlos und offen — hol dir den Quellcode, gib dem Repository einen Stern und leg los.