# barrydoooit/mwpose3d architecture

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

- Interactive diagram: https://gitdiagram.com/barrydoooit/mwpose3d
- Repository: https://github.com/barrydoooit/mwpose3d

## Overview

##### Project type and purpose
- This is a research-oriented full-stack Python package (“mwpose3d”) for 3D human-pose estimation on mmWave radar point clouds.
- It provides:
- A core library (mwpose3d/) containing datasets, models, runners, hooks, utils, and visualization.
- A configurable training & evaluation pipeline built on OpenMMLab’s mmengine.
- Application scripts (tools/) and GUI apps (apps/) for dataset collection and online estimation.
- Project templates (projects/) with example configs and models.

##### File structure
- Top-level directories:
- mwpose3d/: core library implementing data pipelines, model definitions, training/inference loops, evaluation, visualization, and a registry for plugins.
- configs/: default and app-specific configuration files.
- apps/: GUI applications for dataset collection and online/offline pose estimation.
- tools/: command-line scripts for data conversion, dataset inspection, training, evaluation, and containerization.
- projects/: sample research projects, each with its configs, models, and entry point.
- Patterns & frameworks:
- Plugin registry (mwpose3d/registry.py).
- Config-driven instantiation via mmengine.
- Hook-based training/inference loops (mwpose3d/runner/hooks).
- Modular dataset transforms (mwpose3d/datasets/transforms).
- Clear separation of core library and application layers.

##### Key README insights
- Emphasizes modularity, extensibility, and use of mmengine’s config system.
- Describes workflows: dataset preparation, training & evaluation, online estimation, and custom GUI apps.

##### Diagramming recommendations
- Blue: Frontends (CLI/GUI)
- Green: Core modules (data, model, runner)
- Orange: Extensions (CUDA, external services)
- Gray: Configuration & registry

## Diagram (Mermaid)

```mermaid
flowchart TD
    %% Frontends
    subgraph "Frontends"
        direction TB
        subgraph "CLI Frontends"
            direction TB
            RunApp["run_app.py"]:::frontend
            Train["train.py"]:::frontend
            Test["test.py"]:::frontend
        end
        subgraph "GUI Frontends"
            direction TB
            DCApp["dataset_collection.py"]:::frontend
            OECApp["online_estim_and_collection.py"]:::frontend
            OSEApp["online_skeleton_estim.py"]:::frontend
        end
    end

    %% Configuration & Registry
    Config["Configuration Manager"]:::config
    Registry["Registry & Factory"]:::config

    %% Data Layer
    subgraph "Data Layer"
        direction TB
        Converters["Data Converters"]:::core
        RawProc["Raw Preprocessing"]:::core
        Datasets["Dataset Classes"]:::core
        Transforms["Transform Pipeline"]:::core
        Kinect["Kinect Manager"]:::core
    end

    %% Model Layer
    subgraph "Model Layer"
        direction TB
        Backbone["Backbones"]:::core
        Layers["Layers"]:::core
        Middle["Middle Encoders"]:::core
        CudaExt["CUDA Extensions"]:::ext
    end

    %% Runner & Pipeline
    subgraph "Runner & Pipeline"
        direction TB
        TrainLoop["Training Loop"]:::core
        ValLoop["Validation Loop"]:::core
        TestLoop["Test Loop"]:::core
        BaseRunner["Base Runner"]:::core
        Hooks["Hooks"]:::core
        Inference["Inference Engine"]:::core
    end

    %% Evaluation & Postprocessing
    subgraph "Evaluation & Postprocessing"
        direction TB
        Metrics["Metrics"]:::core
        Postproc["Postprocessing Filters"]:::core
    end

    %% Visualization
    subgraph "Visualization"
        direction TB
        OfflineViz["Offline Point Cloud Viz"]:::core
        OnlineViz["Online Skeleton Viz"]:::core
    end

    %% Relationships
    RunApp -->|"load config"| Config
    Train -->|"load config"| Config
    Test -->|"load config"| Config
    DCApp -->|"load config"| Config
    OECApp -->|"load config"| Config
    OSEApp -->|"load config"| Config

    Config -->|"instantiate"| Registry
    Registry -->|"build datasets"| Datasets
    Registry -->|"build models"| Backbone
    Registry -->|"build pipelines"| BaseRunner

    Converters -->|"provide data"| Datasets
    RawProc -->|"preprocess"| Datasets
    Transforms -->|"apply"| Datasets
    Kinect -->|"stream data"| Datasets

    Datasets -->|"produce batches"| TrainLoop
    TrainLoop -->|"forward/backward"| Backbone
    TrainLoop -->|"use layers"| Layers
    TrainLoop -->|"use middle"| Middle
    TrainLoop -->|"use CUDA"| CudaExt
    TrainLoop -->|"trigger"| Hooks

    ValLoop -->|"trigger"| Hooks
    TestLoop -->|"trigger"| Hooks

    Hooks -->|"evaluate"| Metrics
    Hooks -->|"postprocess"| Postproc
    Hooks -->|"visualize"| OfflineViz
    Hooks -->|"visualize"| OnlineViz

    BaseRunner -->|"coordinate"| TrainLoop
    BaseRunner -->|"coordinate"| ValLoop
    BaseRunner -->|"coordinate"| TestLoop

    Inference -->|"infer"| Backbone
    Inference -->|"visualize"| OnlineViz

    DCApp <-->|uses| Kinect
    OECApp <-->|uses| Kinect
    OSEApp <-->|uses| Kinect

    %% Click Events
    click RunApp "https://github.com/barrydoooit/mwpose3d/blob/mwpose3d-dev/tools/run_app.py"
    click Train "https://github.com/barrydoooit/mwpose3d/blob/mwpose3d-dev/tools/train.py"
    click Test "https://github.com/barrydoooit/mwpose3d/blob/mwpose3d-dev/tools/test.py"
    click DCApp "https://github.com/barrydoooit/mwpose3d/blob/mwpose3d-dev/apps/impl/dataset_collection/dataset_collection.py"
    click OECApp "https://github.com/barrydoooit/mwpose3d/blob/mwpose3d-dev/apps/impl/online_estim_and_collection/online_estim_and_collection.py"
    click OSEApp "https://github.com/barrydoooit/mwpose3d/blob/mwpose3d-dev/apps/impl/online_skeletion_estim.py"
    click Config "https://github.com/barrydoooit/mwpose3d/tree/mwpose3d-dev/configs/"
    click Registry "https://github.com/barrydoooit/mwpose3d/blob/mwpose3d-dev/mwpose3d/registry.py"
    click Converters "https://github.com/barrydoooit/mwpose3d/tree/mwpose3d-dev/tools/dataset_converters/"
    click RawProc "https://github.com/barrydoooit/mwpose3d/tree/mwpose3d-dev/tools/rawproc/"
    click Datasets "https://github.com/barrydoooit/mwpose3d/blob/mwpose3d-dev/mwpose3d/datasets/base.py"
    click Transforms "https://github.com/barrydoooit/mwpose3d/tree/mwpose3d-dev/mwpose3d/datasets/transforms/"
    click Backbone "https://github.com/barrydoooit/mwpose3d/blob/mwpose3d-dev/mwpose3d/models/backbones/second.py"
    click Layers "https://github.com/barrydoooit/mwpose3d/tree/mwpose3d-dev/mwpose3d/models/layers/"
    click Middle "https://github.com/barrydoooit/mwpose3d/blob/mwpose3d-dev/mwpose3d/models/middle_encoders/sparse_encoder.py"
    click CudaExt "https://github.com/barrydoooit/mwpose3d/tree/mwpose3d-dev/mwpose3d/models/utils/sdtw_cuda/"
    click TrainLoop "https://github.com/barrydoooit/mwpose3d/blob/mwpose3d-dev/mwpose3d/runner/train_loop.py"
    click ValLoop "https://github.com/barrydoooit/mwpose3d/blob/mwpose3d-dev/mwpose3d/runner/val_loop.py"
    click TestLoop "https://github.com/barrydoooit/mwpose3d/blob/mwpose3d-dev/mwpose3d/runner/test_loop.py"
    click BaseRunner "https://github.com/barrydoooit/mwpose3d/blob/mwpose3d-dev/mwpose3d/runner/base_loop.py"
    click Hooks "https://github.com/barrydoooit/mwpose3d/tree/mwpose3d-dev/mwpose3d/runner/hooks/"
    click Inference "https://github.com/barrydoooit/mwpose3d/blob/mwpose3d-dev/mwpose3d/runner/inference_engine.py"
    click Metrics "https://github.com/barrydoooit/mwpose3d/tree/mwpose3d-dev/mwpose3d/evaluation/metrics/"
    click Postproc "https://github.com/barrydoooit/mwpose3d/tree/mwpose3d-dev/mwpose3d/evaluation/postprocessing/"
    click OfflineViz "https://github.com/barrydoooit/mwpose3d/blob/mwpose3d-dev/mwpose3d/visualization/pcd_offline.py"
    click OnlineViz "https://github.com/barrydoooit/mwpose3d/blob/mwpose3d-dev/mwpose3d/visualization/skel_online.py"
    click Kinect "https://github.com/barrydoooit/mwpose3d/blob/mwpose3d-dev/mwpose3d/utils/kinect_toolkits/kinectManager.py"

    %% Styles
    classDef frontend fill:#AED6F1,stroke:#1B4F72
    classDef config fill:#F2F3F4,stroke:#ABB2B9
    classDef core fill:#ABEBC6,stroke:#196F3D
    classDef ext fill:#F9E79F,stroke:#B9770E
```
