Skip to content

Commit

Permalink
fix assertion (open-mmlab#142)
Browse files Browse the repository at this point in the history
Co-authored-by: lizz <innerlee@users.noreply.github.com>
  • Loading branch information
jin-s13 and innerlee committed Sep 22, 2020
1 parent b450b16 commit ee750f4
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion mmpose/core/post_processing/post_transforms.py
Expand Up @@ -95,6 +95,7 @@ def transform_preds(coords, center, scale, output_size):
Args:
coords (np.ndarray[K, ndims]):
if ndims=2, corrds are predicted keypoint location.
if ndims=4, corrds are composed of (x, y, tags, scores)
if ndims=5, corrds are composed of (x, y, tags,
flipped_tags, scores)
center (np.ndarray[2, ]): Center of the bounding box (x, y).
Expand All @@ -105,7 +106,7 @@ def transform_preds(coords, center, scale, output_size):
Returns:
np.ndarray: Predicted coordinates in the images.
"""
assert coords.shape[1] == 2 or coords.shape[1] == 5
assert coords.shape[1] in (2, 4, 5)
assert len(center) == 2
assert len(scale) == 2
assert len(output_size) == 2
Expand Down

0 comments on commit ee750f4

Please sign in to comment.