yangchris11 / samurai

Official repository of "SAMURAI: Adapting Segment Anything Model for Zero-Shot Visual Tracking with Motion-Aware Memory"
https://yangchris11.github.io/samurai/
Apache License 2.0
5.19k stars 287 forks source link

Add a Hugging Face Spaces Demo for SAMURAI #6

Open Itayflymingo opened 1 week ago

Itayflymingo commented 1 week ago

This repository provides an excellent implementation of SAMURAI: Adapting Segment Anything Model for Zero-Shot Visual Tracking with Motion-Aware Memory. To make the model more accessible and user-friendly, we propose creating an interactive demo on Hugging Face Spaces.

The demo should allow users to upload their custom videos or image sequences, provide a bounding box for the first frame, and visualize the tracking results. This interactive experience will greatly enhance the visibility and usability of SAMURAI for researchers and practitioners.

Requirements for the Demo:

Frontend:

A simple interface with file upload options for videos or frame directories. A text box to input the bounding box of the first frame in xywh format. Backend:

Use the existing SAMURAI scripts for inference (demo.py). Automatically process the uploaded files and return the tracking results (e.g., video or annotated frames). Environment Setup:

Use Gradio or similar frameworks supported by Hugging Face Spaces. Ensure the required dependencies (torch, torchvision, opencv-python, etc.) are installed. Output:

Display the tracking results in the web interface (e.g., overlay bounding boxes on the video). Option to download the processed output. References:

SAMURAI Repository SAM 2 Repository Hugging Face Spaces Documentation Tasks:

Set up a Hugging Face Space and deploy the demo using the SAMURAI implementation. Test the demo with custom videos and frames to ensure reliability. Document the setup and usage of the demo in the repository's README. Expected Outcome: An interactive demo hosted on Hugging Face Spaces that enables users to experiment with SAMURAI for zero-shot visual tracking effortlessly.

MarsX-2002 commented 4 days ago

is this request still open for contribution?

ashwath007 commented 4 days ago

@MarsX-2002 yes i guess

Itayflymingo commented 4 days ago

go for it @MarsX-2002