Skip to content

Commit

Permalink
fix udp_combined decode bug (open-mmlab#1565)
Browse files Browse the repository at this point in the history
  • Loading branch information
liqikai9 authored and evendrow committed Dec 22, 2022
1 parent dbfa68b commit 44f5eb9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion mmpose/core/evaluation/top_down_eval.py
Original file line number Diff line number Diff line change
Expand Up @@ -579,7 +579,7 @@ def keypoints_from_heatmaps(heatmaps,
offset_y = heatmaps[:, 2::3, :].flatten() * valid_radius
heatmaps = heatmaps[:, ::3, :]
preds, maxvals = _get_max_preds(heatmaps)
index = preds[..., 0] + preds[..., 1] * W
index = (preds[..., 0] + preds[..., 1] * W).flatten()
index += W * H * np.arange(0, N * K / 3)
index = index.astype(int).reshape(N, K // 3, 1)
preds += np.concatenate((offset_x[index], offset_y[index]), axis=2)
Expand Down

0 comments on commit 44f5eb9

Please sign in to comment.