Export pose postprocessing steps as well.

This commit is contained in:
Daniel
2024-11-29 17:59:15 +01:00
parent 19015c6326
commit ad1ef42b99
3 changed files with 7 additions and 13 deletions

View File

@ -50,14 +50,8 @@ class SimCC(BaseModel):
return tensor
def postprocess(self, tensor: List[np.ndarray]):
simcc_x, simcc_y = tensor
simcc_x = np.squeeze(simcc_x, axis=0)
simcc_y = np.squeeze(simcc_y, axis=0)
keypoints = simcc_decoder(simcc_x,
simcc_y,
self.input_shape[2:],
self.dx,
self.dy,
self.scale)
kpts = tensor[0][0]
scores = np.expand_dims(tensor[1][0], axis=-1)
keypoints = np.concatenate([kpts, scores], axis=-1)
return keypoints