"""Base classes for trackers.""" class BaseTracker: """Base class for all trackers.""" def __init__(self, params): """Initialize the tracker. args: params: Tracker parameters. """ self.params = params def initialize(self, image, state): """Initialize the tracker with an image and target state. args: image: First frame state: Target state in first frame, usually a bounding box [x, y, w, h] """ raise NotImplementedError def track(self, image): """Track in the current frame. args: image: Current image returns: State of the target, usually a bounding box [x, y, w, h] """ raise NotImplementedError