# seleemicker/yoga_pose_classification architecture

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

- Interactive diagram: https://gitdiagram.com/seleemicker/yoga_pose_classification
- Repository: https://github.com/seleemicker/yoga_pose_classification

## Overview

This repository provides a Colab-oriented landmark extraction workflow and a real-time webcam pose classifier for five yoga poses. Training data is processed into landmark rows; the live script captures frames, detects landmarks, classifies pose probabilities, smooths predictions, and displays labels and confidence. The README describes trained model and encoder assets, but those files are not in the repository tree. The sampled estimation script extracts landmarks; it does not show classifier training. The camera-check script is a separate diagnostic. Relationships reflect the README and sampled source; no unsampled implementation is assumed.

Main entry points: [`yoga_pose_webcam.py`](https://github.com/seleemicker/yoga_pose_classification/blob/main/yoga_pose_webcam.py) (Pose Detection), [`yoga_pose_estimation.py`](https://github.com/seleemicker/yoga_pose_classification/blob/main/yoga_pose_estimation.py) (Landmark Extraction), [`open_camera.py`](https://github.com/seleemicker/yoga_pose_classification/blob/main/open_camera.py) (Camera Check)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_prep["Landmark Preparation"]
  node_dataset[("Pose Images")]
  node_extract["Landmark Extraction"]
  node_csv["Landmark CSV"]
end

subgraph group_live["Live Classification"]
  node_capture["Frame Capture"]
  node_preprocess["Frame Preprocessing"]
  node_detector["Pose Detection"]
  node_features["Feature Encoding"]
  node_model["Keras Classifier"]
  node_smoothing["Prediction Smoothing"]
  node_overlay["Pose Overlay"]
  node_display["Live Display"]
end

subgraph group_diagnostics["Camera Diagnostic"]
  node_camera_check["Camera Check<br/>[open_camera.py]"]
end

node_user(("User"))
node_camera["Webcam"]
node_encoder["Label Encoder"]

node_dataset -->|"provides images"| node_extract
node_extract -->|"writes landmarks"| node_csv
node_user -.->|"uses"| node_camera
node_camera -->|"supplies frames"| node_capture
node_capture -->|"flips and converts"| node_preprocess
node_preprocess -->|"detects landmarks"| node_detector
node_detector -->|"provides landmarks"| node_features
node_features -->|"predicts probabilities"| node_model
node_model -->|"returns probabilities"| node_smoothing
node_encoder -->|"maps class indices"| node_smoothing
node_smoothing -->|"provides label and confidence"| node_overlay
node_detector -->|"provides landmarks"| node_overlay
node_overlay -->|"renders frame"| node_display
node_camera -->|"supplies frames"| node_camera_check

click node_extract "https://github.com/seleemicker/yoga_pose_classification/blob/main/yoga_pose_estimation.py"
click node_capture "https://github.com/seleemicker/yoga_pose_classification/blob/main/yoga_pose_webcam.py"
click node_preprocess "https://github.com/seleemicker/yoga_pose_classification/blob/main/yoga_pose_webcam.py"
click node_detector "https://github.com/seleemicker/yoga_pose_classification/blob/main/yoga_pose_webcam.py"
click node_features "https://github.com/seleemicker/yoga_pose_classification/blob/main/yoga_pose_webcam.py"
click node_smoothing "https://github.com/seleemicker/yoga_pose_classification/blob/main/yoga_pose_webcam.py"
click node_overlay "https://github.com/seleemicker/yoga_pose_classification/blob/main/yoga_pose_webcam.py"
click node_display "https://github.com/seleemicker/yoga_pose_classification/blob/main/yoga_pose_webcam.py"
click node_camera_check "https://github.com/seleemicker/yoga_pose_classification/blob/main/open_camera.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_dataset,node_extract,node_csv,node_user toneBlue
class node_capture,node_preprocess,node_detector,node_features,node_model,node_smoothing,node_overlay,node_display toneAmber
class node_camera_check toneMint
class node_camera,node_encoder toneIndigo
```

## Components

### Landmark Preparation

- **Pose Images**
- [Landmark Extraction](https://github.com/seleemicker/yoga_pose_classification/blob/main/yoga_pose_estimation.py): `yoga_pose_estimation.py`
- **Landmark CSV**

### Live Classification

- [Frame Capture](https://github.com/seleemicker/yoga_pose_classification/blob/main/yoga_pose_webcam.py): `yoga_pose_webcam.py`
- [Frame Preprocessing](https://github.com/seleemicker/yoga_pose_classification/blob/main/yoga_pose_webcam.py): `yoga_pose_webcam.py`
- [Pose Detection](https://github.com/seleemicker/yoga_pose_classification/blob/main/yoga_pose_webcam.py): `yoga_pose_webcam.py`
- [Feature Encoding](https://github.com/seleemicker/yoga_pose_classification/blob/main/yoga_pose_webcam.py): `yoga_pose_webcam.py`
- **Keras Classifier**
- [Prediction Smoothing](https://github.com/seleemicker/yoga_pose_classification/blob/main/yoga_pose_webcam.py): `yoga_pose_webcam.py`
- [Pose Overlay](https://github.com/seleemicker/yoga_pose_classification/blob/main/yoga_pose_webcam.py): `yoga_pose_webcam.py`
- [Live Display](https://github.com/seleemicker/yoga_pose_classification/blob/main/yoga_pose_webcam.py): `yoga_pose_webcam.py`

### Camera Diagnostic

- [Camera Check](https://github.com/seleemicker/yoga_pose_classification/blob/main/open_camera.py): `open_camera.py`

### Other components

- **User**
- **Webcam**
- **Label Encoder**

## Connections

- Pose Images → Landmark Extraction: provides images (evidence: `yoga_pose_estimation.py`)
- Landmark Extraction → Landmark CSV: writes landmarks (evidence: `yoga_pose_estimation.py`)
- User → Webcam: uses
- Webcam → Frame Capture: supplies frames (evidence: `yoga_pose_webcam.py`)
- Frame Capture → Frame Preprocessing: flips and converts (evidence: `yoga_pose_webcam.py`)
- Frame Preprocessing → Pose Detection: detects landmarks (evidence: `yoga_pose_webcam.py`)
- Pose Detection → Feature Encoding: provides landmarks (evidence: `yoga_pose_webcam.py`)
- Feature Encoding → Keras Classifier: predicts probabilities (evidence: `yoga_pose_webcam.py`)
- Keras Classifier → Prediction Smoothing: returns probabilities (evidence: `yoga_pose_webcam.py`)
- Label Encoder → Prediction Smoothing: maps class indices (evidence: `yoga_pose_webcam.py`)
- Prediction Smoothing → Pose Overlay: provides label and confidence (evidence: `yoga_pose_webcam.py`)
- Pose Detection → Pose Overlay: provides landmarks (evidence: `yoga_pose_webcam.py`)
- Pose Overlay → Live Display: renders frame (evidence: `yoga_pose_webcam.py`)
- Webcam → Camera Check: supplies frames (evidence: `open_camera.py`)
