Repository for SAM 2: Segment Anything in Images and Videos, a foundation model towards solving promptable visual segmentation in images and videos from FAIR. See the SAM 2 paper for more information. The official code is publicly release in this repo. Usage For image prediction: For video prediction: Refer to the demo notebooks for more details. Usage with 🤗 Transformers Automatic Mask Generation with Pipeline SAM2 can be used for automatic mask generation to segment all objects in an image using the mask generation pipeline: Basic Image Segmentation Single Point Click You can segment objects by providing a single point click on the object you want to segment: Multiple Points for Refinement You can provide multiple points to refine the segmentation: Bounding Box Input SAM2 also supports bounding box inputs for segmentation: Multiple Objects Segmentation You can segment multiple objects simultaneously: Batch Inference Batched Images Process multiple images simultaneously for improved efficiency: Batched Objects per Image Segment multiple objects within each image using batch inference: Batched Images with Batched Objects and Multiple Points Handle complex batch scenarios with mult…
We use cookies for essential functionality and analytics. You can accept or reject analytics cookies.Cookie policy