recipe(vitpose-base-simple): add CPU keypoint detection configs#1195
Draft
fuliucansheng wants to merge 1 commit into
Draft
recipe(vitpose-base-simple): add CPU keypoint detection configs#1195fuliucansheng wants to merge 1 commit into
fuliucansheng wants to merge 1 commit into
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds CPU recipe coverage for
nielsr/vitpose-base-simple, a ViTPose keypoint-detection checkpoint. This is an L0 recipe-only contribution: currentmainresolves the model family but recipe-freewinml config/winml buildfail with empty exporter I/O, and this PR supplies the verified CPU fp32/fp16 recipe inputs and outputs.Model metadata
What the model does:
nielsr/vitpose-base-simplepredicts human-pose keypoint heatmaps from an input image crop. WinML exports it askeypoint-detectionwithVitPoseForPoseEstimation.Primary user stories:
Supported tasks:
keypoint-detectionModel architecture:
Source/confidence: pinned checkpoint config resolves
model_type: vitpose,architectures: [ViTPoseForPoseEstimation], image size[256, 192], patch size[16, 16], and backbone hidden size 768 with 12 layers and 12 attention heads.Validation and support evidence
Baseline
Baseline was run from current
origin/mainatace130f20e36df44ebf7de6cf0356235c8ee79fdwithwinml, version 0.2.0.winml inspectVitPoseForPoseEstimation, exporterVitPoseOnnxConfig, WinML classWinMLModelForGenericTask; taskkeypoint-detection; exporter input/output tensors are empty.vitpose: vendor ONNX tasks includekeypoint-detection; WinML adds no extra task override.winml config -m nielsr/vitpose-base-simple -p fp32 --ep cpu --device cpuexits withUnexpected error: list index out of range.winml build -m nielsr/vitpose-base-simple ...exits withBuild failed: list index out of range.winml evalsupportskeypoint-detection, but the default local COCO keypoints dataset~/.cache/winml/datasets/coco_keypoints_val2017is absent on this host.The checked-in recipe is seeded from existing same-family VitPose recipes and the checkpoint config:
pixel_values [1,3,256,192]toheatmaps.Goal
Effort: L0. Goal ceiling: L2. Outcome: L0 recipe-only.
Success means the checked-in CPU fp32/fp16 recipes repair the recipe-free build failure, produce structurally valid ONNX artifacts, run
winml perfon CPU, and match the PyTorch reference heatmaps numerically with the same image tensor. L3 is blocked by missing local COCO keypoint data.Outcome
Highest verified goal: L2 PASS on CPU for both fp32 and fp16. Coverage is full for the targeted EP set (
cpu/cpu/fp32,cpu/cpu/fp16); no accelerator tuples are claimed.Shipped recipes:
examples/recipes/nielsr_vitpose-base-simple/cpu/cpu/keypoint-detection_fp32_config.jsonexamples/recipes/nielsr_vitpose-base-simple/cpu/cpu/keypoint-detection_fp16_config.jsonMethodology friction observed: none. Model finding: this VitPose checkpoint needs explicit recipe I/O because current auto-config exposes empty tensors and fails with
list index out of range.Per-EP/device/precision results
pixel_values [1,3,256,192] float32, outputheatmaps [1,17,64,48], 419 nodes, FLOAT initializers, and 327.7 MB external data.--precision fp16; fp16 stage complete in 4.1s; optimized model is loadable with 421 nodes, FLOAT16 initializers present, and 163.9 MB external data.2.952292561531067e-07.0.9999979734420776, max absolute diff0.00021735578775405884.winml eval -m ... --task keypoint-detection --samples 1fails because default dataset~/.cache/winml/datasets/coco_keypoints_val2017is not present.Delta
The recipe is not comparable to
winml configoutput becausewinml configfails before writing a usable config. Relative to the failing auto path, the shipped recipes provide the missing I/O contract:export.input_tensorspixel_valuesfloat32[1,3,256,192], range[0,1]VitPoseForPoseEstimation.forwardand the checkpoint image size.export.output_tensorsheatmaps[1,17,64,48].loaderkeypoint-detection, classVitPoseForPoseEstimation, typevitposeThe fp32 recipe uses
quant: null; the fp16 recipe carries the fp16 quantization block and is built with--precision fp16. No source code or tests are changed, andexamples/recipes/README.mdis untouched.Reducibility: this PR follows the existing VitPose recipe pattern and ships only exact CPU tuples verified here. The current auto-config failure is documented as a baseline gap; this model PR does not add a class-wide source fix.
Analyze summary
Static rule analysis completed with partial-success exit semantics: QNN/OpenVINO rows were complete, while VitisAI has no rule data and is all-unknown. This is compatibility analysis, not runtime execution.
Component-level summary
Div,Erf,Add,Mul; unknownResize. OpenVINO NPU: unknownResize. VitisAI: no rule data.Div,Erf,Add,Mul; unknownResize. OpenVINO NPU: unknownResize. VitisAI: no rule data.Op-level summary
Reproduce commands