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

@ -20,12 +20,12 @@ class RTMDet(BaseModel):
self.scale = 0
def preprocess(self, image: np.ndarray):
th, tw = self.input_shape[2:]
th, tw = self.input_shape[1:3]
image, self.dx, self.dy, self.scale = letterbox(
image, (tw, th), fill_value=114
)
tensor = np.asarray(image).astype(self.input_type, copy=False)[..., ::-1]
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]):