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

Method __init__

models/aios/postprocesses.py:1516–1547  ·  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

1514class PostProcess_SMPLX_Multi_Infer_Box(nn.Module):
1515 """ This module converts the model's output into the format expected by the coco api"""
1516 def __init__(
1517 self,
1518 num_select=100,
1519 nms_iou_threshold=-1,
1520 num_body_points=17,
1521 body_model= dict(
1522 type='smplx',
1523 keypoint_src='smplx',
1524 num_expression_coeffs=10,
1525 num_betas=10,
1526 gender='neutral',
1527 keypoint_dst='smplx_137',
1528 model_path='data/body_models/smplx',
1529 use_pca=False,
1530 use_face_contour=True)
1531 ) -> None:
1532 super().__init__()
1533 self.num_select = num_select
1534 self.nms_iou_threshold = nms_iou_threshold
1535 self.num_body_points=num_body_points
1536
1537 # -1 for neutral; 0 for male; 1 for femal
1538 gender_body_model = {}
1539 gender_body_model[-1] = build_body_model(body_model)
1540
1541 body_model['gender']='male'
1542 gender_body_model[0] = build_body_model(body_model)
1543
1544 body_model['gender']='female'
1545 gender_body_model[1] = build_body_model(body_model)
1546
1547 self.body_model = gender_body_model
1548
1549 @torch.no_grad()
1550 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