(self, config=None, device='cuda:0')
| 40 | |
| 41 | class PIXIE(object): |
| 42 | def __init__(self, config=None, device='cuda:0'): |
| 43 | if config is None: |
| 44 | self.cfg = cfg |
| 45 | else: |
| 46 | self.cfg = config |
| 47 | |
| 48 | self.device = device |
| 49 | # parameters setting |
| 50 | self.param_list_dict = {} |
| 51 | for lst in self.cfg.params.keys(): |
| 52 | param_list = cfg.params.get(lst) |
| 53 | self.param_list_dict[lst] = { |
| 54 | i: cfg.model.get('n_'+i) for i in param_list} |
| 55 | |
| 56 | # Build the models |
| 57 | self._create_model() |
| 58 | # Set up the cropping modules used to generate face/hand crops from the body predictions |
| 59 | self._setup_cropper() |
| 60 | |
| 61 | def _setup_cropper(self): |
| 62 | self.Cropper = {} |
no test coverage detected