(self, kp, kp_p, threshold=0.5)
| 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] |
nothing calls this directly
no outgoing calls
no test coverage detected