New Component: Streamlit-Overlay πŸ–ΌοΈπŸ–ŒοΈ

Hi everyone :wave:,

exploring the streamlit API i created a custom component which simplifies adding overlays to images, e.g. displaying a segmentation map.

:rocket: The feature, motivation and pitch

With the release of SAM2 it would be nice to quickly rebuild an interface similar to their demo which allows uploading a video, clicking onto a frame and displaying segmentation mask based on the prompt.

Thus, streamlit-overlay provides a customizable component which takes an array of images and masks (numpy / pillow) as argument and displays them in a video player similar to the SAM2 demo.

streamlit-overlay-small

For the prompts, it currently does track mouse clicks but i am not sure what the best design decision for (how & when) returning them would be. Just returning the coordinates on every click compromises UI experience as it triggers a re-render of the component which does have a noticable latency. Open to suggestions :pray:

Documentation & Quickstart guide can be found on the project’s GitHub repository

What are your thoughts on this? Feedback is much appreciated :slight_smile:

9 Likes

Cool idea
Would be nice to test :upside_down_face:

1 Like

Very nice component!

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