Skip to content

Latest commit

 

History

History

README.md

SAM2: Segment Anything in Images and Videos

Introduction

This is an implementation of SAM2 model (original repository by Meta).

Running The Example

  1. Install prerequisites:

    python3 -m pip install -r requirements.txt --extra-index-url https://download.pytorch.org/whl
  2. Retrieve the images and the checkpoint:

    python3 download_test_data.py
    sh checkpoints/download_ckpt.sh

Image pipeline

  1. Run the example:

    python3 image_demo.py

Video segmentation pipeline

  1. Run the example:

    python3 video_demo.py

License

The SAM2 model checkpoints and associated model code are sourced from Meta's SAM2 repository and are licensed under the Apache 2.0 license (included as LICENSE_sam2 in our sample).