RotationNormalizedPoseDetection

Detect in the full frame, then crop and rotate each instance to a canonical heading before estimating its pose

Mind · Inference · brainference 1.0.0

Mechanism

Plain convolutional networks are not rotation-equivariant, so one model asked to estimate keypoints for animals facing every direction confuses left and right body parts (mirror errors across the head-tail axis). Split the work. Stage 1: a full-frame keypoint detector (Keypoint R-CNN, ResNet-18 + FPN, COCO-pretrained, head replaced for a 20-keypoint ant skeleton, augmented with +/-15 degree rotation, flips and blur) finds boxes and a rough head-tail axis; drop boxes below 0.7 confidence. Stage 2: crop each box enlarged by 75% for context, rotate it so the head points up, and run an identically built model trained only on canonically oriented crops; then map keypoints back with the inverse rotation and translation. Score each stage with a single balanced error M = sqrt(FN^2 + FP^2) / (FN + FP + TP), using strict box overlap (0.7) for detection and OKS >= 0.4 with Hungarian matching for keypoints, and tune hyperparameters on it (Bayesian search with asynchronous successive halving). In the ant pipeline this cut box error from 0.187 to 0.104 and keypoint error from 0.315 to 0.203.

Invariants

Preconditions

Failure modes

Where this came from

Identity