# sense-gvt/fast-bev architecture

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

- Interactive diagram: https://gitdiagram.com/sense-gvt/fast-bev
- Repository: https://github.com/sense-gvt/fast-bev

## Overview

Fast-BEV is a multi-camera bird’s-eye-view perception project built within an MMDetection3D framework. Its documented workflow prepares nuScenes data, trains configured Fast-BEV models, and evaluates or runs inference on the resulting checkpoints; the repository also includes dataset-specific converters and broad 3D detection, segmentation, and visualization capabilities. The README documents CUDA/TensorRT inference and PTQ/QAT quantization as a related implementation, but that integration is not present in the supplied tree. Several model-internal connections below are intentionally left unverified because their implementation excerpts were not supplied.

Main entry points: [`mmdet3d/models/detectors/fastbev.py`](https://github.com/sense-gvt/fast-bev/blob/dev/mmdet3d/models/detectors/fastbev.py) (Fast-BEV detector), [`mmdet3d/apis/inference.py`](https://github.com/sense-gvt/fast-bev/blob/dev/mmdet3d/apis/inference.py) (Inference API), [`mmdet3d/apis/train.py`](https://github.com/sense-gvt/fast-bev/blob/dev/mmdet3d/apis/train.py) (Training API), [`tools/create_data.py`](https://github.com/sense-gvt/fast-bev/blob/dev/tools/create_data.py) (Dataset preparation)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_data["Data preparation"]
  node_prep["Dataset preparation<br/>[create_data.py]"]
  node_converters["Dataset converters"]
  node_datasets["Dataset adapters"]
  node_loading["Point and image loading<br/>[loading.py]"]
  node_transforms["3D transforms<br/>[transforms_3d.py]"]
end

subgraph group_runtime["Model runtime"]
  node_configs["Fast-BEV configs"]
  node_train["Training API<br/>[train.py]"]
  node_detector["Fast-BEV detector<br/>[fastbev.py]"]
  node_backbones["Feature backbones"]
  node_bevneck["BEV neck and decoder<br/>[m2bev_neck.py]"]
  node_fusion["View fusion"]
end

subgraph group_results["Results and evaluation"]
  node_checkpoint[("Model checkpoint")]
  node_inference["Inference API<br/>[inference.py]"]
  node_evaluation["Evaluation"]
  node_visualization["Result visualization<br/>[show_result.py]"]
end

subgraph group_extensions["Inference extensions"]
  node_accelerated["CUDA/TensorRT inference"]
  node_quantization["PTQ/QAT int8"]
end

node_engineer(("ML engineer"))
node_rawdata[("NuScenes data")]

node_engineer -->|"prepares data"| node_prep
node_rawdata -->|"provides source"| node_prep
node_prep -->|"dispatches conversion"| node_converters
node_converters -.->|"writes dataset infos"| node_datasets
node_datasets -->|"uses pipeline"| node_loading
node_loading -.->|"passes samples"| node_transforms
node_engineer -->|"trains model"| node_train
node_configs -.->|"configures training"| node_train
node_train -.->|"builds and trains"| node_detector
node_detector -.->|"extracts features"| node_backbones
node_detector -.->|"decodes BEV"| node_bevneck
node_detector -.->|"transforms views"| node_fusion
node_train -->|"saves weights"| node_checkpoint
node_engineer -->|"runs inference"| node_inference
node_checkpoint -.->|"loads weights"| node_inference
node_inference -->|"forwards samples"| node_detector
node_inference -.->|"evaluates predictions"| node_evaluation
node_inference -->|"renders results"| node_visualization
node_engineer -.->|"uses faster inference"| node_accelerated
node_accelerated -.->|"supports quantization"| node_quantization

click node_prep "https://github.com/sense-gvt/fast-bev/blob/dev/tools/create_data.py"
click node_converters "https://github.com/sense-gvt/fast-bev/tree/dev/tools/data_converter"
click node_datasets "https://github.com/sense-gvt/fast-bev/tree/dev/mmdet3d/datasets"
click node_loading "https://github.com/sense-gvt/fast-bev/blob/dev/mmdet3d/datasets/pipelines/loading.py"
click node_transforms "https://github.com/sense-gvt/fast-bev/blob/dev/mmdet3d/datasets/pipelines/transforms_3d.py"
click node_configs "https://github.com/sense-gvt/fast-bev/tree/dev/configs/fastbev/exp/paper"
click node_train "https://github.com/sense-gvt/fast-bev/blob/dev/mmdet3d/apis/train.py"
click node_detector "https://github.com/sense-gvt/fast-bev/blob/dev/mmdet3d/models/detectors/fastbev.py"
click node_backbones "https://github.com/sense-gvt/fast-bev/tree/dev/mmdet3d/models/backbones"
click node_bevneck "https://github.com/sense-gvt/fast-bev/blob/dev/mmdet3d/models/necks/m2bev_neck.py"
click node_fusion "https://github.com/sense-gvt/fast-bev/tree/dev/mmdet3d/models/fusion_layers"
click node_inference "https://github.com/sense-gvt/fast-bev/blob/dev/mmdet3d/apis/inference.py"
click node_evaluation "https://github.com/sense-gvt/fast-bev/tree/dev/mmdet3d/core/evaluation"
click node_visualization "https://github.com/sense-gvt/fast-bev/blob/dev/mmdet3d/core/visualizer/show_result.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_prep,node_converters,node_datasets,node_loading,node_transforms toneBlue
class node_configs,node_train,node_detector,node_backbones,node_bevneck,node_fusion,node_rawdata toneAmber
class node_checkpoint,node_inference,node_evaluation,node_visualization toneMint
class node_accelerated,node_quantization toneRose
class node_engineer toneIndigo
```

## Components

### Data preparation

- [Dataset preparation](https://github.com/sense-gvt/fast-bev/blob/dev/tools/create_data.py): `tools/create_data.py`
- [Dataset converters](https://github.com/sense-gvt/fast-bev/tree/dev/tools/data_converter): `tools/data_converter`
- [Dataset adapters](https://github.com/sense-gvt/fast-bev/tree/dev/mmdet3d/datasets): `mmdet3d/datasets`
- [Point and image loading](https://github.com/sense-gvt/fast-bev/blob/dev/mmdet3d/datasets/pipelines/loading.py): `mmdet3d/datasets/pipelines/loading.py`
- [3D transforms](https://github.com/sense-gvt/fast-bev/blob/dev/mmdet3d/datasets/pipelines/transforms_3d.py): `mmdet3d/datasets/pipelines/transforms_3d.py`

### Model runtime

- [Fast-BEV configs](https://github.com/sense-gvt/fast-bev/tree/dev/configs/fastbev/exp/paper): `configs/fastbev/exp/paper`
- [Training API](https://github.com/sense-gvt/fast-bev/blob/dev/mmdet3d/apis/train.py): `mmdet3d/apis/train.py`
- [Fast-BEV detector](https://github.com/sense-gvt/fast-bev/blob/dev/mmdet3d/models/detectors/fastbev.py): `mmdet3d/models/detectors/fastbev.py`
- [Feature backbones](https://github.com/sense-gvt/fast-bev/tree/dev/mmdet3d/models/backbones): `mmdet3d/models/backbones`
- [BEV neck and decoder](https://github.com/sense-gvt/fast-bev/blob/dev/mmdet3d/models/necks/m2bev_neck.py): `mmdet3d/models/necks/m2bev_neck.py`
- [View fusion](https://github.com/sense-gvt/fast-bev/tree/dev/mmdet3d/models/fusion_layers): `mmdet3d/models/fusion_layers`

### Results and evaluation

- **Model checkpoint**
- [Inference API](https://github.com/sense-gvt/fast-bev/blob/dev/mmdet3d/apis/inference.py): `mmdet3d/apis/inference.py`
- [Evaluation](https://github.com/sense-gvt/fast-bev/tree/dev/mmdet3d/core/evaluation): `mmdet3d/core/evaluation`
- [Result visualization](https://github.com/sense-gvt/fast-bev/blob/dev/mmdet3d/core/visualizer/show_result.py): `mmdet3d/core/visualizer/show_result.py`

### Inference extensions

- **CUDA/TensorRT inference**
- **PTQ/QAT int8**

### Other components

- **ML engineer**
- **NuScenes data**

## Connections

- ML engineer → Dataset preparation: prepares data
- NuScenes data → Dataset preparation: provides source
- Dataset preparation → Dataset converters: dispatches conversion (evidence: `tools/create_data.py`)
- Dataset converters → Dataset adapters: writes dataset infos (evidence: `tools/data_converter/create_gt_database.py`)
- Dataset adapters → Point and image loading: uses pipeline (evidence: `mmdet3d/datasets/__init__.py`)
- Point and image loading → 3D transforms: passes samples
- ML engineer → Training API: trains model
- Fast-BEV configs → Training API: configures training
- Training API → Fast-BEV detector: builds and trains
- Fast-BEV detector → Feature backbones: extracts features
- Fast-BEV detector → BEV neck and decoder: decodes BEV
- Fast-BEV detector → View fusion: transforms views
- Training API → Model checkpoint: saves weights
- ML engineer → Inference API: runs inference
- Model checkpoint → Inference API: loads weights
- Inference API → Fast-BEV detector: forwards samples (evidence: `mmdet3d/apis/inference.py`)
- Inference API → Evaluation: evaluates predictions
- Inference API → Result visualization: renders results (evidence: `mmdet3d/core/visualizer/show_result.py`)
- ML engineer → CUDA/TensorRT inference: uses faster inference
- CUDA/TensorRT inference → PTQ/QAT int8: supports quantization
