Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix assertion #142

Merged
merged 2 commits into from Sep 22, 2020
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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] == 2 or coords.shape[1] == 4 or coords.shape[1] == 5
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

coords.shape[1] in (2, 4, 5)

assert len(center) == 2
assert len(scale) == 2
assert len(output_size) == 2
Expand Down