Skip to content

Commit

Permalink
Fix end padding
Browse files Browse the repository at this point in the history
  • Loading branch information
bhky committed May 7, 2022
1 parent 901b843 commit e132dd2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions hgd/video.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,8 +102,8 @@ def video_to_landmarks(
landmarks = landmarks[-max_num_frames:]

if max_num_frames and end_padding and len(landmarks) < max_num_frames:
zeros = [0.0] * 12
landmarks = landmarks + [zeros] * (max_num_frames - len(landmarks))
last = landmarks[-1]
landmarks = landmarks + [last] * (max_num_frames - len(landmarks))

cap.release()
cv2.destroyAllWindows() # pylint: disable=no-member
Expand Down

0 comments on commit e132dd2

Please sign in to comment.