// image · facebookresearch/sam2

SAM 2

SAM 2 — проект с открытым исходным кодом из категории «Изображения» от facebookresearch (facebookresearch/sam2 на GitHub). У него 20 061 звезда на GitHub и 2 581 форк, он распространяется по лицензии Apache-2.0 и последний раз обновлялся на GitHub 30 мая 2026.

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

★ 20,1 тыс. звёзд⑂ 2,6 тыс. форковApache-2.0обновлено май 2026
▦ визуал — в README этого проекта нет встраиваемого скриншота,
поэтому здесь заглушка. Руководство ниже в любом случае полное.
// факты о проекте

Факты о проекте

Репозиторий
facebookresearch/sam2
Звёзды GitHub
20 061
Форки
2 581
Лицензия
Apache-2.0
Последнее обновление на GitHub
30 мая 2026
Категория
Изображения
Тип страницы
Полное руководство по установке
// как это работает

Как это работает

  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.

// возможности

Почему его любят

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
// запустите сами

Запустите сами

  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
// сценарии использования

Что можно создать

Advertisement
// вопросы и ответы

Вопросы и ответы

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.

// продолжить изучение

Похожие инструменты

Изображения

Interactive-Image-Background-Remover

Point-and-click AI background removal with Segment Anything and BiRefNet

★ 59 звёздCustom
Смотреть руководство →
Изображения

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 тыс. звёздBSD-3-Clause
Смотреть руководство →
Изображения

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 тыс. звёздMIT
Смотреть руководство →
Изображения

UpscalerJS

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

★ 901 звездаMIT
Смотреть руководство →
Изображения

Ultimate-AI-Media-Generator-Skill

Open-source skill that turns coding agents into AI image and video creators

★ 92 звездыMIT
Смотреть руководство →
Изображения

MuseUI

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

★ 56 звёздMIT
Смотреть руководство →
// альтернативы

Альтернативы: Изображения

Другие проекты из категории «Изображения» с наибольшим числом звёзд в каталоге LibreAI — реалистичный список альтернатив, если SAM 2 вам не подходит.

// ещё в категории image

Больше проектов: Изображения

Соседние проекты из категории «Изображения» в каталоге, ближайшие по числу звёзд к SAM 2 — продолжайте изучать полку по обе стороны от него.

Получить SAM 2

Бесплатно и открыто — забирайте исходный код, ставьте звезду репозиторию и начинайте создавать.