three bugs from issue#99

This commit is contained in:
保俊杉(Sanders Bao) 2021-11-10 11:16:28 +08:00
parent e7bcf6b3ed
commit 09b16b34ea
2 changed files with 3 additions and 3 deletions

View File

@ -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()

View File

@ -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