MCPcopy Create free account
hub / github.com/OpenTalker/StyleHEAT / transform_semantic

Method transform_semantic

data/inference_dataset.py:148–153  ·  view source on GitHub ↗
(self, semantic, frame_index)

Source from the content-addressed store, hash-verified

146 }
147
148 def transform_semantic(self, semantic, frame_index):
149 # 500, 73
150 index = self.obtain_seq_index(frame_index, semantic.shape[0])
151 coeff_3dmm = semantic[index, ...]
152 # 27, 73
153 return torch.Tensor(coeff_3dmm).permute(1, 0)
154
155 def obtain_seq_index(self, index, num_frames):
156 seq = list(range(index - self.semantic_radius, index + self.semantic_radius + 1))

Callers 1

load_next_videoMethod · 0.95

Calls 1

obtain_seq_indexMethod · 0.95

Tested by

no test coverage detected