Download data/dot_single_video/dot/models/shelf/cotracker.py from HiDream-ai/MotionPro: direct link, hf CLI and curl.
- Browser
- Download file 451 Bytes
-
https://huggingface.co/HiDream-ai/MotionPro/resolve/main/data/dot_single_video/dot/models/shelf/cotracker.py
- Command line
-
hf download hf://HiDream-ai/MotionPro/data/dot_single_video/dot/models/shelf/cotracker.py
-
curl -L -o cotracker.py https://huggingface.co/HiDream-ai/MotionPro/resolve/main/data/dot_single_video/dot/models/shelf/cotracker.py
451 Bytes
| from torch import nn | |
| from .cotracker_utils.predictor import CoTrackerPredictor | |
| class CoTracker(nn.Module): | |
| def __init__(self, args): | |
| super().__init__() | |
| self.model = CoTrackerPredictor(args.patch_size, args.wind_size) | |
| def forward(self, video, queries, backward_tracking, cache_features=False): | |
| return self.model(video, queries=queries, backward_tracking=backward_tracking, cache_features=cache_features) | |