Skip to content

Commit

Permalink
fix empty person results (#569)
Browse files Browse the repository at this point in the history
  • Loading branch information
jin-s13 authored Apr 13, 2021
1 parent dc7adc2 commit 0274ecf
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
Expand Up @@ -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])

Expand Down

0 comments on commit 0274ecf

Please sign in to comment.