def __init__(self, keypoints, confidence): super().__init__() self.keypoints = keypoints self.confidence = confidence self.bbox = Pose.get_bbox(self.keypoints) self.id = None self.filters = [[OneEuroFilter(), OneEuroFilter()] for _ in range(Pose.num_kpts)]
def __init__(self, keypoints, confidence): super().__init__() self.keypoints = keypoints self.confidence = confidence self.bbox = Pose.get_bbox(self.keypoints) self.id = None self.filters = [[OneEuroFilter(freq=30, mincutoff=1, beta=0.05), \ OneEuroFilter(freq=30, mincutoff=1, beta=0.05)] \ for _ in range(Pose.num_kpts)]
def __init__(self, keypoints, confidence): super().__init__() self.keypoints = keypoints self.confidence = confidence self.bbox = Pose.get_bbox(self.keypoints) self.pose_action = None self.action_fall = None self.action_normal = None self.img_pose = None self.id = None self.filters = [[OneEuroFilter(), OneEuroFilter()] for _ in range(Pose.num_kpts)] self.lowerHalfFlag = lowerHalf(self.keypoints)
def __init__(self, keypoints, confidence): super().__init__() self.keypoints = keypoints self.confidence = confidence found_keypoints = np.zeros((np.count_nonzero(keypoints[:, 0] != -1), 2), dtype=np.int32) found_kpt_id = 0 for kpt_id in range(keypoints.shape[0]): if keypoints[kpt_id, 0] == -1: continue found_keypoints[found_kpt_id] = keypoints[kpt_id] found_kpt_id += 1 self.bbox = cv2.boundingRect(found_keypoints) self.id = None self.translation_filter = [OneEuroFilter(freq=80, beta=0.01), OneEuroFilter(freq=80, beta=0.01), OneEuroFilter(freq=80, beta=0.01)]