Proportion Match Rank (head/body vs reference)
Pick the frame where the head isn't 30% too big — by ratio, not vibes
- reference
- images
- ranked_images
- best_image
- target_ratio
- report
The single most common failure when you generate a person from a face reference isn't the face. It's that the head comes out too big or too small relative to the body - seed to seed, the head-to-shoulder ratio wanders and you end up with someone who looks like a Funko Pop or a bobblehead. Proportion Match Rank exists for exactly that one problem, and nothing else.
It's the lightweight member of the QualityGate family: it ranks a batch by how close each image's head-size ratio is to a single reference image. No face reference, no ArcFace embedding, no identity model. If you don't care about likeness - you just want the proportions to match a target - this is the node you actually want, and it's the cheapest one to get running because it has the fewest dependencies.
How it works
The ratio it measures is R = ear-to-ear width / shoulder width, computed with MediaPipe Pose. Ears are a deliberate choice over hair-included head area: long or face-framing hair inflates a hair-based measurement, while ear-to-ear stays stable, and MediaPipe estimates ear landmarks even when hair hides them. Shoulder width normalizes for body scale, so the ratio is invariant to distance and framing - it works whether the render is a headshot crop or a full body.
Because a single pose estimate is noisy (the author measured keypoint jitter at roughly half the signal), each image's ratio is the average over a few micro-crops of the image - a cheap test-time augmentation that cuts noise roughly by the square root of the number of samples. Scoring is exponential decay, exp(-|ΔR|/tolerance): perfect match scores 1.0, drift of one tolerance scores about 0.37, and it never hard-fails, so there's always a ranking even when every image is far from the target.
Inputs and outputs
Three inputs, and you'll touch all of them:
reference- the one image whose head-size ratio is your target.images- the batch to reorder.tolerance- the e-folding scale for scoring. Default 0.02; smaller means only near-identical ratios score well, larger tolerates more drift. The author's data shows the measurement can resolve a ratio difference around 0.01, so you can afford to be strict.
Outputs: ranked_images (closest to the reference first), best_image, target_ratio - the measured R of your reference, handy if you want to log it or compare batches - and report.
Gotchas
Two things worth knowing before you wire it in.
First, it needs the person to be detectable. If MediaPipe can't find a body in the reference, or mediapipe isn't installed, the node doesn't crash - it passes your batch through unmodified and reports why. That's friendly behavior, but it's also a silent no-op, so check the report string if your output order looks unchanged.
Second, it only ranks by proportion. If you also need the face to actually look like your subject, this node won't help - that's CompositeRank, which adds identity and sharpness as weighted axes. Think of Proportion Match Rank as the scalpel: it's the right tool when head size is the thing that's failing, and the wrong tool when the whole package matters.
It's MIT licensed and installs with the rest of the pack - see the pack README for the standard Manager or git clone route. It's genuinely the node I'd reach for first when a batch of full-body renders keeps producing comically oversized heads, because it isolates the exact failure mode.
Inputs (3)
| Name | Type | Default | Description |
|---|---|---|---|
| reference | IMAGE | — | |
| images | IMAGE | — | |
| tolerance | FLOAT | 0.0200.005–0.1 | — |
Outputs (4)
| Name | Type | Description |
|---|---|---|
| ranked_images | IMAGE | — |
| best_image | IMAGE | — |
| target_ratio | FLOAT | — |
| report | STRING | — |