# jiayuanwang-jw/rmt-ppad architecture

> Architecture diagram of the GitHub repository jiayuanwang-jw/rmt-ppad, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-09-27). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/jiayuanwang-jw/rmt-ppad
- Repository: https://github.com/jiayuanwang-jw/rmt-ppad

## Overview

RMT-PPAD is presented as a real-time autonomous-driving perception system that jointly detects objects and segments drivable areas and lane lines. The documented workflow is to prepare BDD100K images, detection labels, and segmentation masks, configure training, train the multi-task model, then evaluate or run it on driving imagery. The graph combines those documented stages with the repository’s visible Ultralytics runtime layers. RMT-specific wiring beyond the sampled task/model excerpts is not independently verified, so uncertain implementation links are omitted.

Main entry points: [`ultralytics/nn/tasks.py`](https://github.com/jiayuanwang-jw/rmt-ppad/blob/main/ultralytics/nn/tasks.py) (Task model logic), [`ultralytics/engine/model.py`](https://github.com/jiayuanwang-jw/rmt-ppad/blob/main/ultralytics/engine/model.py) (Model API), [`ultralytics/engine/predictor.py`](https://github.com/jiayuanwang-jw/rmt-ppad/blob/main/ultralytics/engine/predictor.py) (Inference entry), [`ultralytics/engine/trainer.py`](https://github.com/jiayuanwang-jw/rmt-ppad/blob/main/ultralytics/engine/trainer.py) (Training engine)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_data["Data preparation"]
  node_data_build["Dataset building<br/>[build.py]"]
  node_dataset["Dataset loading<br/>[dataset.py]"]
  node_augment["Joint augmentation<br/>[augment.py]"]
end

subgraph group_model["Multi-task model"]
  node_task_models["Task model logic<br/>[tasks.py]"]
  node_task_heads["Task-specific heads<br/>[head.py]"]
  node_backbone["Network modules<br/>[block.py]"]
end

subgraph group_runtime["Run and assess"]
  node_train_entry["Training entry<br/>[train.py]"]
  node_eval_entry["Evaluation entry<br/>[validator.py]"]
  node_infer_entry["Inference entry<br/>[predictor.py]"]
  node_trainer["Training engine<br/>[trainer.py]"]
  node_validator["Task validation<br/>[validator.py]"]
  node_model_api["Model API<br/>[model.py]"]
  node_results["Perception results<br/>[results.py]"]
end

subgraph group_framework["Runtime framework"]
  node_backend["Inference backend<br/>[autobackend.py]"]
  node_metrics["Metrics and plots<br/>[metrics.py]"]
  node_tracker["Object tracking<br/>[track.py]"]
end

node_driver(("Researcher"))
node_bdd["BDD100K inputs"]

node_driver -->|"configures training"| node_train_entry
node_driver -->|"requests evaluation"| node_eval_entry
node_driver -->|"provides imagery"| node_infer_entry
node_bdd -->|"supplies images and labels"| node_data_build
node_data_build -->|"builds loaders"| node_dataset
node_dataset -->|"transforms samples"| node_augment
node_train_entry -->|"starts training"| node_trainer
node_trainer -->|"reads batches"| node_dataset
node_trainer -->|"optimizes model"| node_task_models
node_task_models -->|"uses network modules"| node_backbone
node_task_models -->|"uses task heads"| node_task_heads
node_eval_entry -->|"runs validation"| node_validator
node_validator -->|"evaluates model"| node_task_models
node_validator -->|"computes metrics"| node_metrics
node_infer_entry -->|"invokes model"| node_model_api
node_model_api -->|"sets up inference"| node_backend
node_model_api -->|"returns predictions"| node_results
node_model_api -->|"loads model logic"| node_task_models
node_infer_entry -.->|"optionally tracks"| node_tracker

click node_train_entry "https://github.com/jiayuanwang-jw/rmt-ppad/blob/main/ultralytics/train.py"
click node_eval_entry "https://github.com/jiayuanwang-jw/rmt-ppad/blob/main/ultralytics/engine/validator.py"
click node_infer_entry "https://github.com/jiayuanwang-jw/rmt-ppad/blob/main/ultralytics/engine/predictor.py"
click node_data_build "https://github.com/jiayuanwang-jw/rmt-ppad/blob/main/ultralytics/data/build.py"
click node_dataset "https://github.com/jiayuanwang-jw/rmt-ppad/blob/main/ultralytics/data/dataset.py"
click node_augment "https://github.com/jiayuanwang-jw/rmt-ppad/blob/main/ultralytics/data/augment.py"
click node_trainer "https://github.com/jiayuanwang-jw/rmt-ppad/blob/main/ultralytics/engine/trainer.py"
click node_validator "https://github.com/jiayuanwang-jw/rmt-ppad/blob/main/ultralytics/engine/validator.py"
click node_model_api "https://github.com/jiayuanwang-jw/rmt-ppad/blob/main/ultralytics/engine/model.py"
click node_task_models "https://github.com/jiayuanwang-jw/rmt-ppad/blob/main/ultralytics/nn/tasks.py"
click node_task_heads "https://github.com/jiayuanwang-jw/rmt-ppad/blob/main/ultralytics/nn/modules/head.py"
click node_backbone "https://github.com/jiayuanwang-jw/rmt-ppad/blob/main/ultralytics/nn/modules/block.py"
click node_backend "https://github.com/jiayuanwang-jw/rmt-ppad/blob/main/ultralytics/nn/autobackend.py"
click node_results "https://github.com/jiayuanwang-jw/rmt-ppad/blob/main/ultralytics/engine/results.py"
click node_metrics "https://github.com/jiayuanwang-jw/rmt-ppad/blob/main/ultralytics/utils/metrics.py"
click node_tracker "https://github.com/jiayuanwang-jw/rmt-ppad/blob/main/ultralytics/trackers/track.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_data_build,node_dataset,node_augment toneBlue
class node_task_models,node_task_heads,node_backbone toneAmber
class node_train_entry,node_eval_entry,node_infer_entry,node_trainer,node_validator,node_model_api,node_results toneMint
class node_backend,node_metrics,node_tracker toneRose
class node_driver,node_bdd toneIndigo
```

## Components

### Data preparation

- [Dataset building](https://github.com/jiayuanwang-jw/rmt-ppad/blob/main/ultralytics/data/build.py): `ultralytics/data/build.py`
- [Dataset loading](https://github.com/jiayuanwang-jw/rmt-ppad/blob/main/ultralytics/data/dataset.py): `ultralytics/data/dataset.py`
- [Joint augmentation](https://github.com/jiayuanwang-jw/rmt-ppad/blob/main/ultralytics/data/augment.py): `ultralytics/data/augment.py`

### Multi-task model

- [Task model logic](https://github.com/jiayuanwang-jw/rmt-ppad/blob/main/ultralytics/nn/tasks.py): `ultralytics/nn/tasks.py`
- [Task-specific heads](https://github.com/jiayuanwang-jw/rmt-ppad/blob/main/ultralytics/nn/modules/head.py): `ultralytics/nn/modules/head.py`
- [Network modules](https://github.com/jiayuanwang-jw/rmt-ppad/blob/main/ultralytics/nn/modules/block.py): `ultralytics/nn/modules/block.py`

### Run and assess

- [Training entry](https://github.com/jiayuanwang-jw/rmt-ppad/blob/main/ultralytics/train.py): `ultralytics/train.py`
- [Evaluation entry](https://github.com/jiayuanwang-jw/rmt-ppad/blob/main/ultralytics/engine/validator.py): `ultralytics/engine/validator.py`
- [Inference entry](https://github.com/jiayuanwang-jw/rmt-ppad/blob/main/ultralytics/engine/predictor.py): `ultralytics/engine/predictor.py`
- [Training engine](https://github.com/jiayuanwang-jw/rmt-ppad/blob/main/ultralytics/engine/trainer.py): `ultralytics/engine/trainer.py`
- [Task validation](https://github.com/jiayuanwang-jw/rmt-ppad/blob/main/ultralytics/engine/validator.py): `ultralytics/engine/validator.py`
- [Model API](https://github.com/jiayuanwang-jw/rmt-ppad/blob/main/ultralytics/engine/model.py): `ultralytics/engine/model.py`
- [Perception results](https://github.com/jiayuanwang-jw/rmt-ppad/blob/main/ultralytics/engine/results.py): `ultralytics/engine/results.py`

### Runtime framework

- [Inference backend](https://github.com/jiayuanwang-jw/rmt-ppad/blob/main/ultralytics/nn/autobackend.py): `ultralytics/nn/autobackend.py`
- [Metrics and plots](https://github.com/jiayuanwang-jw/rmt-ppad/blob/main/ultralytics/utils/metrics.py): `ultralytics/utils/metrics.py`
- [Object tracking](https://github.com/jiayuanwang-jw/rmt-ppad/blob/main/ultralytics/trackers/track.py): `ultralytics/trackers/track.py`

### Other components

- **Researcher**
- **BDD100K inputs**

## Connections

- Researcher → Training entry: configures training
- Researcher → Evaluation entry: requests evaluation
- Researcher → Inference entry: provides imagery
- BDD100K inputs → Dataset building: supplies images and labels
- Dataset building → Dataset loading: builds loaders
- Dataset loading → Joint augmentation: transforms samples
- Training entry → Training engine: starts training
- Training engine → Dataset loading: reads batches
- Training engine → Task model logic: optimizes model
- Task model logic → Network modules: uses network modules
- Task model logic → Task-specific heads: uses task heads
- Evaluation entry → Task validation: runs validation
- Task validation → Task model logic: evaluates model
- Task validation → Metrics and plots: computes metrics
- Inference entry → Model API: invokes model
- Model API → Inference backend: sets up inference
- Model API → Perception results: returns predictions
- Model API → Task model logic: loads model logic
- Inference entry → Object tracking: optionally tracks
