diff --git a/mmdeploy/codebase/mmpose/deploy/pose_detection.py b/mmdeploy/codebase/mmpose/deploy/pose_detection.py index a61d0ffb95..07f817eafa 100644 --- a/mmdeploy/codebase/mmpose/deploy/pose_detection.py +++ b/mmdeploy/codebase/mmpose/deploy/pose_detection.py @@ -346,6 +346,10 @@ def get_postprocess(self, *args, **kwargs) -> Dict: params['modulate_kernel'] = self.model_cfg.kernel_sizes[-1] elif codec.type == 'SimCCLabel': component = 'SimCCLabelDecode' + elif codec.type == 'RegressionLabel': + component = 'DeepposeRegressionHeadDecode' + elif codec.type == 'IntegralRegressionLabel': + component = 'DeepposeRegressionHeadDecode' else: raise RuntimeError(f'Unsupported codecs type: {codec.type}') postprocess = dict(params=params, type=component) diff --git a/mmdeploy/codebase/mmpose/deploy/pose_detection_model.py b/mmdeploy/codebase/mmpose/deploy/pose_detection_model.py index bb64fced9c..ca7926817e 100644 --- a/mmdeploy/codebase/mmpose/deploy/pose_detection_model.py +++ b/mmdeploy/codebase/mmpose/deploy/pose_detection_model.py @@ -103,6 +103,8 @@ def forward(self, if codec.type == 'SimCCLabel': batch_pred_x, batch_pred_y = batch_outputs preds = self.head.decode((batch_pred_x, batch_pred_y)) + elif codec.type in ['RegressionLabel', 'IntegralRegressionLabel']: + preds = self.head.decode(batch_outputs) else: preds = self.head.decode(batch_outputs[0]) results = self.pack_result(preds, data_samples)