Loading test/pose/test_dwpose.py +6 −2 Original line number Diff line number Diff line Loading @@ -29,8 +29,12 @@ class TestPoseDwpose: assert len(poses) == 2 assert isinstance(poses[0], OP18KeyPointSet) assert isinstance(poses[1], OP18KeyPointSet) assert np.isclose(pose_data_2girls_0, poses[0].all, atol=1).all() assert np.isclose(pose_data_2girls_1, poses[1].all, atol=1).all() c0 = np.isclose(pose_data_2girls_0, poses[0].all, atol=1) assert c0.all(), f'{c0.mean() * 100:.2f}% of the values are the same, ' \ f'max diff is {(pose_data_2girls_0 - poses[0].all).max():.4f}.' c1 = np.isclose(pose_data_2girls_1, poses[1].all, atol=1) assert c1.all(), f'{c1.mean() * 100:.2f}% of the values are the same, ' \ f'max diff is {(pose_data_2girls_1 - poses[1].all).max():.4f}.' def test_dwpose_estimate_nothing(self, img_file_gun): poses = dwpose_estimate(img_file_gun) Loading Loading
test/pose/test_dwpose.py +6 −2 Original line number Diff line number Diff line Loading @@ -29,8 +29,12 @@ class TestPoseDwpose: assert len(poses) == 2 assert isinstance(poses[0], OP18KeyPointSet) assert isinstance(poses[1], OP18KeyPointSet) assert np.isclose(pose_data_2girls_0, poses[0].all, atol=1).all() assert np.isclose(pose_data_2girls_1, poses[1].all, atol=1).all() c0 = np.isclose(pose_data_2girls_0, poses[0].all, atol=1) assert c0.all(), f'{c0.mean() * 100:.2f}% of the values are the same, ' \ f'max diff is {(pose_data_2girls_0 - poses[0].all).max():.4f}.' c1 = np.isclose(pose_data_2girls_1, poses[1].all, atol=1) assert c1.all(), f'{c1.mean() * 100:.2f}% of the values are the same, ' \ f'max diff is {(pose_data_2girls_1 - poses[1].all).max():.4f}.' def test_dwpose_estimate_nothing(self, img_file_gun): poses = dwpose_estimate(img_file_gun) Loading