
Crops named body regions out of an Image guided by one or more [Landmarks2d.Human22] poses, emitting a per-person [(Image, Double)] of BGR region image plus a confidence. A single limb keeps a full-frame masked canvas; rectangles and composites are tight crops for downstream classification.
The same crop drives a per-person classifier that consumes the isolated region image and emits a label, decoupling recognition from frame layout.
targets accepts helmet, head, eyes, mouth, torso, lArm, rArm, lForearm, rForearm, lHand, rHand, lLeg, rLeg, lLowerLeg, rLowerLeg, lFoot and rFoot. A single arm, forearm, leg or lower leg keeps the full source frame dimensions and pixel coordinates, with everything outside its limb mask blacked out. A single helmet, head, eyes, mouth, torso, hand or foot comes out as its tight rectangle crop. Black source pixels do not shrink the bounds. Repeated names select the part once. An empty list yields a 0x0 image with confidence 0 for each pose. An unrecognised name is rejected.out_0 holds one tuple per input pose, in pose order. A pose whose kept parts locate no pixel (keypoints below the extractor's fixed 0.3 visibility, or a part region lying wholly outside the frame) yields a 0x0 Image with confidence 0, never a stand-in picture; downstream must accept an empty Image or gate on the confidence.min_confidence applies only with several selected parts: parts below it are dropped before combining, except the strongest part, which is always kept. A single target is returned whatever its confidence. The strongest part can still locate nothing, so a low-confidence pose can yield the empty result above.targets is mirrored when the subject faces their own left. The facing test compares the x positions of both eyes and the nose without checking their confidence, so an undetected eye or nose can flip it the wrong way; both eyes are also levelled to the lower eye's height before the region is cut.stacking_method set to merge_masks, that crop stays at its original frame position.stacking_method set to merge_masks adds the positioned crops for targets as 8-bit pixels, so where parts overlap (eyes or mouth inside head, helmet over head) the pixel values add up and saturate at 255, brightening the overlap.stacking_method set to merge_masks uses the union of the kept crops' geometry. Both stacks concatenate those same tight crops, with black padding to the largest width or height. Black clothing remains a region with its confidence. With one target, every stacking method keeps that region's declared shape. The [(Image, Double)] output carries the region and confidence: a single limb canvas aligns directly with the source frame, while rectangle and composite crops carry no frame origin.Landmarks2d.Human22 schema; other keypoint conventions need a converter ahead of this component.live-test prerelease
Automated release