fix matches in case of no ground truth

This commit is contained in:
lorenzo 2019-07-01 16:20:00 +02:00
parent 019b6b0fad
commit b0c3f51897
2 changed files with 2 additions and 1 deletions

View File

@ -41,6 +41,7 @@ class TriLinear(nn.Module):
return y
def weight_init(m):
"""TO initialize weights using kaiming initialization"""
if isinstance(m, nn.Linear):

View File

@ -101,7 +101,7 @@ def monoloco_post_process(monoloco_outputs, iou_min=0.25):
boxes_gt, dds_gt = dic_gt['boxes'], dic_gt['dds']
matches = get_iou_matches(boxes, boxes_gt, thresh=iou_min)
else:
matches = [(idx, idx_gt) for idx, idx_gt in range(len(boxes))] # Replicate boxes
matches = [(idx, idx) for idx, _ in enumerate(boxes)] # Replicate boxes
matches = reorder_matches(matches, boxes, mode='left_right')
uv_shoulders = get_keypoints(keypoints, mode='shoulder')