Skip to content

Commit

Permalink
Update src/transformers/models/vitpose/image_processing_vitpose.py
Browse files Browse the repository at this point in the history
  • Loading branch information
SangbumChoi committed Sep 6, 2024
1 parent 1b513ca commit cbbb966
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/transformers/models/vitpose/image_processing_vitpose.py
Original file line number Diff line number Diff line change
Expand Up @@ -298,9 +298,9 @@ def get_warp_matrix(theta: float, size_input: np.ndarray, size_dst: np.ndarray,

def scipy_warp_affine(src, M, size):
"""
This function implements cv2.warpAffine used in the original implementation using scipy.
This function implements cv2.warpAffine function using affine_transform in scipy. See https://docs.scipy.org/doc/scipy/reference/generated/scipy.ndimage.affine_transform.html and https://docs.opencv.org/4.x/d4/d61/tutorial_warp_affine.html for more details.
Note: the original implementation uses cv2.INTER_LINEAR.
Note: the original implementation of cv2.warpAffine uses cv2.INTER_LINEAR.
"""
channels = [src[..., i] for i in range(src.shape[-1])]

Expand Down

0 comments on commit cbbb966

Please sign in to comment.