DEDUPED Hot AI repos. Real use cases. What people build. Get the Monday 5

How to use Sam2: what you can do with it

What is Sam2? SAM 2 is Meta FAIR's Segment Anything Model 2, a foundation model for promptable visual segmentation in images and videos. You give it points or boxes and it returns masks, and in video it tracks objects across frames as masklets. The repo includes SAM 2.1 checkpoints, image and video predictors, Hugging Face loading, training code and a web demo.

How do I use it? Run git clone https://github.com/facebookresearch/sam2.git && cd sam2 then pip install -e; then download checkpoints with ./download_ckpts.sh inside the checkpoints folder; build a SAM2ImagePredictor from configs/sam2.1/sam2.1_hiera_l.yaml and ./checkpoints/sam2.1_hiera_large.pt. Full steps below.

Trended earlier

View repo on GitHub

Third-party repos we don't own. AI-written use cases can be wrong. Disclaimer

3 use cases

Quick start with Sam2

  1. Check you have what it needs: Python 3.10 or newer with torch 2.5.1 and torchvision 0.20.1 or newer; An NVIDIA GPU with CUDA is recommended; Windows users should use WSL with Ubuntu; A model checkpoint from the download script or Hugging Face.
  2. Open facebookresearch/sam2 on GitHub and read the README and license.
  3. Run git clone https://github.com/facebookresearch/sam2.git && cd sam2 then pip install -e .
  4. Download checkpoints with ./download_ckpts.sh inside the checkpoints folder
  5. Build a SAM2ImagePredictor from configs/sam2.1/sam2.1_hiera_l.yaml and ./checkpoints/sam2.1_hiera_large.pt
  6. Call predictor.set_image with your image and predictor.predict with your prompts

These steps come from our top use case, Segment an object in an image from a click, which also has a copy-paste agent prompt.

Use this in your AI agent

Ask your agent

Using the Deduped MCP, get the setup steps for facebookresearch/sam2

Add Deduped to Claude Code once

claude mcp add --transport http deduped https://dedupedai.com/mcp

Cursor, ChatGPT, others

Best AI repos for Research

About this repo

  • Who it is forResearchers, video editors and vision engineers who need accurate object masks without training a model.
  • Why it is hot20k stars, talked about in 2 AI sources we track
  • LanguageJupyter Notebook
  • Sourcegithub.com/facebookresearch/sam2 ยท Back to Hot repos

Requirements

  • Python 3.10 or newer with torch 2.5.1 and torchvision 0.20.1 or newer
  • An NVIDIA GPU with CUDA is recommended; Windows users should use WSL with Ubuntu
  • A model checkpoint from the download script or Hugging Face

Add this badge to your README

Maintain Sam2? Show readers where to find these use cases. Use cases on Deduped

Markdown

[![Use cases on Deduped](https://dedupedai.com/badge/facebookresearch/sam2.svg)](https://dedupedai.com/use-cases/facebookresearch-sam2/?utm_source=github&utm_medium=badge&utm_campaign=facebookresearch-sam2)

HTML

<a href="https://dedupedai.com/use-cases/facebookresearch-sam2/?utm_source=github&amp;utm_medium=badge&amp;utm_campaign=facebookresearch-sam2"><img src="https://dedupedai.com/badge/facebookresearch/sam2.svg" alt="Use cases on Deduped" height="20"></a>

A static image, no tracking script. About the badge

Questions about Sam2

What is Sam2?

SAM 2 is Meta FAIR's Segment Anything Model 2, a foundation model for promptable visual segmentation in images and videos. You give it points or boxes and it returns masks, and in video it tracks objects across frames as masklets. The repo includes SAM 2.1 checkpoints, image and video predictors, Hugging Face loading, training code and a web demo. It is an open-source project on GitHub: https://github.com/facebookresearch/sam2.

How do I use Sam2?

Run git clone https://github.com/facebookresearch/sam2.git && cd sam2 then pip install -e; then download checkpoints with ./download_ckpts.sh inside the checkpoints folder; build a SAM2ImagePredictor from configs/sam2.1/sam2.1_hiera_l.yaml and ./checkpoints/sam2.1_hiera_large.pt. The use cases on this page give the full steps and a copy-paste agent prompt for each job.

Who is Sam2 for?

Researchers, video editors and vision engineers who need accurate object masks without training a model.

What can I do with Sam2?

3 use cases so far, for example: Segment an object in an image from a click; Track an object through a video; Load SAM 2 from Hugging Face without the checkpoint script. Each has steps and a copy-paste agent prompt.

What do I need to run Sam2?

Python 3.10 or newer with torch 2.5.1 and torchvision 0.20.1 or newer; An NVIDIA GPU with CUDA is recommended; Windows users should use WSL with Ubuntu; A model checkpoint from the download script or Hugging Face.

What are alternatives to Sam2?

Other hot AI repos in Research: Docling, LightRAG, Ragflow, Markitdown, MinerU.

Is Sam2 safe to run?

Deduped does not own, audit or vouch for it. Read the README and license, run it on your own systems first and review every command before you run it.