test(eval): cover functional VitPose keypoint path - #1360
Qiong Wu (qiowu) (DingmaomaoBJTU) wants to merge 2 commits into
Conversation
REQUEST_CHANGESPR: #1360 Verdict
The functional and quality evidence passes at the reviewed SHA, but two blockers remain. Both must be fixed before this can be approved. Review Threads
Successful Evidence
Required Producer Fixes
Follow-up Required
|
|
Addressed both requested changes in ac5c5c1. The checked-in regression now uses a deterministic self-generated 24x17 RGB fixture (148 decoded bytes) and generated bbox, area, and keypoints; no external media or official COCO annotation content remains. ONNX imports are normalized to module-qualified |
Summary
Add test-only functional Eval coverage for
usyd-community/vitpose-base. The regression uses a deterministic self-generated 24 x 17 RGB fixture and generated COCO-style annotations, and generates a small local ONNX boundary model under the test temporary directory. It exercises the complete offline path:saved datasets.Image row / PIL RGB decode -> nested COCO person boxes -> local VitPoseImageProcessor -> WinML ORT CPU inference -> pose post-processing -> real COCO OKS metricThis is coverage, not a production bug fix. It changes no evaluator, model adapter, public API, recipe, or README behavior; uses no network at test time; and checks in no model or other large artifact. The 148-byte decoded PNG and its annotations contain no external media or official COCO annotation content. The generated ONNX model validates the runtime boundary only and is not evidence of numerical parity with VitPose. Numerical parity and functional model support are reported separately below from real
usyd-community/vitpose-basecandidate artifacts.Historical context:
Model metadata
What the model does
ViTPose Base is a top-down human pose estimator. It consumes processor-normalized RGB person crops at 256 x 192 and produces 17 COCO body-keypoint heatmaps at 64 x 48 for conversion to image-space keypoint coordinates and confidence scores.
Primary user stories
Supported tasks
keypoint-detectionthrough the checkpoint, Transformers, Optimum ONNX export, and WinML.Model architecture
The frozen architecture is a plain ViT backbone with 16 x 16 patch projection, 12 pre-normalized transformer encoder blocks at width 768, and a classic two-stage transposed-convolution decoder:
Validation and support evidence
Baseline
Baseline/current
origin/mainise28b128f5c2f69ecb2d73b63d2aea0a5ee8bddd0with WinML0.3.0. Recipe-free current-main config, build, perf, and a bounded real-data Eval passed before the candidate was produced. The baseline one-row FP32 CPU Eval processed one official COCO val2017 image/person and reportedmap=0.90,map_50=1.0,map_75=1.0, andmar=0.9; this is a functional smoke, not representative accuracy.The support gap was automated regression coverage: existing evaluator tests mocked the processor and model rather than materializing a saved image row and traversing the complete processor, ORT, post-processing, and metric path.
Goal
Add focused functional Eval regression coverage for the complete saved COCO row -> RGB PIL decode -> correctly nested person boxes -> local VitPose processor -> ONNX heatmaps -> pose post-processing -> COCO OKS metric path while preserving production behavior and the existing #1189 recipes.
The committed ceiling was L3. The bounded test must prove operability and finite output/count semantics without treating a one-sample result as benchmark quality.
Outcome
Final sealed verdict: PASS with full required tuple coverage. The recorded shipped tier is L2, and the highest goal verdict is L3 PASS.
fp16/fp32storage ratio0.4999886216558335).pixel_valuesinput to PyTorch and both real ONNX candidate artifacts. FP32: cosine0.9999999999997321, max abs6.854534149169922e-07, mean abs1.3132776034408424e-08. FP16: cosine0.9999991237385805, max abs0.0005743205547332764, mean abs3.4362907409603e-05.ac5c5c107afc112cd56d2ab364227d166bf8acfe.3642 passed, 9 skipped, 1 warning), and the focused functional/evaluator/metric set (17 passed).L0 config/build/structure, L1 perf, Analyze, and the underlying L2 parity run were reused from the pre-repair candidate because the recipes, model/export paths, dependencies, and sealed artifacts were unchanged; they were attested on the final candidate, with L2 receiving a refreshed input attestation. The official one-row FP32 CPU Eval and fixture/tests/static gates were rerun on the final candidate. The local generated ONNX boundary model is not used for L0-L3 parity or support claims.
Model-knowledge findings
vitpose-017throughvitpose-021and a refinement tovitpose-016were curated locally. Their Lane A publication is pending external repository access and is not a dependency of this PR. The run found no methodology friction, so no_metafinding or skill-contract edit is required.Per-EP/device/precision results
Bounded functional smoke Eval:
CPUExecutionProvider / cpu / fp3242map=0.8999999999999999,map_50=0.9999999999999999,map_75=0.9999999999999999,mar=0.9,num_predictions=1,num_ground_truths=1,num_images=1Delta
tests/unit/eval/test_keypoint_detection_functional.py(191 lines).tests/fixtures/generated_pose_24x17.png.b64(2 lines; 148 decoded bytes), a deterministic self-generated RGB PNG paired with generated COCO-style bbox, area, and keypoints.[image][person][xywh]box nesting, loads a localVitPoseImageProcessor, generates a three-op ONNX boundary graph undertmp_path, runs WinML ORT on CPU, post-processes 17 finite keypoints/scores, and invokes the real COCO OKS metric. The checked-in boundary regression is separate from the official one-row COCO Eval used for final-SHA model support evidence.onnx.helperandonnx.TensorProtoimport style.src/, recipe, README, documentation, script, network, checked-in ONNX, or public API change. The existing recipe(vitpose-base): add CPU keypoint detection recipes #1189 fp32/fp16 recipes are unchanged and are not duplicated.Analyze summary
Both fp32 and fp16 Analyze runs emitted complete JSON but returned exit 1 because accelerator rule matrices retain unknown classifications. This is
ANALYZE-PARTIAL-SUCCESS, not a model-validation failure.ConvTransposeremains unknown for NvTensorRTRTXExecutionProvider, QNNExecutionProvider, and OpenVINOExecutionProvider; providers without shipped rule data remain all-unknown.Component-level summary
Attention and MLP child rows intentionally overlap the encoder aggregate. Decoder mapping uses graph-tail topology and the
[1,17,64,48]tensor boundary.Op-level summary
Reproduce commands