MCPcopy Create free account
hub / github.com/ModelTC/LightX2V / resize

Method resize

tools/preprocess/pose2d_utils.py:87–97  ·  view source on GitHub ↗
(self, width, height)

Source from the content-addressed store, hash-verified

85 return self
86
87 def resize(self, width, height):
88 scale_x = width / self.width
89 scale_y = height / self.height
90 all_kps = [self.kps_body, self.kps_lhand, self.kps_rhand, self.kps_face]
91 for kps in all_kps:
92 if kps is not None:
93 kps[:, 0] *= scale_x
94 kps[:, 1] *= scale_y
95 self.width = width
96 self.height = height
97 return self
98
99 def get_kps_body_with_p(self, normalize=False):
100 kps_body = self.kps_body.copy()

Callers 8

_build_face_imagesMethod · 0.45
_load_img_v2_as_tensorFunction · 0.45
_yolox_preprocessFunction · 0.45
padding_resizeFunction · 0.45
draw_maskFunction · 0.45
cropFunction · 0.45
__call__Method · 0.45
preprocessMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected