# Using SAM 2 for Video Segmentation via Inference Package

**URL:** <https://discuss.roboflow.com/t/using-sam-2-for-video-segmentation-via-inference-package/10713>\
**Category:** 🤝  Community Help\
**Tags:** segmentation\
**Created:** [July 28, 2025, 11:32am UTC](https://discuss.roboflow.com/t/using-sam-2-for-video-segmentation-via-inference-package/10713 "2025-07-28T11:32:35Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Dikshant\_Shah](https://yyz1.discourse-cdn.com/flex029/user_avatar/discuss.roboflow.com/dikshant_shah/32/6310_2.png) [@Dikshant\_Shah](https://discuss.roboflow.com/u/Dikshant_Shah)\
**Post date:** [July 28, 2025, 11:32am UTC](https://discuss.roboflow.com/t/using-sam-2-for-video-segmentation-via-inference-package/10713/1 "2025-07-28T11:32:35Z")

</div>

I’m trying to figure out how to use SAM 2 to segment a video using an image mask through the `inference.models.sam2` package. I know there’s a function called `propagate_in_video` available when using the SAM 2 model downloading directly from source, but I’m looking for a similar feature when running SAM 2 via the inference package. I’ve reviewed the documentation here: [segment\_anything2.py](https://github.com/roboflow/inference/blob/main/inference/models/sam2/segment_anything2.py) and here: [Roboflow Inference SAM 2 guide](https://inference.roboflow.com/foundation/sam2/#how-to-use-segment-anything), but I haven’t found any instructions on performing video segmentation. Any guidance would be appreciated.

---

<div class="post-metadata">

**Author:** ![Ford](https://yyz1.discourse-cdn.com/flex029/user_avatar/discuss.roboflow.com/ford/32/7747_2.png) [@Ford](https://discuss.roboflow.com/u/Ford)\
**Post date:** [July 28, 2025, 9:20pm UTC](https://discuss.roboflow.com/t/using-sam-2-for-video-segmentation-via-inference-package/10713/2 "2025-07-28T21:20:44Z")

</div>

Hi @Dikshant_Shah!  
Unfortunately, at this time, you’re right that inference sdk doesn’t support video segmentation with SAM 2.

Apologies for the inconvenience!

---

<div class="post-metadata">

**Author:** ![Dikshant\_Shah](https://yyz1.discourse-cdn.com/flex029/user_avatar/discuss.roboflow.com/dikshant_shah/32/6310_2.png) [@Dikshant\_Shah](https://discuss.roboflow.com/u/Dikshant_Shah)\
**Post date:** [July 28, 2025, 11:10pm UTC](https://discuss.roboflow.com/t/using-sam-2-for-video-segmentation-via-inference-package/10713/3 "2025-07-28T23:10:52Z")

</div>

No worries at all. But does Roboflow workflows support video input for SAM 2 blocks?

---

<div class="post-metadata">

**Author:** ![Ford](https://yyz1.discourse-cdn.com/flex029/user_avatar/discuss.roboflow.com/ford/32/7747_2.png) [@Ford](https://discuss.roboflow.com/u/Ford)\
**Post date:** [July 29, 2025, 3:40pm UTC](https://discuss.roboflow.com/t/using-sam-2-for-video-segmentation-via-inference-package/10713/4 "2025-07-29T15:40:39Z")

</div>

Hi @Dikshant_Shah!  
Unfortunately not at this moment. I cannot provide a timeline, but this is on the team’s radar.

---

<div class="post-metadata">

**Author:** ![Grzegorz](https://yyz1.discourse-cdn.com/flex029/user_avatar/discuss.roboflow.com/grzegorz/32/2877_2.png) [@Grzegorz](https://discuss.roboflow.com/u/Grzegorz)\
**Post date:** [July 31, 2025, 2:24pm UTC](https://discuss.roboflow.com/t/using-sam-2-for-video-segmentation-via-inference-package/10713/5 "2025-07-31T14:24:19Z")

</div>

Hi @Dikshant_Shah ,

Please keep an eye on `inference-exp`, we are currently working to add SAM2 support with video into it. Bare in mind this work is in experimental stage, so anything may change.

Thanks!

Grzegorz

---

<div class="post-metadata">

**Author:** ![Dikshant\_Shah](https://yyz1.discourse-cdn.com/flex029/user_avatar/discuss.roboflow.com/dikshant_shah/32/6310_2.png) [@Dikshant\_Shah](https://discuss.roboflow.com/u/Dikshant_Shah)\
**Post date:** [July 31, 2025, 9:31pm UTC](https://discuss.roboflow.com/t/using-sam-2-for-video-segmentation-via-inference-package/10713/6 "2025-07-31T21:31:43Z")

</div>

Got it thanks.

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex029/uploads/roboflow1/original/1X/bb6edbfa56d0cf2ee603f061e9e09103502cc8cc.png) [@system](https://discuss.roboflow.com/u/system)\
**Post date:** [August 7, 2025, 9:31pm UTC](https://discuss.roboflow.com/t/using-sam-2-for-video-segmentation-via-inference-package/10713/7 "2025-08-07T21:31:56Z")

</div>

Closed on August 7, 2025, 9:31pm UTC

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.
