pub enum PckNormalization {
TorsoDiameter,
BoundingBoxDiagonal,
AbsolutePixels(f32),
}Expand description
The PCK normalization basis — the single knob that made three project numbers non-comparable, now explicit and carried with every result.
A keypoint j (with visibility[j] >= 0.5) is correct iff
‖pred_j − gt_j‖₂ ≤ τ, where the distance tolerance τ is derived from
the chosen normalization and the PCK threshold k (given as a percentage,
e.g. 20 for PCK@20):
| Variant | τ (tolerance in coordinate units) |
|---|---|
TorsoDiameter | (k/100) · d_torso |
BoundingBoxDiagonal | (k/100) · d_bbox |
AbsolutePixels | threshold (k ignored) |
d_torso is the hip↔hip span (COCO joints 11↔12), falling back to the bbox
diagonal when both hips are not visible — identical to
crate::metrics_core::canonical_torso_size. d_bbox is the diagonal of
the axis-aligned bounding box of all visible GT keypoints.
These yield different PCK on the same predictions whenever
d_torso ≠ d_bbox (always true for a real pose: the bbox is larger than the
hip span), which is exactly why the 96 / 81.6 / 61 numbers cannot be lined
up without declaring this enum.
Variants§
TorsoDiameter
Torso-diameter (hip↔hip span). The standard MM-Fi / GraphPose-Fi
convention and the stricter of the two relative normalizers. This is
the canonical default (crate::metrics_core::pck_canonical).
BoundingBoxDiagonal
Bounding-box diagonal (a.k.a. image-normalized). The looser WiFlow-STD-style convention: normalize by the GT pose bbox diagonal, which is larger than the torso span ⇒ a more forgiving threshold ⇒ a higher PCK on identical predictions.
AbsolutePixels(f32)
Absolute pixel/coordinate threshold — no pose-relative
normalization. The PCK k percentage is ignored; the held threshold
is the raw distance tolerance directly. Included so historical
retracted-style numbers are reproducible, and clearly labeled as
non-comparable to the relative variants (it does not scale with body
size or camera distance).
Implementations§
Trait Implementations§
Source§impl Clone for PckNormalization
impl Clone for PckNormalization
Source§fn clone(&self) -> PckNormalization
fn clone(&self) -> PckNormalization
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for PckNormalization
Source§impl Debug for PckNormalization
impl Debug for PckNormalization
Source§impl PartialEq for PckNormalization
impl PartialEq for PckNormalization
impl StructuralPartialEq for PckNormalization
Auto Trait Implementations§
impl Freeze for PckNormalization
impl RefUnwindSafe for PckNormalization
impl Send for PckNormalization
impl Sync for PckNormalization
impl Unpin for PckNormalization
impl UnsafeUnpin for PckNormalization
impl UnwindSafe for PckNormalization
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more