MCPcopy Create free account
hub / github.com/ModelTC/LightX2V / forward

Method forward

tools/preprocess/pose2d.py:309–312  ·  view source on GitHub ↗
(self, img, center, scale, **kwargs)

Source from the content-addressed store, hash-verified

307 super(ViTPose, self).__init__(checkpoint, device=device)
308
309 def forward(self, img, center, scale, **kwargs):
310 heatmaps = self.session.run([], {self.session.get_inputs()[0].name: img})[0]
311 points, prob = keypoints_from_heatmaps(heatmaps=heatmaps, center=center, scale=scale * 200, unbiased=True, use_udp=False)
312 return np.concatenate([points, prob], axis=2)
313
314 @staticmethod
315 def preprocess(img, bbox=None, input_resolution=(256, 192), rescale=1.25, mask=None, **kwargs):

Callers

nothing calls this directly

Calls 2

keypoints_from_heatmapsFunction · 0.90
runMethod · 0.45

Tested by

no test coverage detected