A demo combining OSTrack and Segment Anything for VOT and VOS. Still update!!
Option1: Use the Anaconda (CUDA 10.2)
conda create -n ostrack python=3.8
conda activate ostrack
bash install.sh
Option2: Use the Anaconda (CUDA 11.3)
conda env create -f ostrack_cuda113_env.yaml
python -m pip install -e segment_anything
Run the following command to set paths for this project
python tracking/create_default_local_file.py --workspace_dir . --data_dir ./data --save_dir ./output
After running this command, you can also modify paths by editing these two files
lib/train/admin/local.py # paths about training
lib/test/evaluation/local.py # paths about testing
Put the tracking datasets in ./data. It should look like:
${PROJECT_ROOT}
-- data
-- lasot
|-- airplane
|-- basketball
|-- bear
...
-- got10k
|-- test
|-- train
|-- val
-- coco
|-- annotations
|-- images
-- trackingnet
|-- TRAIN_0
|-- TRAIN_1
...
|-- TRAIN_11
|-- TEST
And you can set your own datasets
-
Download the OSTrack model weights from Google Drive
Put the downloaded weights on
$PROJECT_ROOT$/output/checkpoints/train/ostrack
-
Download the checkpoint for segment-anything and grounding-dino:
cd OSTrack_SAM
wget https://dl.fbaipublicfiles.com/segment_anything/sam_vit_h_4b8939.pth
- Run Demo
export CUDA_VISIBLE_DEVICES=0
python tracking_sam_demo.py \
ostrack \
vitb_384_mae_ce_32x4_got10k_ep100 \
--dataset got10k_val \
--threads 4 \
--num_gpus 1 \
--checkpoint sam_vit_h_4b8939.pth \
--sequence (any sequence in datasets)\