From 23e31d54c9b31058c73929f231693d962082767e Mon Sep 17 00:00:00 2001 From: Hsiang Wei Huang <93310655+hsiangwei0903@users.noreply.github.com> Date: Thu, 21 Nov 2024 20:46:19 -0800 Subject: [PATCH] Update demo instruction --- README.md | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/README.md b/README.md index 96f1639..fcc90c5 100644 --- a/README.md +++ b/README.md @@ -73,6 +73,27 @@ data/LaSOT python scripts/main_inference.py ``` +#### Custom Video Demo + +To run the demo with your custom video or frame directory, use the following examples: + +**Note:** The `.txt` file contains a single line with the bounding box of the first frame in `xywh` format. + +Replace `` with the path to your `.txt` file and `` with your video file path, or replace it with the directory path if you want to process frames from a folder. + +### Input is Video File +If your input is a video file, run the following command: + +``` +python scripts/demo.py --video_path --txt_path +``` + +### Input is Frame Folder +If your input is a directory of frames, run the following command: +``` +python scripts/demo.py --video_path / --txt_path +``` + ## Acknowledgment SAMURAI is built on top of [SAM 2](https://github.com/facebookresearch/sam2?tab=readme-ov-file) by Meta FAIR.