MCPcopy
hub / github.com/xingyizhou/CenterNet / transform_preds

Function transform_preds

src/lib/utils/image.py:19–24  ·  view source on GitHub ↗
(coords, center, scale, output_size)

Source from the content-addressed store, hash-verified

17 return img[:, :, ::-1].copy()
18
19def transform_preds(coords, center, scale, output_size):
20 target_coords = np.zeros(coords.shape)
21 trans = get_affine_transform(center, scale, 0, output_size, inv=1)
22 for p in range(coords.shape[0]):
23 target_coords[p, 0:2] = affine_transform(coords[p, 0:2], trans)
24 return target_coords
25
26
27def get_affine_transform(center,

Callers 4

post_processMethod · 0.90
ddd_post_process_2dFunction · 0.85
ctdet_post_processFunction · 0.85
multi_pose_post_processFunction · 0.85

Calls 2

get_affine_transformFunction · 0.85
affine_transformFunction · 0.85

Tested by

no test coverage detected