def init(self, init_frame, initial_bbox): """ Initialize DaSiamRPN tracker with inital frame and bounding box. """ target_pos, target_sz = self.bbox_to_pos(initial_bbox) self.state = SiamRPN_init( init_frame, target_pos, target_sz, self.net)
def __init__(self, frame, bbox, siam_net): width = bbox[1] - bbox[0] height = bbox[3] - bbox[2] target_pos = np.array([(bbox[0] + bbox[1]) / 2.0, (bbox[2] + bbox[3]) / 2.0]) target_size = np.array([width, height]) self._tracker = SiamRPN_init(frame, target_pos, target_size, siam_net)
def __init__(self, frame, obstacle, siam_net): """ Construct a single obstacle tracker. Args: frame: perception.camera_frame.CameraFrame to track in. obstacle: perception.detection.utils.DetectedObstacle. """ self.obstacle = obstacle self.missed_det_updates = 0 center_point = obstacle.bounding_box.get_center_point() target_pos = np.array([center_point.x, center_point.y]) target_size = np.array([ obstacle.bounding_box.get_width(), obstacle.bounding_box.get_height() ]) self._tracker = SiamRPN_init(frame.frame, target_pos, target_size, siam_net)
def __init__(self, frame, obstacle, siam_net): """ Construct a single obstacle tracker. Args: frame (:py:class:`~pylot.perception.camera_frame.CameraFrame`): Frame to reinitialize with. obstacle: perception.detection.obstacle.Obstacle. """ self.obstacle = obstacle self.missed_det_updates = 0 center_point = obstacle.bounding_box_2D.get_center_point() target_pos = np.array([center_point.x, center_point.y]) target_size = np.array([ obstacle.bounding_box_2D.get_width(), obstacle.bounding_box_2D.get_height() ]) self._tracker = SiamRPN_init(frame.frame, target_pos, target_size, siam_net)