# umut-demirhan/radar-aided-beam-prediction architecture

> Architecture diagram of the GitHub repository umut-demirhan/radar-aided-beam-prediction, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-13). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/umut-demirhan/radar-aided-beam-prediction
- Repository: https://github.com/umut-demirhan/radar-aided-beam-prediction

## Overview

This repository implements radar-aided beam prediction for DeepSense6G Scenario 9. The main inference workflow loads radar samples and beam labels, transforms radar cubes into one of three representations, applies the selected neural network, and reports top-k accuracy. The README also documents model training and the baseline lookup-table method. The training script is not excerpted, so its internal wiring is not asserted; its documented role is shown at a high level.

Main entry points: [`scenario9_radar_beam-prediction_inference.py`](https://github.com/umut-demirhan/radar-aided-beam-prediction/blob/main/scenario9_radar_beam-prediction_inference.py) (Scenario 9 inference), [`train.py`](https://github.com/umut-demirhan/radar-aided-beam-prediction/blob/main/train.py) (Model training), [`network_functions.py`](https://github.com/umut-demirhan/radar-aided-beam-prediction/blob/main/network_functions.py) (Training and test loops), [`baseline.py`](https://github.com/umut-demirhan/radar-aided-beam-prediction/blob/main/baseline.py) (Lookup-table baseline)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_data["Radar data"]
  node_radarfiles["Radar samples and labels"]
  node_loader["Radar data loader<br/>[dataset.py]"]
end

subgraph group_represent["Representations"]
  node_torchprep["Torch radar transforms"]
  node_numpyprep["NumPy radar transforms"]
end

subgraph group_learning["Learning"]
  node_models["Beam CNN models"]
  node_training["Model training<br/>[train.py]"]
  node_loops["Training and test loops"]
  node_weights[("Saved model weights")]
end

subgraph group_results["Prediction and evaluation"]
  node_inference["Scenario 9 inference"]
  node_evaluation["Top-k evaluation"]
  node_baseline["Lookup-table baseline<br/>[baseline.py]"]
end

node_researcher(("Researcher"))
node_deepsense[("DeepSense6G dataset")]

node_researcher -->|"downloads data"| node_deepsense
node_deepsense -->|"provides samples"| node_radarfiles
node_researcher -->|"runs evaluation"| node_inference
node_researcher -->|"runs training"| node_training
node_radarfiles -->|"loads samples"| node_loader
node_inference -->|"loads test data"| node_loader
node_inference -->|"selects transform"| node_torchprep
node_baseline -->|"loads splits"| node_loader
node_baseline -->|"selects transform"| node_torchprep
node_baseline -.->|"alternative transform"| node_numpyprep
node_inference -->|"selects model"| node_models
node_inference -->|"runs test loop"| node_loops
node_loops -->|"runs network"| node_models
node_loops -->|"loads checkpoint"| node_weights
node_inference -->|"evaluates predictions"| node_evaluation
node_training -.->|"uses training loop"| node_loops
node_training -.->|"trains models"| node_models
node_training -.->|"saves checkpoints"| node_weights

click node_loader "https://github.com/umut-demirhan/radar-aided-beam-prediction/blob/main/dataset.py"
click node_torchprep "https://github.com/umut-demirhan/radar-aided-beam-prediction/blob/main/radar_preprocessing_torch.py"
click node_numpyprep "https://github.com/umut-demirhan/radar-aided-beam-prediction/blob/main/radar_preprocessing.py"
click node_models "https://github.com/umut-demirhan/radar-aided-beam-prediction/blob/main/radar_network_models.py"
click node_training "https://github.com/umut-demirhan/radar-aided-beam-prediction/blob/main/train.py"
click node_loops "https://github.com/umut-demirhan/radar-aided-beam-prediction/blob/main/network_functions.py"
click node_weights "https://github.com/umut-demirhan/radar-aided-beam-prediction/tree/main/saved_models"
click node_inference "https://github.com/umut-demirhan/radar-aided-beam-prediction/blob/main/scenario9_radar_beam-prediction_inference.py"
click node_evaluation "https://github.com/umut-demirhan/radar-aided-beam-prediction/blob/main/network_functions.py"
click node_baseline "https://github.com/umut-demirhan/radar-aided-beam-prediction/blob/main/baseline.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_radarfiles,node_loader toneBlue
class node_torchprep,node_numpyprep,node_deepsense toneAmber
class node_models,node_training,node_loops,node_weights toneMint
class node_inference,node_evaluation,node_baseline toneRose
class node_researcher toneIndigo
```

## Components

### Radar data

- **Radar samples and labels**
- [Radar data loader](https://github.com/umut-demirhan/radar-aided-beam-prediction/blob/main/dataset.py): `dataset.py`

### Representations

- [Torch radar transforms](https://github.com/umut-demirhan/radar-aided-beam-prediction/blob/main/radar_preprocessing_torch.py): `radar_preprocessing_torch.py`
- [NumPy radar transforms](https://github.com/umut-demirhan/radar-aided-beam-prediction/blob/main/radar_preprocessing.py): `radar_preprocessing.py`

### Learning

- [Beam CNN models](https://github.com/umut-demirhan/radar-aided-beam-prediction/blob/main/radar_network_models.py): `radar_network_models.py`
- [Model training](https://github.com/umut-demirhan/radar-aided-beam-prediction/blob/main/train.py): `train.py`
- [Training and test loops](https://github.com/umut-demirhan/radar-aided-beam-prediction/blob/main/network_functions.py): `network_functions.py`
- [Saved model weights](https://github.com/umut-demirhan/radar-aided-beam-prediction/tree/main/saved_models): `saved_models`

### Prediction and evaluation

- [Scenario 9 inference](https://github.com/umut-demirhan/radar-aided-beam-prediction/blob/main/scenario9_radar_beam-prediction_inference.py): `scenario9_radar_beam-prediction_inference.py`
- [Top-k evaluation](https://github.com/umut-demirhan/radar-aided-beam-prediction/blob/main/network_functions.py): `network_functions.py`
- [Lookup-table baseline](https://github.com/umut-demirhan/radar-aided-beam-prediction/blob/main/baseline.py): `baseline.py`

### Other components

- **Researcher**
- **DeepSense6G dataset**

## Connections

- Researcher → DeepSense6G dataset: downloads data (evidence: `README.md`)
- DeepSense6G dataset → Radar samples and labels: provides samples (evidence: `README.md`)
- Researcher → Scenario 9 inference: runs evaluation (evidence: `README.md`)
- Researcher → Model training: runs training (evidence: `README.md`)
- Radar samples and labels → Radar data loader: loads samples (evidence: `dataset.py`)
- Scenario 9 inference → Radar data loader: loads test data (evidence: `scenario9_radar_beam-prediction_inference.py`)
- Scenario 9 inference → Torch radar transforms: selects transform (evidence: `scenario9_radar_beam-prediction_inference.py`)
- Lookup-table baseline → Radar data loader: loads splits (evidence: `baseline.py`)
- Lookup-table baseline → Torch radar transforms: selects transform (evidence: `baseline.py`)
- Lookup-table baseline → NumPy radar transforms: alternative transform
- Scenario 9 inference → Beam CNN models: selects model (evidence: `scenario9_radar_beam-prediction_inference.py`)
- Scenario 9 inference → Training and test loops: runs test loop (evidence: `scenario9_radar_beam-prediction_inference.py`)
- Training and test loops → Beam CNN models: runs network (evidence: `network_functions.py`)
- Training and test loops → Saved model weights: loads checkpoint (evidence: `network_functions.py`)
- Scenario 9 inference → Top-k evaluation: evaluates predictions (evidence: `scenario9_radar_beam-prediction_inference.py`)
- Model training → Training and test loops: uses training loop
- Model training → Beam CNN models: trains models
- Model training → Saved model weights: saves checkpoints
