diff --git a/easymocap/assignment/associate.py b/easymocap/assignment/associate.py index 3dc6940..7321e88 100644 --- a/easymocap/assignment/associate.py +++ b/easymocap/assignment/associate.py @@ -18,7 +18,7 @@ def views_from_dimGroups(dimGroups): def set_keypoints2d(indices, annots, Pall, dimGroups): Vused = np.where(indices!=-1)[0] if len(Vused) < 1: - return [], [], [] + return [], [], [], [] keypoints2d = np.stack([annots[nv][indices[nv]-dimGroups[nv]]['keypoints'].copy() for nv in Vused]) bboxes = np.stack([annots[nv][indices[nv]-dimGroups[nv]]['bbox'].copy() for nv in Vused]) Pused = Pall[Vused] @@ -63,7 +63,7 @@ def simple_associate(annots, affinity, dimGroups, Pall, group, cfg): p = proposal.copy() p[nv] = col proposals_new.append(p) - proposals = proposals_new + proposals += proposals_new results = [] while len(proposals) > 0: proposal = proposals.pop() diff --git a/easymocap/assignment/criterion.py b/easymocap/assignment/criterion.py index 34d3743..88a5fc1 100644 --- a/easymocap/assignment/criterion.py +++ b/easymocap/assignment/criterion.py @@ -46,7 +46,7 @@ class CritLenTorso(BaseCrit): if (keypoints3d[[self.src, self.dst], -1] < self.min_conf).all(): # low confidence, skip return True - length = np.linalg.norm(keypoints3d[self.dst] - keypoints3d[self.src]) + length = np.linalg.norm(keypoints3d[self.dst, :3] - keypoints3d[self.src, :3]) self.log = '{}: {:.3f}'.format(self.name, length) if length < self.min_torso_length or length > self.max_torso_length: return False