Skip to content

Fix normalized image input ranges and add VitPose CPU recipes - #1259

Draft
ssss141414 wants to merge 1 commit into
mainfrom
ssss141414/repair-pr1099-vitpose-input-range
Draft

Fix normalized image input ranges and add VitPose CPU recipes#1259
ssss141414 wants to merge 1 commit into
mainfrom
ssss141414/repair-pr1099-vitpose-input-range

Conversation

@ssss141414

Copy link
Copy Markdown
Contributor

Summary

Baseline and model metadata:

  • Base/main SHA: b7a7b893d757bb8e52b5b5a594a9aa72f0c0fff4
  • Candidate SHA: a27ff56c
  • WinML CLI: 0.2.0
  • Model: usyd-community/vitpose-plus-huge, pinned checkpoint 9f36d7aec1800d23e97f10c2e74393aee92aa53f
  • Task/class/type: keypoint-detection / VitPoseForPoseEstimation / vitpose
  • I/O: pixel_values float32[1,3,256,192] -> heatmaps float32[1,17,64,48]
  • Derived range: [-2.1179039478302, 2.640000343322754); generated-current-main baseline was [0, 1)

Validation

Precision L0 build tuple L1 CPU perf tuple L2 parity tuple
fp32 (PASS, 951 FLOAT, 3,605,484,544 data bytes) (100 samples, P50 744.290 ms, mean 745.967 ms, 1.34 samples/s) (cos 0.9999999999992747, max_abs 1.3411045e-07, peaks 17/17, keypoint max error 3.41197e-05 px)
fp16 (PASS, 951 FLOAT16, 0 FLOAT, 2 boundary Casts, 1,802,615,296 data bytes, ratio 0.4999648) (100 samples, P50 830.265 ms, mean 877.334 ms, 1.14 samples/s) (cos 0.9999994900305015, max_abs 1.2671202e-04, peaks 17/17, keypoint max error 0.007460596 px)
  • Recipe-free L0 config generation passes with the derived range and canonical model metadata.
  • winml analyze --ep all: 12/12 profiles report (models, operators, unmapped) = (1, 1839, 0) for fp32 and (1, 1841, 0) for fp16. Component mapping has zero unmapped nodes; fp16 adds only the two I/O boundary Casts.
  • L3 is DATASET_BLOCKER for both precisions. The compatible COCO-17 evaluator/schema/model contract resolves and reaches loading, but the configured ~/.cache/winml/datasets/coco_keypoints_val2017 corpus contains no data files. No accuracy claim is made.
  • Independent tester verdict: PASS_L0_L2__L3_DATASET_BLOCKED.
  • CI-equivalent partitions: 8,132 tests, 0 failures, 0 errors, 82 skipped. Post-repair focused validation: 177 passed; Ruff and diff checks pass.

Reproduction

$Model = "usyd-community/vitpose-plus-huge"
$Fp32Recipe = "examples/recipes/usyd-community_vitpose-plus-huge/cpu/cpu/keypoint-detection_fp32_config.json"
$Fp16Recipe = "examples/recipes/usyd-community_vitpose-plus-huge/cpu/cpu/keypoint-detection_fp16_config.json"

# Auto-config and source delta
winml config -m $Model -t keypoint-detection --model-class VitPoseForPoseEstimation -o .artifacts/vitpose-auto.json --overwrite --no-color
git diff b7a7b893d757bb8e52b5b5a594a9aa72f0c0fff4...HEAD -- src/winml/modelkit/export/io.py src/winml/modelkit/export/policy.py tests/unit/export/test_io.py tests/unit/export/test_io_specs.py examples/recipes/usyd-community_vitpose-plus-huge

# L0 builds
winml build -c $Fp32Recipe -m $Model -o .artifacts/vitpose-fp32 --ep cpu --device cpu --precision fp32 --no-analyze --no-compile --rebuild --no-color
winml build -c $Fp16Recipe -m $Model -o .artifacts/vitpose-fp16 --ep cpu --device cpu --precision fp16 --no-analyze --no-compile --rebuild --no-color

# L1 perf and L2 analyze
winml perf -m .artifacts/vitpose-fp32/model.onnx --ep cpu --device cpu --iterations 100 --warmup 10 --format json -o .artifacts/perf-fp32.json --overwrite --no-color
winml perf -m .artifacts/vitpose-fp16/model.onnx --ep cpu --device cpu --iterations 100 --warmup 10 --format json -o .artifacts/perf-fp16.json --overwrite --no-color
winml analyze -m .artifacts/vitpose-fp32/model.onnx --ep all --format json -o .artifacts/analyze-fp32.json --overwrite --no-color
winml analyze -m .artifacts/vitpose-fp16/model.onnx --ep all --format json -o .artifacts/analyze-fp16.json --overwrite --no-color

# L3 dataset-provenance check
winml eval -m .artifacts/vitpose-fp32/model.onnx --model-id $Model --task keypoint-detection --ep cpu --device cpu --no-color
winml eval -m .artifacts/vitpose-fp16/model.onnx --model-id $Model --task keypoint-detection --ep cpu --device cpu --no-color

# Source gates
.venv/Scripts/python.exe -m pytest tests/unit/architecture/test_ep_device_import_rule.py::test_no_direct_ep_device_imports_in_src tests/unit/export/test_io.py tests/unit/export/test_io_specs.py -q
.venv/Scripts/ruff.exe check src/winml/modelkit/export/io.py src/winml/modelkit/export/policy.py tests/unit/export/test_io.py tests/unit/export/test_io_specs.py

@ssss141414 ssss141414 added the model-scale-by-skill Model support PR created or maintained by the adding-model-support skill label Jul 30, 2026
@ssss141414

Copy link
Copy Markdown
Contributor Author

INDEPENDENT REVIEW VERDICT: APPROVE

Reviewed exact head a27ff56 from a fresh detached checkout against baseline b7a7b89.

Scope and code: one commit, six expected files; generic float32 processor-derived low-inclusive/high-exclusive range math; no model/checkpoint branch; obsolete ByteSize/90%-of-2-GB heuristic absent from the source delta; export policy imports EP_DEVICE_SPECS through the winml.modelkit.session facade. Both CPU recipes carry the expected VitPose loader metadata, pixel_values float32[1,3,256,192], range [-2.1179039478302, 2.640000343322754), heatmaps output, and fp32/fp16 quantization policy.

Evidence: model/checkpoint and baseline metadata are coherent; L0/L1/L2 tuples, 17/17 peak parity, 12/12 analyze profiles with zero unmapped nodes, and the explicit L3 dataset blocker are corroborated by the sealed tester artifacts. Reproduction commands match the changed surfaces and claimed gates.

Validation: detached-tree focused suite 177 passed; detached-path Ruff passed; all nine GitHub checks completed successfully. Review threads: 0. Issue comments before verdict: 0. Inline comments: 0. Existing reviews: 0.

No concrete blocker found. Draft state and model-scale-by-skill label should remain unchanged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

model-scale-by-skill Model support PR created or maintained by the adding-model-support skill

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant