From 35c02c83191b647c52da1d2e46d93e30b850c7fe Mon Sep 17 00:00:00 2001 From: Glenn Jocher Date: Wed, 21 Jun 2023 18:04:22 +0200 Subject: [PATCH] Fix Pose export from YAML (#3312) --- ultralytics/yolo/engine/exporter.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ultralytics/yolo/engine/exporter.py b/ultralytics/yolo/engine/exporter.py index 8017a2f..00c3518 100644 --- a/ultralytics/yolo/engine/exporter.py +++ b/ultralytics/yolo/engine/exporter.py @@ -224,7 +224,7 @@ class Exporter: 'imgsz': self.imgsz, 'names': model.names} # model metadata if model.task == 'pose': - self.metadata['kpt_shape'] = model.kpt_shape + self.metadata['kpt_shape'] = model.model[-1].kpt_shape LOGGER.info(f"\n{colorstr('PyTorch:')} starting from {file} with input shape {tuple(im.shape)} BCHW and " f'output shape(s) {self.output_shape} ({file_size(file):.1f} MB)')