(self, config=None, ckpt_fp='')
| 34 | |
| 35 | class PixieEncoder(nn.Module): |
| 36 | def __init__(self, config=None, ckpt_fp=''): |
| 37 | super().__init__() |
| 38 | if config is None: |
| 39 | self.cfg = cfg |
| 40 | else: |
| 41 | self.cfg = config |
| 42 | |
| 43 | if os.path.exists(ckpt_fp): |
| 44 | self.cfg.pretrained_modelpath = ckpt_fp |
| 45 | |
| 46 | # parameters setting |
| 47 | self.param_list_dict = {} |
| 48 | for lst in self.cfg.params.keys(): |
| 49 | param_list = cfg.params.get(lst) |
| 50 | self.param_list_dict[lst] = { |
| 51 | i: cfg.model.get('n_'+i) for i in param_list} |
| 52 | |
| 53 | # Build the models |
| 54 | self._create_model() |
| 55 | # Set up the cropping modules used to generate face/hand crops from the body predictions |
| 56 | self._setup_cropper() |
| 57 | |
| 58 | def _setup_cropper(self): |
| 59 | self.Cropper = {} |
nothing calls this directly
no test coverage detected