Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix empty person results
Browse files Browse the repository at this point in the history
jin-s13 committed Apr 13, 2021

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
1 parent dc7adc2 commit d72c557
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions mmpose/apis/inference.py
Original file line number Diff line number Diff line change
@@ -362,6 +362,9 @@ def inference_top_down_pose_model(model,
pose_results = []
returned_outputs = []

if len(person_results) == 0:
return pose_results, returned_outputs

# Change for-loop preprocess each bbox to preprocess all bboxes at once.
bboxes = np.array([box['bbox'] for box in person_results])

0 comments on commit d72c557

Please sign in to comment.