# gyuz1/e2e_ad_cell-planner architecture

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

- Interactive diagram: https://gitdiagram.com/gyuz1/e2e_ad_cell-planner
- Repository: https://github.com/gyuz1/e2e_ad_cell-planner

## Overview

Cell Planner is an end-to-end camera driving planner for the ETRI challenge. Its main workflow loads multi-frame, multi-camera scenes, builds BEV features, estimates ego status from vision, generates trajectories for command-conditioned spatial cells, then uses the target point to select a candidate. Training supports no-distillation and teacher/student distillation variants; evaluation measures trajectory quality and latency, while submission tooling packages inference results. The README documents these capabilities; some links to unsampled training and submission internals are therefore documented rather than source-verified.

Main entry points: [`projects/mmdet3d_plugin/VAD/VAD_head.py`](https://github.com/gyuz1/e2e_ad_cell-planner/blob/main/projects/mmdet3d_plugin/VAD/VAD_head.py) (VAD planning head), [`projects/mmdet3d_plugin/VAD/VAD.py`](https://github.com/gyuz1/e2e_ad_cell-planner/blob/main/projects/mmdet3d_plugin/VAD/VAD.py) (VAD detector), [`projects/mmdet3d_plugin/datasets/nuscenes_vad_dataset.py`](https://github.com/gyuz1/e2e_ad_cell-planner/blob/main/projects/mmdet3d_plugin/datasets/nuscenes_vad_dataset.py) (VAD dataset), [`tools/eval_holdout_l2_and_tinfer.py`](https://github.com/gyuz1/e2e_ad_cell-planner/blob/main/tools/eval_holdout_l2_and_tinfer.py) (Holdout evaluation)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_data["Data and geometry"]
  node_dataset["VAD dataset"]
  node_transforms["Image transforms<br/>[transform_3d.py]"]
  node_geometry[("Geometry cache")]
end

subgraph group_perception["BEV perception"]
  node_backbone["VoVNet backbone<br/>[vovnet.py]"]
  node_detector["VAD detector<br/>[VAD.py]"]
end

subgraph group_planning["Planning and distillation"]
  node_head["VAD planning head<br/>[VAD_head.py]"]
  node_cell["Cell generation and routing"]
  node_anchors["Goal anchors"]
  node_decoder["Trajectory decoder<br/>[decoder.py]"]
  node_law["LAW world model"]
  node_lawdetector["VAD-LAW integration<br/>[VAD_LAW.py]"]
  node_distill["Trajectory distillation"]
end

subgraph group_operations["Train and evaluate"]
  node_trainconfig["Training configurations<br/>[kd_delta.py]"]
  node_train["Training entry point<br/>[train.py]"]
  node_evaluate["Holdout evaluation"]
  node_submit["Challenge submission"]
end

node_scenes(("Driving scenes"))
node_result["Selected trajectory"]
node_teacher(("Privileged teacher"))

node_scenes -->|"loads scenes"| node_dataset
node_dataset -.->|"prepares images"| node_transforms
node_transforms -.->|"uses cached geometry"| node_geometry
node_transforms -.->|"provides images"| node_backbone
node_backbone -.->|"extracts features"| node_detector
node_detector -->|"passes BEV features"| node_head
node_head -.->|"decodes trajectories"| node_decoder
node_head -->|"generates and routes"| node_cell
node_head -->|"uses goal anchors"| node_anchors
node_head -->|"returns selected path"| node_result
node_lawdetector -->|"computes world loss"| node_law
node_lawdetector -->|"applies distillation"| node_distill
node_teacher -->|"provides features"| node_distill
node_trainconfig -->|"configures training"| node_train
node_train -.->|"trains on data"| node_dataset
node_train -.->|"optimizes model"| node_detector
node_evaluate -->|"replays windows"| node_dataset
node_evaluate -.->|"runs inference"| node_detector
node_evaluate -->|"scores trajectories"| node_result
node_submit -.->|"runs challenge model"| node_detector
node_submit -->|"writes submission"| node_result

click node_dataset "https://github.com/gyuz1/e2e_ad_cell-planner/blob/main/projects/mmdet3d_plugin/datasets/nuscenes_vad_dataset.py"
click node_transforms "https://github.com/gyuz1/e2e_ad_cell-planner/blob/main/projects/mmdet3d_plugin/datasets/pipelines/transform_3d.py"
click node_geometry "https://github.com/gyuz1/e2e_ad_cell-planner/blob/main/tools/cache/etri_geometry_cache.py"
click node_backbone "https://github.com/gyuz1/e2e_ad_cell-planner/blob/main/projects/mmdet3d_plugin/models/backbones/vovnet.py"
click node_detector "https://github.com/gyuz1/e2e_ad_cell-planner/blob/main/projects/mmdet3d_plugin/VAD/VAD.py"
click node_head "https://github.com/gyuz1/e2e_ad_cell-planner/blob/main/projects/mmdet3d_plugin/VAD/VAD_head.py"
click node_cell "https://github.com/gyuz1/e2e_ad_cell-planner/blob/main/projects/mmdet3d_plugin/VAD/cell_planner_utils.py"
click node_anchors "https://github.com/gyuz1/e2e_ad_cell-planner/blob/main/projects/mmdet3d_plugin/VAD/goal_anchor_utils.py"
click node_decoder "https://github.com/gyuz1/e2e_ad_cell-planner/blob/main/projects/mmdet3d_plugin/VAD/modules/decoder.py"
click node_law "https://github.com/gyuz1/e2e_ad_cell-planner/blob/main/projects/mmdet3d_plugin/LAW/bev_latent_world_model.py"
click node_lawdetector "https://github.com/gyuz1/e2e_ad_cell-planner/blob/main/projects/mmdet3d_plugin/LAW/VAD_LAW.py"
click node_distill "https://github.com/gyuz1/e2e_ad_cell-planner/blob/main/projects/mmdet3d_plugin/LAW/trajectory_distillation.py"
click node_trainconfig "https://github.com/gyuz1/e2e_ad_cell-planner/blob/main/configs/kd_delta.py"
click node_train "https://github.com/gyuz1/e2e_ad_cell-planner/blob/main/tools/train.py"
click node_evaluate "https://github.com/gyuz1/e2e_ad_cell-planner/blob/main/tools/eval_holdout_l2_and_tinfer.py"
click node_submit "https://github.com/gyuz1/e2e_ad_cell-planner/blob/main/tools/etri_test_submit.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_transforms,node_geometry toneBlue
class node_backbone,node_detector toneAmber
class node_head,node_cell,node_anchors,node_decoder,node_law,node_lawdetector,node_distill toneMint
class node_trainconfig,node_train,node_evaluate,node_submit toneRose
class node_scenes,node_result,node_teacher toneIndigo
```

## Components

### Data and geometry

- [VAD dataset](https://github.com/gyuz1/e2e_ad_cell-planner/blob/main/projects/mmdet3d_plugin/datasets/nuscenes_vad_dataset.py): `projects/mmdet3d_plugin/datasets/nuscenes_vad_dataset.py`
- [Image transforms](https://github.com/gyuz1/e2e_ad_cell-planner/blob/main/projects/mmdet3d_plugin/datasets/pipelines/transform_3d.py): `projects/mmdet3d_plugin/datasets/pipelines/transform_3d.py`
- [Geometry cache](https://github.com/gyuz1/e2e_ad_cell-planner/blob/main/tools/cache/etri_geometry_cache.py): `tools/cache/etri_geometry_cache.py`

### BEV perception

- [VoVNet backbone](https://github.com/gyuz1/e2e_ad_cell-planner/blob/main/projects/mmdet3d_plugin/models/backbones/vovnet.py): `projects/mmdet3d_plugin/models/backbones/vovnet.py`
- [VAD detector](https://github.com/gyuz1/e2e_ad_cell-planner/blob/main/projects/mmdet3d_plugin/VAD/VAD.py): `projects/mmdet3d_plugin/VAD/VAD.py`

### Planning and distillation

- [VAD planning head](https://github.com/gyuz1/e2e_ad_cell-planner/blob/main/projects/mmdet3d_plugin/VAD/VAD_head.py): `projects/mmdet3d_plugin/VAD/VAD_head.py`
- [Cell generation and routing](https://github.com/gyuz1/e2e_ad_cell-planner/blob/main/projects/mmdet3d_plugin/VAD/cell_planner_utils.py): `projects/mmdet3d_plugin/VAD/cell_planner_utils.py`
- [Goal anchors](https://github.com/gyuz1/e2e_ad_cell-planner/blob/main/projects/mmdet3d_plugin/VAD/goal_anchor_utils.py): `projects/mmdet3d_plugin/VAD/goal_anchor_utils.py`
- [Trajectory decoder](https://github.com/gyuz1/e2e_ad_cell-planner/blob/main/projects/mmdet3d_plugin/VAD/modules/decoder.py): `projects/mmdet3d_plugin/VAD/modules/decoder.py`
- [LAW world model](https://github.com/gyuz1/e2e_ad_cell-planner/blob/main/projects/mmdet3d_plugin/LAW/bev_latent_world_model.py): `projects/mmdet3d_plugin/LAW/bev_latent_world_model.py`
- [VAD-LAW integration](https://github.com/gyuz1/e2e_ad_cell-planner/blob/main/projects/mmdet3d_plugin/LAW/VAD_LAW.py): `projects/mmdet3d_plugin/LAW/VAD_LAW.py`
- [Trajectory distillation](https://github.com/gyuz1/e2e_ad_cell-planner/blob/main/projects/mmdet3d_plugin/LAW/trajectory_distillation.py): `projects/mmdet3d_plugin/LAW/trajectory_distillation.py`

### Train and evaluate

- [Training configurations](https://github.com/gyuz1/e2e_ad_cell-planner/blob/main/configs/kd_delta.py): `configs/kd_delta.py`
- [Training entry point](https://github.com/gyuz1/e2e_ad_cell-planner/blob/main/tools/train.py): `tools/train.py`
- [Holdout evaluation](https://github.com/gyuz1/e2e_ad_cell-planner/blob/main/tools/eval_holdout_l2_and_tinfer.py): `tools/eval_holdout_l2_and_tinfer.py`
- [Challenge submission](https://github.com/gyuz1/e2e_ad_cell-planner/blob/main/tools/etri_test_submit.py): `tools/etri_test_submit.py`

### Other components

- **Driving scenes**
- **Selected trajectory**
- **Privileged teacher**

## Connections

- Driving scenes → VAD dataset: loads scenes (evidence: `README.md`)
- VAD dataset → Image transforms: prepares images
- Image transforms → Geometry cache: uses cached geometry
- Image transforms → VoVNet backbone: provides images
- VoVNet backbone → VAD detector: extracts features
- VAD detector → VAD planning head: passes BEV features
- VAD planning head → Trajectory decoder: decodes trajectories
- VAD planning head → Cell generation and routing: generates and routes (evidence: `projects/mmdet3d_plugin/VAD/VAD_head.py`)
- VAD planning head → Goal anchors: uses goal anchors (evidence: `projects/mmdet3d_plugin/VAD/VAD_head.py`)
- VAD planning head → Selected trajectory: returns selected path (evidence: `README.md`)
- VAD-LAW integration → LAW world model: computes world loss (evidence: `projects/mmdet3d_plugin/LAW/VAD_LAW.py`)
- VAD-LAW integration → Trajectory distillation: applies distillation (evidence: `projects/mmdet3d_plugin/LAW/VAD_LAW.py`)
- Privileged teacher → Trajectory distillation: provides features (evidence: `README.md`)
- Training configurations → Training entry point: configures training (evidence: `README.md`)
- Training entry point → VAD dataset: trains on data
- Training entry point → VAD detector: optimizes model
- Holdout evaluation → VAD dataset: replays windows (evidence: `tools/eval_holdout_l2_and_tinfer.py`)
- Holdout evaluation → VAD detector: runs inference
- Holdout evaluation → Selected trajectory: scores trajectories (evidence: `README.md`)
- Challenge submission → VAD detector: runs challenge model
- Challenge submission → Selected trajectory: writes submission (evidence: `README.md`)
