# ch-mengsrun/individual-project-report-ai-robotics-project- architecture

> Architecture diagram of the GitHub repository ch-mengsrun/individual-project-report-ai-robotics-project-, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-24). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/ch-mengsrun/individual-project-report-ai-robotics-project-
- Repository: https://github.com/ch-mengsrun/individual-project-report-ai-robotics-project-

## Overview

This repository implements a landmark-based hand-gesture recognition workflow, with an optional robot-control runtime. Data collection produces labeled landmark samples; training fits a classifier and scaler; conversion exports a TensorFlow Lite model; inference uses camera input, while robot control maps predictions to motor actions. The README is only a title, so capabilities are based on the sampled source. One path mismatch is notable: training defaults to `dataset/landmarks/...`, while the tracked CSV is under `datasets/landmarks/...`.

Main entry points: [`model_training.py`](https://github.com/ch-mengsrun/individual-project-report-ai-robotics-project-/blob/main/model_training.py) (Model trainer), [`robot_control.py`](https://github.com/ch-mengsrun/individual-project-report-ai-robotics-project-/blob/main/robot_control.py) (Gesture controller), [`realtime_inference.py`](https://github.com/ch-mengsrun/individual-project-report-ai-robotics-project-/blob/main/realtime_inference.py) (Live recognizer), [`data_collection.py`](https://github.com/ch-mengsrun/individual-project-report-ai-robotics-project-/blob/main/data_collection.py) (Landmark collector)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_data["Data capture"]
  node_collector["Landmark collector<br/>[data_collection.py]"]
  node_dataset["Labeled landmarks"]
end

subgraph group_model["Model lifecycle"]
  node_trainer["Model trainer<br/>[model_training.py]"]
  node_keras_model["Keras model"]
  node_best_model["Best checkpoint"]
  node_scaler["Feature scaler<br/>[scaler.pkl]"]
  node_converter["TFLite converter"]
  node_tflite_model["Float16 model"]
end

subgraph group_runtime["Recognition runtime"]
  node_recognizer["Live recognizer"]
end

subgraph group_robot["Robot control"]
  node_robot_controller["Gesture controller<br/>[robot_control.py]"]
end

node_operator(("Operator"))
node_camera["Camera"]
node_robot["AUPPBot hardware"]

node_operator -->|"selects gestures"| node_collector
node_camera -->|"provides frames"| node_collector
node_collector -->|"appends samples"| node_dataset
node_operator -.->|"starts training"| node_trainer
node_trainer -->|"loads samples"| node_dataset
node_trainer -->|"saves model"| node_keras_model
node_trainer -->|"checkpoints model"| node_best_model
node_trainer -->|"saves scaler"| node_scaler
node_converter -->|"loads model"| node_keras_model
node_converter -->|"writes model"| node_tflite_model
node_camera -->|"provides frames"| node_recognizer
node_recognizer -->|"loads model"| node_tflite_model
node_recognizer -->|"loads scaler"| node_scaler
node_camera -->|"provides frames"| node_robot_controller
node_robot_controller -->|"loads model"| node_tflite_model
node_robot_controller -->|"loads scaler"| node_scaler
node_robot_controller -->|"commands motors"| node_robot

click node_collector "https://github.com/ch-mengsrun/individual-project-report-ai-robotics-project-/blob/main/data_collection.py"
click node_dataset "https://github.com/ch-mengsrun/individual-project-report-ai-robotics-project-/blob/main/datasets/landmarks/landmarks_dataset.csv"
click node_trainer "https://github.com/ch-mengsrun/individual-project-report-ai-robotics-project-/blob/main/model_training.py"
click node_keras_model "https://github.com/ch-mengsrun/individual-project-report-ai-robotics-project-/blob/main/models/gesture_landmark_model.h5"
click node_best_model "https://github.com/ch-mengsrun/individual-project-report-ai-robotics-project-/blob/main/models/best_landmark_model.h5"
click node_scaler "https://github.com/ch-mengsrun/individual-project-report-ai-robotics-project-/blob/main/models/scaler.pkl"
click node_converter "https://github.com/ch-mengsrun/individual-project-report-ai-robotics-project-/blob/main/tflite_conversion.py"
click node_tflite_model "https://github.com/ch-mengsrun/individual-project-report-ai-robotics-project-/blob/main/models/gesture_landmark_float16.tflite"
click node_recognizer "https://github.com/ch-mengsrun/individual-project-report-ai-robotics-project-/blob/main/realtime_inference.py"
click node_robot_controller "https://github.com/ch-mengsrun/individual-project-report-ai-robotics-project-/blob/main/robot_control.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_collector,node_dataset toneBlue
class node_trainer,node_keras_model,node_best_model,node_scaler,node_converter,node_tflite_model toneAmber
class node_recognizer toneMint
class node_robot_controller toneRose
class node_operator,node_camera,node_robot toneIndigo
```

## Components

### Data capture

- [Landmark collector](https://github.com/ch-mengsrun/individual-project-report-ai-robotics-project-/blob/main/data_collection.py): `data_collection.py`
- [Labeled landmarks](https://github.com/ch-mengsrun/individual-project-report-ai-robotics-project-/blob/main/datasets/landmarks/landmarks_dataset.csv): `datasets/landmarks/landmarks_dataset.csv`

### Model lifecycle

- [Model trainer](https://github.com/ch-mengsrun/individual-project-report-ai-robotics-project-/blob/main/model_training.py): `model_training.py`
- [Keras model](https://github.com/ch-mengsrun/individual-project-report-ai-robotics-project-/blob/main/models/gesture_landmark_model.h5): `models/gesture_landmark_model.h5`
- [Best checkpoint](https://github.com/ch-mengsrun/individual-project-report-ai-robotics-project-/blob/main/models/best_landmark_model.h5): `models/best_landmark_model.h5`
- [Feature scaler](https://github.com/ch-mengsrun/individual-project-report-ai-robotics-project-/blob/main/models/scaler.pkl): `models/scaler.pkl`
- [TFLite converter](https://github.com/ch-mengsrun/individual-project-report-ai-robotics-project-/blob/main/tflite_conversion.py): `tflite_conversion.py`
- [Float16 model](https://github.com/ch-mengsrun/individual-project-report-ai-robotics-project-/blob/main/models/gesture_landmark_float16.tflite): `models/gesture_landmark_float16.tflite`

### Recognition runtime

- [Live recognizer](https://github.com/ch-mengsrun/individual-project-report-ai-robotics-project-/blob/main/realtime_inference.py): `realtime_inference.py`

### Robot control

- [Gesture controller](https://github.com/ch-mengsrun/individual-project-report-ai-robotics-project-/blob/main/robot_control.py): `robot_control.py`

### Other components

- **Operator**
- **Camera**
- **AUPPBot hardware**

## Connections

- Operator → Landmark collector: selects gestures (evidence: `data_collection.py`)
- Camera → Landmark collector: provides frames (evidence: `data_collection.py`)
- Landmark collector → Labeled landmarks: appends samples (evidence: `data_collection.py`)
- Operator → Model trainer: starts training
- Model trainer → Labeled landmarks: loads samples (evidence: `model_training.py`)
- Model trainer → Keras model: saves model (evidence: `model_training.py`)
- Model trainer → Best checkpoint: checkpoints model (evidence: `model_training.py`)
- Model trainer → Feature scaler: saves scaler (evidence: `model_training.py`)
- TFLite converter → Keras model: loads model (evidence: `tflite_conversion.py`)
- TFLite converter → Float16 model: writes model (evidence: `tflite_conversion.py`)
- Camera → Live recognizer: provides frames (evidence: `realtime_inference.py`)
- Live recognizer → Float16 model: loads model (evidence: `realtime_inference.py`)
- Live recognizer → Feature scaler: loads scaler (evidence: `realtime_inference.py`)
- Camera → Gesture controller: provides frames (evidence: `robot_control.py`)
- Gesture controller → Float16 model: loads model (evidence: `robot_control.py`)
- Gesture controller → Feature scaler: loads scaler (evidence: `robot_control.py`)
- Gesture controller → AUPPBot hardware: commands motors (evidence: `robot_control.py`)
