Download data/dot_single_video/dot/models/shelf/cotracker2.py from HiDream-ai/MotionPro: direct link, hf CLI and curl.
- Browser
- Download file 457 Bytes
-
https://huggingface.co/HiDream-ai/MotionPro/resolve/main/data/dot_single_video/dot/models/shelf/cotracker2.py
- Command line
-
hf download hf://HiDream-ai/MotionPro/data/dot_single_video/dot/models/shelf/cotracker2.py
-
curl -L -o cotracker2.py https://huggingface.co/HiDream-ai/MotionPro/resolve/main/data/dot_single_video/dot/models/shelf/cotracker2.py
457 Bytes
| from torch import nn | |
| from .cotracker2_utils.predictor import CoTrackerPredictor | |
| class CoTracker2(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) | |