(
self,
num_select=100,
nms_iou_threshold=-1,
num_body_points=17,
body_model= dict(
type='smplx',
keypoint_src='smplx',
num_expression_coeffs=10,
num_betas=10,
gender='neutral',
keypoint_dst='smplx_137',
model_path='data/body_models/smplx',
use_pca=False,
use_face_contour=True,
),
)
| 656 | class PostProcess_SMPLX_Multi(nn.Module): |
| 657 | """ This module converts the model's output into the format expected by the coco api""" |
| 658 | def __init__( |
| 659 | self, |
| 660 | num_select=100, |
| 661 | nms_iou_threshold=-1, |
| 662 | num_body_points=17, |
| 663 | body_model= dict( |
| 664 | type='smplx', |
| 665 | keypoint_src='smplx', |
| 666 | num_expression_coeffs=10, |
| 667 | num_betas=10, |
| 668 | gender='neutral', |
| 669 | keypoint_dst='smplx_137', |
| 670 | model_path='data/body_models/smplx', |
| 671 | use_pca=False, |
| 672 | use_face_contour=True, |
| 673 | ), |
| 674 | ) -> None: |
| 675 | super().__init__() |
| 676 | self.num_select = num_select |
| 677 | self.nms_iou_threshold = nms_iou_threshold |
| 678 | self.num_body_points=num_body_points |
| 679 | |
| 680 | # -1 for neutral; 0 for male; 1 for femal |
| 681 | gender_body_model = {} |
| 682 | gender_body_model[-1] = build_body_model(body_model) |
| 683 | |
| 684 | body_model['gender']='male' |
| 685 | gender_body_model[0] = build_body_model(body_model) |
| 686 | |
| 687 | body_model['gender']='female' |
| 688 | gender_body_model[1] = build_body_model(body_model) |
| 689 | |
| 690 | self.body_model = gender_body_model |
| 691 | @torch.no_grad() |
| 692 | def forward(self, outputs, target_sizes, targets, data_batch_nc, not_to_xyxy=False, test=False, dataset = None): |
| 693 | # import pdb; pdb.set_trace() |
nothing calls this directly
no test coverage detected