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

Method get_bbox

tools/preprocess/pose2d_utils.py:69–75  ·  view source on GitHub ↗
(self, kp, kp_p, threshold=0.5)

Source from the content-addressed store, hash-verified

67 return True
68
69 def get_bbox(self, kp, kp_p, threshold=0.5):
70 kps = kp[kp_p > threshold]
71 if kps.size == 0:
72 return 0, 0, 0, 0
73 x0, y0 = kps.min(axis=0)
74 x1, y1 = kps.max(axis=0)
75 return x0, y0, x1, y1
76
77 def crop(self, x0, y0, x1, y1):
78 all_kps = [self.kps_body, self.kps_lhand, self.kps_rhand, self.kps_face]

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected