facebookresearch / sam2

The repository provides code for running inference with the Meta Segment Anything Model 2 (SAM 2), links for downloading the trained model checkpoints, and example notebooks that show how to use the model.
Apache License 2.0
12.76k stars 1.2k forks source link

Automated Video Segmentation with SAM-2 #273

Open wenyi-li opened 3 months ago

wenyi-li commented 3 months ago

Description:

I'm interested in using SAM-2 to automatically process a large number of videos to obtain segmentation results. Given the scale of the dataset, manually clicking to segment each video is not feasible.

Question:

Is there a way to automate the video processing in SAM-2, leveraging its capabilities for batch segmentation without requiring manual interaction for each video?

Additional Information:

Number of videos: 100, indoor scene, 25 frames for each Desired output: Masks for all indoor objects (e.g., tables, chairs, etc.)

Looking forward to any guidance or suggestions on how to accomplish this.

admineral commented 3 months ago

https://github.com/IDEA-Research/Grounded-SAM-2?tab=readme-ov-file#grounded-sam-2-video-object-tracking-demo

zrporz commented 2 months ago

https://github.com/zrporz/AutoSeg-SAM2 We provide an implementation script for automatic segmentation that finds and tracks new objects by detecting the iou of the current unsegmented part with a static mask, feel free to use it!