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

Method is_valid

tools/preprocess/pose2d_utils.py:62–67  ·  view source on GitHub ↗
(self, kp, p, threshold)

Source from the content-addressed store, hash-verified

60 self.load_from_kp2ds(kp2ds)
61
62 def is_valid(self, kp, p, threshold):
63 x, y = kp
64 if x < 0 or y < 0 or x > self.width or y > self.height or p < threshold:
65 return False
66 else:
67 return True
68
69 def get_bbox(self, kp, kp_p, threshold=0.5):
70 kps = kp[kp_p > threshold]

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected