Updated easypose scripts.

This commit is contained in:
Daniel
2024-12-06 17:35:49 +01:00
parent 108937d96c
commit ee8b9bafb3
4 changed files with 12 additions and 14 deletions

View File

@ -39,13 +39,10 @@ class Heatmap(BaseModel):
class SimCC(BaseModel):
def __init__(self, model_path: str, device: str = 'CUDA', warmup: int = 30):
super(SimCC, self).__init__(model_path, device, warmup)
self.dx = 0
self.dy = 0
self.scale = 0
def preprocess(self, image: np.ndarray):
tensor = np.asarray(image).astype(self.input_type, copy=False)
tensor = np.expand_dims(tensor, axis=0).transpose((0, 3, 1, 2))
tensor = np.expand_dims(tensor, axis=0)
return tensor
def postprocess(self, tensor: List[np.ndarray]):