MCPcopy Create free account
hub / github.com/MotrixLab/AiOS / __init__

Method __init__

models/aios/postprocesses.py:1006–1037  ·  view source on GitHub ↗
(
        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)
        )

Source from the content-addressed store, hash-verified

1004class PostProcess_SMPLX_Multi_Infer(nn.Module):
1005 """ This module converts the model's output into the format expected by the coco api"""
1006 def __init__(
1007 self,
1008 num_select=100,
1009 nms_iou_threshold=-1,
1010 num_body_points=17,
1011 body_model= dict(
1012 type='smplx',
1013 keypoint_src='smplx',
1014 num_expression_coeffs=10,
1015 num_betas=10,
1016 gender='neutral',
1017 keypoint_dst='smplx_137',
1018 model_path='data/body_models/smplx',
1019 use_pca=False,
1020 use_face_contour=True)
1021 ) -> None:
1022 super().__init__()
1023 self.num_select = num_select
1024 self.nms_iou_threshold = nms_iou_threshold
1025 self.num_body_points=num_body_points
1026
1027 # -1 for neutral; 0 for male; 1 for femal
1028 gender_body_model = {}
1029 gender_body_model[-1] = build_body_model(body_model)
1030
1031 body_model['gender']='male'
1032 gender_body_model[0] = build_body_model(body_model)
1033
1034 body_model['gender']='female'
1035 gender_body_model[1] = build_body_model(body_model)
1036
1037 self.body_model = gender_body_model
1038
1039 @torch.no_grad()
1040 def forward(self, outputs, target_sizes, targets, data_batch_nc, image_shape= None, not_to_xyxy=False, test=False):

Callers

nothing calls this directly

Calls 2

build_body_modelFunction · 0.90
__init__Method · 0.45

Tested by

no test coverage detected