Spaces:
Build error
Build error
File size: 462 Bytes
d7a991a |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 |
# Copyright (c) OpenMMLab. All rights reserved.
import numpy as np
from numpy.testing import assert_array_almost_equal
from mmpose.core import compute_similarity_transform
def test_compute_similarity_transform():
source = np.random.rand(14, 3)
tran = np.random.rand(1, 3)
scale = 0.5
target = source * scale + tran
source_transformed = compute_similarity_transform(source, target)
assert_array_almost_equal(source_transformed, target)
|