Skip to content

Commit 47b28af

Browse files
revert change to keypoints scaling
1 parent e0dfbc6 commit 47b28af

1 file changed

Lines changed: 4 additions & 5 deletions

File tree

  • inference/core/workflows/core_steps/common

inference/core/workflows/core_steps/common/utils.py

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -361,11 +361,10 @@ def scale_sv_detections(
361361
return detections_copy
362362
detections_copy.xyxy = (detections_copy.xyxy * scale).round()
363363
if keypoints_key in detections_copy.data:
364-
detections_copy.data[keypoints_key] = (
365-
(detections_copy.data[keypoints_key].astype(np.float32) * scale)
366-
.round()
367-
.astype(np.int32)
368-
)
364+
for i in range(len(detections_copy[keypoints_key])):
365+
detections_copy[keypoints_key][i] = (
366+
detections_copy[keypoints_key][i].astype(np.float32) * scale
367+
).round()
369368
detections_copy[IMAGE_DIMENSIONS_KEY] = (
370369
detections_copy[IMAGE_DIMENSIONS_KEY] * scale
371370
).round()

0 commit comments

Comments
 (0)