luca-medeiros / lang-segment-anything

SAM with text prompt
Apache License 2.0
1.53k stars 167 forks source link

Wrote a script to generate videos with segmentation #31

Open heemalsic opened 1 year ago

heemalsic commented 1 year ago

🚀 Feature

Generating a video

Motivation & Examples

I wanted to generate videos out of the set of output frames and wrote a script for the same. It works for me and wanted to contribute it to the repo.

Note

We only consider adding new features if they are relevant to this library. Consider if this new feature deserves to be here or should be a new library.

luca-medeiros commented 1 year ago

That sounds really cool @heemalsic ! Mind sharing how that would fit with lang-sam? How would users use this feature?

heemalsic commented 1 year ago

Sorry I don't exactly get what you mean by 'fit with lang-sam'. But it it utilizes the following functions/classes from lang-sam for it to work- from lang_sam import LangSAM from lang_sam.utils import draw_image

Regarding its use, for instance if someone wants to study how sam segments data in real time traffic, so they can extract frames from their video data and feed the containing folder to the script which will output a corresponding video with segmentation masks and bounding boxes exclusive to the text prompt given by the user.