# goyaltrishita/human-pose-detection-opencv architecture

> Architecture diagram of the GitHub repository goyaltrishita/human-pose-detection-opencv, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-09-29). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/goyaltrishita/human-pose-detection-opencv
- Repository: https://github.com/goyaltrishita/human-pose-detection-opencv

## Overview

This small Colab-oriented application detects 18 body keypoints in an image, filters them by confidence, draws skeletal connections, and displays the annotated image. The sampled Python source supports the processing stages shown; the README also documents a notebook workflow, but the notebook contents were not inspected.

Main entry points: [`human_pose_detection.py`](https://github.com/goyaltrishita/human-pose-detection-opencv/blob/main/human_pose_detection.py) (Load inputs), [`human_pose_detection.ipynb`](https://github.com/goyaltrishita/human-pose-detection-opencv/blob/main/human_pose_detection.ipynb) (Notebook workflow)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_processing["Pose processing"]
  node_python["Python runner"]
  node_notebook["Notebook workflow"]
  node_load["Load inputs"]
  node_preprocess["Create input blob"]
  node_inference["DNN inference"]
  node_keypoints["Decode keypoints"]
  node_skeleton["Draw skeleton"]
  node_display["Show result"]
end

subgraph group_inputs["Inputs and output"]
  node_image["Input image"]
  node_model["TensorFlow pose model"]
  node_result["Annotated image"]
end

node_user(("Colab user"))
node_opencv["OpenCV DNN"]

node_user -->|"runs"| node_python
node_user -.->|"runs"| node_notebook
node_python -->|"executes"| node_load
node_load -->|"reads"| node_image
node_load -->|"loads"| node_model
node_load -->|"passes image"| node_preprocess
node_preprocess -->|"creates blob"| node_inference
node_inference -->|"calls"| node_opencv
node_model -->|"loaded by"| node_opencv
node_opencv -->|"returns heatmaps"| node_inference
node_inference -->|"provides heatmaps"| node_keypoints
node_keypoints -->|"provides points"| node_skeleton
node_skeleton -->|"annotates image"| node_display
node_display -->|"shows"| node_result

click node_python "https://github.com/goyaltrishita/human-pose-detection-opencv/blob/main/human_pose_detection.py"
click node_notebook "https://github.com/goyaltrishita/human-pose-detection-opencv/blob/main/human_pose_detection.ipynb"
click node_load "https://github.com/goyaltrishita/human-pose-detection-opencv/blob/main/human_pose_detection.py"
click node_preprocess "https://github.com/goyaltrishita/human-pose-detection-opencv/blob/main/human_pose_detection.py"
click node_inference "https://github.com/goyaltrishita/human-pose-detection-opencv/blob/main/human_pose_detection.py"
click node_keypoints "https://github.com/goyaltrishita/human-pose-detection-opencv/blob/main/human_pose_detection.py"
click node_skeleton "https://github.com/goyaltrishita/human-pose-detection-opencv/blob/main/human_pose_detection.py"
click node_display "https://github.com/goyaltrishita/human-pose-detection-opencv/blob/main/human_pose_detection.py"

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_python,node_notebook,node_load,node_preprocess,node_inference,node_keypoints,node_skeleton,node_display,node_user toneBlue
class node_image,node_model,node_result toneAmber
class node_opencv toneIndigo
```

## Components

### Pose processing

- [Python runner](https://github.com/goyaltrishita/human-pose-detection-opencv/blob/main/human_pose_detection.py): `human_pose_detection.py`
- [Notebook workflow](https://github.com/goyaltrishita/human-pose-detection-opencv/blob/main/human_pose_detection.ipynb): `human_pose_detection.ipynb`
- [Load inputs](https://github.com/goyaltrishita/human-pose-detection-opencv/blob/main/human_pose_detection.py): `human_pose_detection.py`
- [Create input blob](https://github.com/goyaltrishita/human-pose-detection-opencv/blob/main/human_pose_detection.py): `human_pose_detection.py`
- [DNN inference](https://github.com/goyaltrishita/human-pose-detection-opencv/blob/main/human_pose_detection.py): `human_pose_detection.py`
- [Decode keypoints](https://github.com/goyaltrishita/human-pose-detection-opencv/blob/main/human_pose_detection.py): `human_pose_detection.py`
- [Draw skeleton](https://github.com/goyaltrishita/human-pose-detection-opencv/blob/main/human_pose_detection.py): `human_pose_detection.py`
- [Show result](https://github.com/goyaltrishita/human-pose-detection-opencv/blob/main/human_pose_detection.py): `human_pose_detection.py`

### Inputs and output

- **Input image**
- **TensorFlow pose model**
- **Annotated image**

### Other components

- **Colab user**
- **OpenCV DNN**

## Connections

- Colab user → Python runner: runs
- Colab user → Notebook workflow: runs
- Python runner → Load inputs: executes
- Load inputs → Input image: reads
- Load inputs → TensorFlow pose model: loads
- Load inputs → Create input blob: passes image
- Create input blob → DNN inference: creates blob
- DNN inference → OpenCV DNN: calls
- TensorFlow pose model → OpenCV DNN: loaded by
- OpenCV DNN → DNN inference: returns heatmaps
- DNN inference → Decode keypoints: provides heatmaps
- Decode keypoints → Draw skeleton: provides points
- Draw skeleton → Show result: annotates image
- Show result → Annotated image: shows
