Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Real-Time Inference #16

Open
Henistein opened this issue Aug 13, 2024 · 5 comments
Open

Real-Time Inference #16

Henistein opened this issue Aug 13, 2024 · 5 comments

Comments

@Henistein
Copy link

I noticed that in all demo scripts the video is first processed in whole and then propagated, would it be possible to run a video in real-time?

Thank you in advance!

@rentainhe
Copy link
Collaborator

Thanks for you issue, I think you can try to use smaller SAM 2 model for faster inference, and maybe you can refer to SAM 2's official repo to see if there're some acceleration methods on this issue

@Henistein
Copy link
Author

@rentainhe sorry, maybe I expressed myself badly, what I meant was if would be possible to run grounded sam2 end to end, like in a stream. Imagine I have a real time video stream and I wanted to segment it live while keeping the track of each object, would it be possible?

@rentainhe
Copy link
Collaborator

I think SAM 2 now only supports non-stream video input. I have no idea how to support streaming input at this time. Maybe we can refer to the community to see if there are some solutions for this issue.

@patrick-tssn
Copy link

@Henistein, I hope my implementation will be helpful, though these is latency.
https://github.com/patrick-tssn/Streaming-Grounded-SAM-2

@Masrur02
Copy link

Hi, @Henistein
Can your code take prompts like the grounded sam2? I mean I want to track road amd cars in a video with continuous id? Is it possible by your implementation??

TIA

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants