From 3a2af091e8b831cc9d225c846c4681c4402cf981 Mon Sep 17 00:00:00 2001 From: jinkun Date: Fri, 24 Jul 2026 08:36:25 +0800 Subject: [PATCH] recipe(vitpose-base): add CPU keypoint detection recipes --- .../cpu/keypoint-detection_fp16_config.json | 55 +++++++++++++++++++ .../cpu/keypoint-detection_fp32_config.json | 53 ++++++++++++++++++ 2 files changed, 108 insertions(+) create mode 100644 examples/recipes/usyd-community_vitpose-base/cpu/cpu/keypoint-detection_fp16_config.json create mode 100644 examples/recipes/usyd-community_vitpose-base/cpu/cpu/keypoint-detection_fp32_config.json diff --git a/examples/recipes/usyd-community_vitpose-base/cpu/cpu/keypoint-detection_fp16_config.json b/examples/recipes/usyd-community_vitpose-base/cpu/cpu/keypoint-detection_fp16_config.json new file mode 100644 index 000000000..b439457d1 --- /dev/null +++ b/examples/recipes/usyd-community_vitpose-base/cpu/cpu/keypoint-detection_fp16_config.json @@ -0,0 +1,55 @@ +{ + "export": { + "opset_version": 17, + "batch_size": 1, + "export_params": true, + "do_constant_folding": true, + "verbose": false, + "dynamo": false, + "enable_hierarchy_tags": true, + "clean_onnx": false, + "hierarchy_tag_format": "full", + "input_tensors": [ + { + "name": "pixel_values", + "dtype": "float32", + "shape": [1, 3, 256, 192], + "value_range": [0, 1] + } + ], + "output_tensors": [ + { + "name": "heatmaps" + } + ] + }, + "optim": {}, + "quant": { + "mode": "fp16" + }, + "compile": null, + "loader": { + "task": "keypoint-detection", + "model_class": "VitPoseForPoseEstimation", + "model_type": "vitpose" + }, + "eval": { + "task": "keypoint-detection", + "dataset": { + "path": "~/.cache/winml/datasets/coco_keypoints_val2017", + "build_script": "scripts/build_coco_keypoints.py", + "split": "validation", + "samples": 100, + "shuffle": true, + "seed": 42, + "columns_mapping": { + "input_column": "image", + "annotation_column": "objects", + "keypoints_key": "keypoints", + "bbox_key": "bbox", + "area_key": "area", + "box_format": "xywh" + } + } + } +} diff --git a/examples/recipes/usyd-community_vitpose-base/cpu/cpu/keypoint-detection_fp32_config.json b/examples/recipes/usyd-community_vitpose-base/cpu/cpu/keypoint-detection_fp32_config.json new file mode 100644 index 000000000..7cb852c89 --- /dev/null +++ b/examples/recipes/usyd-community_vitpose-base/cpu/cpu/keypoint-detection_fp32_config.json @@ -0,0 +1,53 @@ +{ + "export": { + "opset_version": 17, + "batch_size": 1, + "export_params": true, + "do_constant_folding": true, + "verbose": false, + "dynamo": false, + "enable_hierarchy_tags": true, + "clean_onnx": false, + "hierarchy_tag_format": "full", + "input_tensors": [ + { + "name": "pixel_values", + "dtype": "float32", + "shape": [1, 3, 256, 192], + "value_range": [0, 1] + } + ], + "output_tensors": [ + { + "name": "heatmaps" + } + ] + }, + "optim": {}, + "quant": null, + "compile": null, + "loader": { + "task": "keypoint-detection", + "model_class": "VitPoseForPoseEstimation", + "model_type": "vitpose" + }, + "eval": { + "task": "keypoint-detection", + "dataset": { + "path": "~/.cache/winml/datasets/coco_keypoints_val2017", + "build_script": "scripts/build_coco_keypoints.py", + "split": "validation", + "samples": 100, + "shuffle": true, + "seed": 42, + "columns_mapping": { + "input_column": "image", + "annotation_column": "objects", + "keypoints_key": "keypoints", + "bbox_key": "bbox", + "area_key": "area", + "box_format": "xywh" + } + } + } +}