# e-roe/pointnet_hands architecture

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

- Interactive diagram: https://gitdiagram.com/e-roe/pointnet_hands
- Repository: https://github.com/e-roe/pointnet_hands

## Overview

##### Project Type and Purpose
- From the file tree and README: this is a small end-to-end machine-learning pipeline for 3D hand point-cloud processing using PointNet.
- Key functions: data preparation, model definition/training, and model inference/serving.

##### File Structure
- Top-level directories:
- configs: holds configuration (hyperparameters, paths).
- src: contains all Python scripts for data creation, transforms, model code, training, prediction, and utilities.
- Files in src:
- create_points_data.py – ingests raw hand data → produces point-cloud dataset.
- transforms_3d.py – defines data augmentation/transformation routines.
- utils.py – shared helper functions (I/O, logging, metrics).
- point_net.py – neural-network architecture (PointNet) implementation.
- train_model.py – orchestrates training loop, uses config, data loader, transforms, point_net, utils.
- pointnet_prediction.py – loads trained model and runs inference on new data.

##### README
- README only gives the project name, but your code structure reveals the three primary phases: data prep, training, inference.

##### Main Components
a. Configuration Component
- Represented by configs/config.yaml. Supplies hyperparameters and paths to all other components.
b. Data Preparation Component
- create_points_data.py
- transforms_3d.py
- utils.py (I/O)
c. Model Definition Component
- point_net.py (PointNet architecture)
d. Training Pipeline Component
- train_model.py
- Consumes: configuration + prepared data + transforms + model definition + utils
- Produces: trained model checkpoint/artifacts
e. Inference Pipeline Component
- pointnet_prediction.py
- Consumes: trained model checkpoint + new input data + transforms + utils

##### Relationships and Data Flows
- Data Prep → Training (prepared dataset).
- point_net.py → Training (architecture used).
- Training → Model Artifacts → Inference.
- transforms_3d & utils → both Training and Inference.

##### Architectural Patterns and Principles
- Modular separation:
- Data ingestion & augmentation separated from model logic.
- Single source of truth for config.
- Reusability: transforms_3d and utils are shared across train/inference.
- Clear pipeline stages: Prepare → Train → Serve.

##### Technologies and Frameworks to Annotate
- Python 3.x
- PyTorch (likely, inferred from typical PointNet usage)
- YAML for config
- NumPy, SciPy (for transforms), possibly Open3D or other 3D libs

## Diagram (Mermaid)

```mermaid
flowchart TD
    Config["Config\nconfigs/config.yaml"]:::config

    subgraph "Data Preparation"
        direction TB
        CreateData["create_points_data.py"]:::dataPrep
        Transforms["transforms_3d.py"]:::dataPrep
        Utils["utils.py"]:::dataPrep
    end

    subgraph "Model Definition"
        direction TB
        PointNet["point_net.py"]:::model
    end

    subgraph "Training Pipeline"
        direction TB
        Train["train_model.py"]:::training
        ModelCheckpoint["Model Checkpoint"]:::training
    end

    subgraph "Inference Pipeline"
        direction TB
        Predict["pointnet_prediction.py"]:::inference
    end

    Config --> CreateData
    Config --> Transforms
    Config --> Utils
    Config --> PointNet
    Config --> Train
    Config --> Predict

    CreateData -->|raw-data→point-cloud dataset| Train
    Transforms --> Train
    Utils --> Train
    PointNet --> Train

    Train -->|model checkpoint| ModelCheckpoint
    ModelCheckpoint --> Predict
    Transforms --> Predict
    Utils --> Predict

    click Config "https://github.com/e-roe/pointnet_hands/blob/main/configs/config.yaml"
    click CreateData "https://github.com/e-roe/pointnet_hands/blob/main/src/create_points_data.py"
    click Transforms "https://github.com/e-roe/pointnet_hands/blob/main/src/transforms_3d.py"
    click Utils "https://github.com/e-roe/pointnet_hands/blob/main/src/utils.py"
    click PointNet "https://github.com/e-roe/pointnet_hands/blob/main/src/point_net.py"
    click Train "https://github.com/e-roe/pointnet_hands/blob/main/src/train_model.py"
    click Predict "https://github.com/e-roe/pointnet_hands/blob/main/src/pointnet_prediction.py"

    classDef config fill:#f2f2f2,stroke:#333,stroke-width:1px;
    classDef dataPrep fill:#cce5ff,stroke:#333,stroke-width:1px;
    classDef model fill:#d4edda,stroke:#333,stroke-width:1px;
    classDef training fill:#ffe5cc,stroke:#333,stroke-width:1px;
    classDef inference fill:#e2ccff,stroke:#333,stroke-width:1px;
```
