Export pose postprocessing steps as well.
This commit is contained in:
@ -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
|
||||
|
||||
Reference in New Issue
Block a user