Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 8 additions & 3 deletions deeplabcut/pose_estimation_pytorch/runners/train.py
Original file line number Diff line number Diff line change
Expand Up @@ -418,10 +418,15 @@ def _update_epoch_predictions(
for batch_id in range(len(ground_truth)):
# keypoints (num_kpts, 3)
keypoints = ground_truth[batch_id]
for kpts in keypoints:
vis = kpts[-1]
if name == 'unique_bodyparts':
vis = keypoints[-1]
if vis < 0:
kpts[-1] = 0
keypoints[-1] = 0
else:
for kpts in keypoints:
vis = kpts[-1]
if vis < 0:
kpts[-1] = 0

# rescale to the full image for TD or CTD
gt_with_vis[..., :2] = (gt_with_vis[..., :2] * scale) + offset
Expand Down