# httpspycharmhelpers/poseestimate-android architecture

> Architecture diagram of the GitHub repository httpspycharmhelpers/poseestimate-android, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-13). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/httpspycharmhelpers/poseestimate-android
- Repository: https://github.com/httpspycharmhelpers/poseestimate-android

## Overview

PoseEstimate-Android is a live-camera pose and object-analysis app. Users choose a detection mode, view camera results with overlays, and can use pose landmarks for jump-rope counting or pose comparison. The README documents ML Kit and YOLO modes, ONNX and ncnn runtimes, settings, and error logs. The JNI/ncnn boundary and model-specific native implementations are supported by excerpts; most Java-side wiring is unsampled, so those links are limited to documented relationships.

Main entry points: [`android/app/src/main/java/com/google/mlkit/vision/demo/java/LivePreviewActivity.java`](https://github.com/httpspycharmhelpers/poseestimate-android/blob/main/android/app/src/main/java/com/google/mlkit/vision/demo/java/LivePreviewActivity.java) (Live preview), [`android/app/src/main/jni/ncnn_bridge.cpp`](https://github.com/httpspycharmhelpers/poseestimate-android/blob/main/android/app/src/main/jni/ncnn_bridge.cpp) (JNI bridge), [`android/app/src/main/java/com/google/mlkit/vision/demo/java/posedetector/PoseDetectorProcessor.java`](https://github.com/httpspycharmhelpers/poseestimate-android/blob/main/android/app/src/main/java/com/google/mlkit/vision/demo/java/posedetector/PoseDetectorProcessor.java) (ML Kit pose), [`android/app/src/main/java/com/google/mlkit/vision/demo/GraphicOverlay.java`](https://github.com/httpspycharmhelpers/poseestimate-android/blob/main/android/app/src/main/java/com/google/mlkit/vision/demo/GraphicOverlay.java) (Result overlays)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_capture["Capture and interface"]
  node_entry["Mode selection"]
  node_preview["Live preview"]
  node_camera["Camera capture<br/>[CameraSource.java]"]
  node_overlay["Result overlays"]
  node_settings["Mode settings"]
  node_errors["Error logs"]
end

subgraph group_analysis["Pose and activity analysis"]
  node_jump["Jump-rope counting"]
  node_compare["Pose comparison"]
  node_alignment["Pose alignment<br/>[PoseAlignment.java]"]
  node_smooth["Coordinate smoothing"]
end

subgraph group_runtimes["Inference runtimes"]
  node_mlkit["ML Kit pose"]
  node_onnxpose["YOLO pose ONNX"]
  node_onnxdet["YOLO object ONNX"]
  node_ncnnjava["ncnn Java adapter<br/>[NcnnYolo11.java]"]
  node_models["Bundled models"]
end

subgraph group_native["Native ncnn engine"]
  node_bridge["JNI bridge<br/>[ncnn_bridge.cpp]"]
  node_det["Detection engine<br/>[yolo11_det.cpp]"]
  node_seg["Segmentation engine<br/>[yolo11_seg.cpp]"]
  node_pose["Pose engine<br/>[yolo11_pose.cpp]"]
  node_cls["Classification engine<br/>[yolo11_cls.cpp]"]
  node_obb["Oriented-box engine<br/>[yolo11_obb.cpp]"]
end

node_user(("App user"))

node_user -->|"chooses mode"| node_entry
node_entry -.->|"opens preview"| node_preview
node_preview -.->|"captures frames"| node_camera
node_preview -.->|"reads preferences"| node_settings
node_preview -.->|"runs pose mode"| node_mlkit
node_preview -.->|"runs pose mode"| node_onnxpose
node_preview -.->|"runs YOLO mode"| node_onnxdet
node_preview -.->|"runs ncnn mode"| node_ncnnjava
node_ncnnjava -.->|"calls JNI"| node_bridge
node_bridge -->|"dispatches detection"| node_det
node_bridge -->|"dispatches segmentation"| node_seg
node_bridge -->|"dispatches pose"| node_pose
node_bridge -->|"dispatches classification"| node_cls
node_bridge -->|"dispatches oriented boxes"| node_obb
node_models -.->|"loads ncnn assets"| node_bridge
node_mlkit -.->|"draws landmarks"| node_overlay
node_onnxpose -.->|"draws pose"| node_overlay
node_onnxdet -.->|"draws detections"| node_overlay
node_ncnnjava -.->|"shows results"| node_overlay
node_mlkit -.->|"provides landmarks"| node_jump
node_mlkit -.->|"provides pose"| node_compare
node_compare -.->|"uses alignment"| node_alignment
node_mlkit -.->|"smooths coordinates"| node_smooth
node_preview -.->|"reports errors"| node_errors

click node_entry "https://github.com/httpspycharmhelpers/poseestimate-android/blob/main/android/app/src/main/java/com/google/mlkit/vision/demo/EntryChoiceActivity.kt"
click node_preview "https://github.com/httpspycharmhelpers/poseestimate-android/blob/main/android/app/src/main/java/com/google/mlkit/vision/demo/java/LivePreviewActivity.java"
click node_camera "https://github.com/httpspycharmhelpers/poseestimate-android/blob/main/android/app/src/main/java/com/google/mlkit/vision/demo/CameraSource.java"
click node_overlay "https://github.com/httpspycharmhelpers/poseestimate-android/blob/main/android/app/src/main/java/com/google/mlkit/vision/demo/GraphicOverlay.java"
click node_settings "https://github.com/httpspycharmhelpers/poseestimate-android/blob/main/android/app/src/main/java/com/google/mlkit/vision/demo/preference/PreferenceUtils.java"
click node_errors "https://github.com/httpspycharmhelpers/poseestimate-android/blob/main/android/app/src/main/java/com/google/mlkit/vision/demo/TerminalActivity.java"
click node_mlkit "https://github.com/httpspycharmhelpers/poseestimate-android/blob/main/android/app/src/main/java/com/google/mlkit/vision/demo/java/posedetector/PoseDetectorProcessor.java"
click node_onnxpose "https://github.com/httpspycharmhelpers/poseestimate-android/blob/main/android/app/src/main/java/com/google/mlkit/vision/demo/java/posedetector/YoloPoseProcessor.java"
click node_onnxdet "https://github.com/httpspycharmhelpers/poseestimate-android/blob/main/android/app/src/main/java/com/google/mlkit/vision/demo/java/yolo/ImportedOnnxProcessor.java"
click node_ncnnjava "https://github.com/httpspycharmhelpers/poseestimate-android/blob/main/android/app/src/main/java/com/google/mlkit/vision/demo/java/ncnn/NcnnYolo11.java"
click node_bridge "https://github.com/httpspycharmhelpers/poseestimate-android/blob/main/android/app/src/main/jni/ncnn_bridge.cpp"
click node_det "https://github.com/httpspycharmhelpers/poseestimate-android/blob/main/android/app/src/main/jni/yolo11_det.cpp"
click node_seg "https://github.com/httpspycharmhelpers/poseestimate-android/blob/main/android/app/src/main/jni/yolo11_seg.cpp"
click node_pose "https://github.com/httpspycharmhelpers/poseestimate-android/blob/main/android/app/src/main/jni/yolo11_pose.cpp"
click node_cls "https://github.com/httpspycharmhelpers/poseestimate-android/blob/main/android/app/src/main/jni/yolo11_cls.cpp"
click node_obb "https://github.com/httpspycharmhelpers/poseestimate-android/blob/main/android/app/src/main/jni/yolo11_obb.cpp"
click node_jump "https://github.com/httpspycharmhelpers/poseestimate-android/blob/main/android/app/src/main/java/com/google/mlkit/vision/demo/java/jumprope/JumpRopeAdapter.java"
click node_compare "https://github.com/httpspycharmhelpers/poseestimate-android/blob/main/android/app/src/main/java/com/google/mlkit/vision/demo/java/posedetector/PoseComparison.java"
click node_alignment "https://github.com/httpspycharmhelpers/poseestimate-android/blob/main/android/app/src/main/java/com/google/mlkit/vision/demo/java/posedetector/PoseAlignment.java"
click node_smooth "https://github.com/httpspycharmhelpers/poseestimate-android/blob/main/code/CoordsSmoothening.java"
click node_models "https://github.com/httpspycharmhelpers/poseestimate-android/tree/main/android/app/src/main/assets"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_entry,node_preview,node_camera,node_overlay,node_settings,node_errors,node_user toneBlue
class node_jump,node_compare,node_alignment,node_smooth toneAmber
class node_mlkit,node_onnxpose,node_onnxdet,node_ncnnjava,node_models toneMint
class node_bridge,node_det,node_seg,node_pose,node_cls,node_obb toneRose
```

## Components

### Capture and interface

- [Mode selection](https://github.com/httpspycharmhelpers/poseestimate-android/blob/main/android/app/src/main/java/com/google/mlkit/vision/demo/EntryChoiceActivity.kt): `android/app/src/main/java/com/google/mlkit/vision/demo/EntryChoiceActivity.kt`
- [Live preview](https://github.com/httpspycharmhelpers/poseestimate-android/blob/main/android/app/src/main/java/com/google/mlkit/vision/demo/java/LivePreviewActivity.java): `android/app/src/main/java/com/google/mlkit/vision/demo/java/LivePreviewActivity.java`
- [Camera capture](https://github.com/httpspycharmhelpers/poseestimate-android/blob/main/android/app/src/main/java/com/google/mlkit/vision/demo/CameraSource.java): `android/app/src/main/java/com/google/mlkit/vision/demo/CameraSource.java`
- [Result overlays](https://github.com/httpspycharmhelpers/poseestimate-android/blob/main/android/app/src/main/java/com/google/mlkit/vision/demo/GraphicOverlay.java): `android/app/src/main/java/com/google/mlkit/vision/demo/GraphicOverlay.java`
- [Mode settings](https://github.com/httpspycharmhelpers/poseestimate-android/blob/main/android/app/src/main/java/com/google/mlkit/vision/demo/preference/PreferenceUtils.java): `android/app/src/main/java/com/google/mlkit/vision/demo/preference/PreferenceUtils.java`
- [Error logs](https://github.com/httpspycharmhelpers/poseestimate-android/blob/main/android/app/src/main/java/com/google/mlkit/vision/demo/TerminalActivity.java): `android/app/src/main/java/com/google/mlkit/vision/demo/TerminalActivity.java`

### Pose and activity analysis

- [Jump-rope counting](https://github.com/httpspycharmhelpers/poseestimate-android/blob/main/android/app/src/main/java/com/google/mlkit/vision/demo/java/jumprope/JumpRopeAdapter.java): `android/app/src/main/java/com/google/mlkit/vision/demo/java/jumprope/JumpRopeAdapter.java`
- [Pose comparison](https://github.com/httpspycharmhelpers/poseestimate-android/blob/main/android/app/src/main/java/com/google/mlkit/vision/demo/java/posedetector/PoseComparison.java): `android/app/src/main/java/com/google/mlkit/vision/demo/java/posedetector/PoseComparison.java`
- [Pose alignment](https://github.com/httpspycharmhelpers/poseestimate-android/blob/main/android/app/src/main/java/com/google/mlkit/vision/demo/java/posedetector/PoseAlignment.java): `android/app/src/main/java/com/google/mlkit/vision/demo/java/posedetector/PoseAlignment.java`
- [Coordinate smoothing](https://github.com/httpspycharmhelpers/poseestimate-android/blob/main/code/CoordsSmoothening.java): `code/CoordsSmoothening.java`

### Inference runtimes

- [ML Kit pose](https://github.com/httpspycharmhelpers/poseestimate-android/blob/main/android/app/src/main/java/com/google/mlkit/vision/demo/java/posedetector/PoseDetectorProcessor.java): `android/app/src/main/java/com/google/mlkit/vision/demo/java/posedetector/PoseDetectorProcessor.java`
- [YOLO pose ONNX](https://github.com/httpspycharmhelpers/poseestimate-android/blob/main/android/app/src/main/java/com/google/mlkit/vision/demo/java/posedetector/YoloPoseProcessor.java): `android/app/src/main/java/com/google/mlkit/vision/demo/java/posedetector/YoloPoseProcessor.java`
- [YOLO object ONNX](https://github.com/httpspycharmhelpers/poseestimate-android/blob/main/android/app/src/main/java/com/google/mlkit/vision/demo/java/yolo/ImportedOnnxProcessor.java): `android/app/src/main/java/com/google/mlkit/vision/demo/java/yolo/ImportedOnnxProcessor.java`
- [ncnn Java adapter](https://github.com/httpspycharmhelpers/poseestimate-android/blob/main/android/app/src/main/java/com/google/mlkit/vision/demo/java/ncnn/NcnnYolo11.java): `android/app/src/main/java/com/google/mlkit/vision/demo/java/ncnn/NcnnYolo11.java`
- [Bundled models](https://github.com/httpspycharmhelpers/poseestimate-android/tree/main/android/app/src/main/assets): `android/app/src/main/assets`

### Native ncnn engine

- [JNI bridge](https://github.com/httpspycharmhelpers/poseestimate-android/blob/main/android/app/src/main/jni/ncnn_bridge.cpp): `android/app/src/main/jni/ncnn_bridge.cpp`
- [Detection engine](https://github.com/httpspycharmhelpers/poseestimate-android/blob/main/android/app/src/main/jni/yolo11_det.cpp): `android/app/src/main/jni/yolo11_det.cpp`
- [Segmentation engine](https://github.com/httpspycharmhelpers/poseestimate-android/blob/main/android/app/src/main/jni/yolo11_seg.cpp): `android/app/src/main/jni/yolo11_seg.cpp`
- [Pose engine](https://github.com/httpspycharmhelpers/poseestimate-android/blob/main/android/app/src/main/jni/yolo11_pose.cpp): `android/app/src/main/jni/yolo11_pose.cpp`
- [Classification engine](https://github.com/httpspycharmhelpers/poseestimate-android/blob/main/android/app/src/main/jni/yolo11_cls.cpp): `android/app/src/main/jni/yolo11_cls.cpp`
- [Oriented-box engine](https://github.com/httpspycharmhelpers/poseestimate-android/blob/main/android/app/src/main/jni/yolo11_obb.cpp): `android/app/src/main/jni/yolo11_obb.cpp`

### Other components

- **App user**

## Connections

- App user → Mode selection: chooses mode (evidence: `README.md`)
- Mode selection → Live preview: opens preview
- Live preview → Camera capture: captures frames
- Live preview → Mode settings: reads preferences
- Live preview → ML Kit pose: runs pose mode
- Live preview → YOLO pose ONNX: runs pose mode
- Live preview → YOLO object ONNX: runs YOLO mode
- Live preview → ncnn Java adapter: runs ncnn mode
- ncnn Java adapter → JNI bridge: calls JNI
- JNI bridge → Detection engine: dispatches detection (evidence: `android/app/src/main/jni/ncnn_bridge.cpp`)
- JNI bridge → Segmentation engine: dispatches segmentation (evidence: `android/app/src/main/jni/ncnn_bridge.cpp`)
- JNI bridge → Pose engine: dispatches pose (evidence: `android/app/src/main/jni/ncnn_bridge.cpp`)
- JNI bridge → Classification engine: dispatches classification (evidence: `android/app/src/main/jni/ncnn_bridge.cpp`)
- JNI bridge → Oriented-box engine: dispatches oriented boxes (evidence: `android/app/src/main/jni/ncnn_bridge.cpp`)
- Bundled models → JNI bridge: loads ncnn assets
- ML Kit pose → Result overlays: draws landmarks
- YOLO pose ONNX → Result overlays: draws pose
- YOLO object ONNX → Result overlays: draws detections
- ncnn Java adapter → Result overlays: shows results
- ML Kit pose → Jump-rope counting: provides landmarks
- ML Kit pose → Pose comparison: provides pose
- Pose comparison → Pose alignment: uses alignment
- ML Kit pose → Coordinate smoothing: smooths coordinates
- Live preview → Error logs: reports errors
