cvat/ai-models/tracker/sam2
陈增辉 aced3ee4f0 继承于2.44.3版本 2025-09-16 09:19:40 +08:00
..
README.md 继承于2.44.3版本 2025-09-16 09:19:40 +08:00
func.py 继承于2.44.3版本 2025-09-16 09:19:40 +08:00
requirements.txt 继承于2.44.3版本 2025-09-16 09:19:40 +08:00

README.md

SAM2 tracker

This directory contains an implementation of a CVAT auto-annotation function that tracks masks and polygons using the Segment Anything Model 2 (SAM2) from Meta Research.

To use this with CVAT CLI, use the following options:

--function-file func.py -p model_id=str:<model_id>

where <model_id> is one of the SAM2 model IDs from Meta's Hugging Face account, such as facebook/sam2.1-hiera-tiny or facebook/sam2.1-hiera-large.

In addition, you can add -p device=str:<device> to run the model on a specific PyTorch device, such as cuda. By default, the model will be run on the CPU.

All other parameters set with the -p option will be passed directly to the model constructor.