MCPcopy Create free account
hub / github.com/Pixel-Talk/EHM-Tracker / __init__

Method __init__

src/modules/pixie/pixie_encoder.py:36–56  ·  view source on GitHub ↗
(self, config=None, ckpt_fp='')

Source from the content-addressed store, hash-verified

34
35class 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 = {}

Callers

nothing calls this directly

Calls 5

_create_modelMethod · 0.95
_setup_cropperMethod · 0.95
existsMethod · 0.80
keysMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected