Skip to content

Commit

Permalink
fix comment
Browse files Browse the repository at this point in the history
  • Loading branch information
Ben-Louis committed Oct 20, 2023
1 parent e70886e commit 207c30f
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions mmdeploy/codebase/mmpose/deploy/pose_detection_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,13 +100,12 @@ def forward(self,
batch_outputs = self.wrapper.output_to_list(batch_outputs)

codec = self.model_cfg.codec
if isinstance(codec, (list, tuple)):
codec = codec[-1]

if codec.type == 'YOLOXPoseAnnotationProcessor':
return self.pack_yolox_pose_result(batch_outputs, data_samples)

if isinstance(codec, (list, tuple)):
codec = codec[-1]
if codec.type == 'SimCCLabel':
elif 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']:
Expand All @@ -128,7 +127,7 @@ def pack_result(self,
convert_coordinate (bool): Whether to convert keypoints
coordinates to original image space. Default is True.
Returns:
data_samples (List[BaseDataElement])
data_samples (List[BaseDataElement]):
updated data_samples with predictions.
"""
if isinstance(preds, tuple):
Expand Down Expand Up @@ -172,7 +171,7 @@ def pack_yolox_pose_result(self, preds: List[torch.Tensor],
data_samples (List[BaseDataElement]): A list of meta info for
image(s).
Returns:
data_samples (List[BaseDataElement])
data_samples (List[BaseDataElement]):
updated data_samples with predictions.
"""
assert preds[0].shape[0] == len(data_samples)
Expand Down

0 comments on commit 207c30f

Please sign in to comment.