MCPcopy Create free account
hub / github.com/MotrixLab/AiOS / transform_preds

Function transform_preds

detrsmpl/data/datasets/pipelines/hybrik_transforms.py:84–94  ·  view source on GitHub ↗

Transform heatmap coordinates to image coordinates.

(coords, center, scale, output_size)

Source from the content-addressed store, hash-verified

82
83
84def transform_preds(coords, center, scale, output_size):
85 """Transform heatmap coordinates to image coordinates."""
86 target_coords = np.zeros(coords.shape)
87 trans = get_affine_transform(center,
88 scale,
89 0,
90 output_size,
91 inv=1,
92 pixel_std=1)
93 target_coords[0:2] = affine_transform(coords[0:2], trans)
94 return target_coords
95
96
97def bbox_xywh_to_xyxy(xywh):

Callers 1

heatmap2coordFunction · 0.85

Calls 2

get_affine_transformFunction · 0.85
affine_transformFunction · 0.85

Tested by

no test coverage detected