| 24 | """This module converts the model's output into the format expected by the |
| 25 | coco api.""" |
| 26 | def __init__(self, |
| 27 | num_select=100, |
| 28 | nms_iou_threshold=-1, |
| 29 | num_body_points=17, |
| 30 | body_model=None) -> None: |
| 31 | super().__init__() |
| 32 | self.num_select = num_select |
| 33 | self.nms_iou_threshold = nms_iou_threshold |
| 34 | self.num_body_points = num_body_points |
| 35 | self.body_model = build_body_model( |
| 36 | dict(type='GenderedSMPL', |
| 37 | keypoint_src='h36m', |
| 38 | keypoint_dst='h36m', |
| 39 | model_path='data/body_models/smpl', |
| 40 | keypoint_approximate=True, |
| 41 | joints_regressor= |
| 42 | 'data/body_models/J_regressor_h36m.npy')) |
| 43 | |
| 44 | @torch.no_grad() |
| 45 | def forward(self, |