Hi everyone ,
exploring the streamlit API i created a custom component which simplifies adding overlays to images, e.g. displaying a segmentation map.
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.
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
Documentation & Quickstart guide can be found on the projectβs GitHub repository
What are your thoughts on this? Feedback is much appreciated