Use MASA with custom trained detection/segmentation model.
Please refer to INSTALL.md
from main import TrackerMASA
masa_tracker = TrackerMASA()
# replace placeholders with your own paths
video_root = "path/to/your/video.mp4"
video_sink = "path/to/out_video.mp4"
weights = "best.pt"
masa_config = "masa/configs/masa-one/masa_r50_plug_and_play.py"
masa_checkpoint = "masa/saved_models/masa_models/masa_r50.pth"
masa_tracker.run_masa_tracking(video_root, video_sink, weights, masa_config, masa_checkpoint)
@article{masa,
author = {Li, Siyuan and Ke, Lei and Danelljan, Martin and Piccinelli, Luigi and Segu, Mattia and Van Gool, Luc and Yu, Fisher},
title = {Matching Anything By Segmenting Anything},
journal = {CVPR},
year = {2024},
}