This folder provides multiple 2D human pose estimation samples. The scene is PoseEstimation/PoseEstimationSample.unity with controller PoseEstimation/AiliaPoseEstimatorsSample.cs.
-
Lightweight Human Pose Estimation
- Purpose: Real‑time 2D keypoint estimation with a lightweight backbone.
- Sources:
./AiliaPoseEstimatorsSample.cs - Script behavior: Opens a single ONNX pose model (opt variant), runs inference on camera frames, and draws skeletons.
-
BlazePose Full Body
- Purpose: Google’s two‑stage pose detection and landmark estimation (33 keypoints).
- Sources:
./AiliaBlazepose.cs,./AiliaPoseEstimatorsSample.cs - Script behavior: Loads detection and landmark ONNX models, performs region‑of‑interest cropping between stages, and tracks pose across frames. Includes environment fallback to avoid FP16 issues on some GPUs.
-
PoseResNet (+ detector)
- Purpose: High‑accuracy top‑down pose estimation.
- Sources:
./AiliaPoseResnet.cs,./AiliaPoseEstimatorsSample.cs - Script behavior: Uses a detection model to get person boxes, then runs a PoseResNet on each crop and stitches the results back to the image.
-
MediaPipe Pose World Landmarks
- Purpose: Google MediaPipe two‑stage pose estimation with world‑coordinate 3D landmarks (33 keypoints).
- Sources:
./AiliaMediapipePoseWorldLandmarks.cs,./MediapipePoseWorldEngine.cs,./AiliaPoseEstimatorsSample.cs - Script behavior: Loads pose detection and landmark heavy ONNX models. Detects pose bounding box, extracts ROI via GPU ComputeShader, estimates 33 3D landmarks in both image and world coordinates. Engine logic is separated into
MediapipePoseWorldEnginefor testability.
-
E2Pose (End‑to‑End)
- Purpose: One‑shot end‑to‑end pose estimation (no separate detector required).
- Sources:
./AiliaE2Pose.cs,./AiliaPoseEstimatorsSample.cs - Script behavior: Opens a single ONNX, preprocesses input to the required resolution, runs inference, and decodes keypoints.
- Models are downloaded into
Application.temporaryCachePathviaAiliaDownloadunder the folders referenced in code (e.g.,blazepose_fullbody,pose_resnet,e2pose).
- Choose a pipeline:
- Top‑down (detector + pose): use
AiliaPoseResnetpattern. - Two‑stage (detection + landmark): use
AiliaBlazepose. - Two‑stage with world coordinates: use
MediapipePoseWorldEngine+IMediapipePoseBackend. - Single‑stage: use
AiliaE2Pose.
- Top‑down (detector + pose): use
- Steps:
- Open required model files with
AiliaModel.OpenFile(proto, onnx)(for multi‑stage, open both models). - Prepare input using the provided
TexturePreprocessoror the inline CPU paths from the sample. - Run inference and decode keypoints; draw lines/circles for visualization.
- Open required model files with
- Sample controller:
./AiliaPoseEstimatorsSample.cs - BlazePose:
./AiliaBlazepose.cs - PoseResNet:
./AiliaPoseResnet.cs - MediaPipe Pose World:
./AiliaMediapipePoseWorldLandmarks.cs,./MediapipePoseWorldEngine.cs - E2Pose:
./AiliaE2Pose.cs