From 5711095425ce3abcc72a0fa878097a957be195fd Mon Sep 17 00:00:00 2001 From: narugo1992 Date: Mon, 9 Dec 2024 00:55:28 +0800 Subject: [PATCH] dev(narugo): fix the dwpose unittest --- test/pose/test_dwpose.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/pose/test_dwpose.py b/test/pose/test_dwpose.py index dc3126e3aa..8f4af0152b 100644 --- a/test/pose/test_dwpose.py +++ b/test/pose/test_dwpose.py @@ -31,10 +31,10 @@ def test_dwpose_estimate_2girls(self, img_file_2girls, pose_data_2girls_0, pose_ assert isinstance(poses[1], OP18KeyPointSet) 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}.' + f'max diff is {np.abs(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}.' + f'max diff is {np.abs(pose_data_2girls_1 - poses[1].all).max():.4f}.' def test_dwpose_estimate_nothing(self, img_file_gun): poses = dwpose_estimate(img_file_gun)