We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent e0dfbc6 commit 47b28afCopy full SHA for 47b28af
1 file changed
inference/core/workflows/core_steps/common/utils.py
@@ -361,11 +361,10 @@ def scale_sv_detections(
361
return detections_copy
362
detections_copy.xyxy = (detections_copy.xyxy * scale).round()
363
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
- )
+ for i in range(len(detections_copy[keypoints_key])):
+ detections_copy[keypoints_key][i] = (
+ detections_copy[keypoints_key][i].astype(np.float32) * scale
+ ).round()
369
detections_copy[IMAGE_DIMENSIONS_KEY] = (
370
detections_copy[IMAGE_DIMENSIONS_KEY] * scale
371
).round()
0 commit comments