Skip to main content
The CoTracker class implements a wrapper for the CoTracker model, which tracks points in video frames in an online manner (without having to look at the entire video).
torch.Tensor
required
The queries to track points in the video.
boolean
default:true
Whether to save the results. Defaults to False.
boolean
default:"True"
If True, inference call is run on the local VM, else offloaded onto GRID-Cortex. Defaults to True.
This model is currently not available via Cortex.
Process a single video frame and updates tracking information.This method appends the given frame to the window of frames and processes the frames at intervals defined by the CoTracker model’s step size. If the current frame count is a multiple of the step size, it updates the predicted tracks and visibility.
np.ndarray
required
Processes input video and tracks points.
Tuple[Optional[torch.Tensor], Optional[torch.Tensor]]
A tuple containing the predicted tracks and visibility tensors. If the frame count is not a multiple of the step size, both values will be None.
Finalize processing of remaining frames and return the final predicted tracks and visibility.If there are any remaining frames that haven’t been processed in the window, they will be processed during this call. The results will be logged and optionally saved
Tuple[Optional[torch.Tensor], Optional[torch.Tensor]]
Final predicted tracks and visibility.
This code is licensed under the CC-BY-NC 4.0 License.