# yvonne-ytwu/deepjscc architecture

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

- Interactive diagram: https://gitdiagram.com/yvonne-ytwu/deepjscc
- Repository: https://github.com/yvonne-ytwu/deepjscc

## Overview

This is a research implementation of Deep JSCC image transmission. Its main workflow loads CIFAR-10 or Kodak images, trains an autoencoder for a chosen compression ratio and channel condition, evaluates reconstructions across SNRs, and combines those results with JPEG/JPEG2000 benchmarks in comparison plots. The graph also preserves the separate robustness-plot workflow and the model, channel, and metric layers. Benchmark internals are not excerpted; those connections rely on README descriptions.

Main entry points: [`evaluate.py`](https://github.com/yvonne-ytwu/deepjscc/blob/main/evaluate.py) (Model Evaluation), [`train.py`](https://github.com/yvonne-ytwu/deepjscc/blob/main/train.py) (Training Loop), [`main.py`](https://github.com/yvonne-ytwu/deepjscc/blob/main/main.py) (Training Entry Point), [`data_load.py`](https://github.com/yvonne-ytwu/deepjscc/blob/main/data_load.py) (Dataset Loaders)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_data["Data and Configuration"]
  node_config["Experiment Defaults<br/>[config.py]"]
  node_data_loader["Dataset Loaders<br/>[data_load.py]"]
end

subgraph group_codec["Deep JSCC Codec"]
  node_model["Autoencoder<br/>[model.py]"]
  node_channels["Channel Models<br/>[utils.py]"]
  node_metrics["Image Metrics<br/>[utils.py]"]
end

subgraph group_experiments["Experiments"]
  node_trainer["Training Loop<br/>[train.py]"]
  node_runner["Training Entry Point<br/>[main.py]"]
  node_model_files["Trained Weights"]
  node_evaluator["Model Evaluation<br/>[evaluate.py]"]
  node_benchmark["Codec Benchmarks<br/>[benchmark.py]"]
end

subgraph group_results["Results and Visualization"]
  node_result_files["JSON Results"]
  node_plot_runner["Comparison Plot Runner<br/>[plot_result.py]"]
  node_robustness_runner["Robustness Plot Runner<br/>[plot_figure4.py]"]
  node_visualization["Plotting Functions<br/>[visualization.py]"]
end

node_user(("Researcher"))
node_cifar[("CIFAR-10")]
node_kodak[("Kodak Images")]
node_jpeg["JPEG / JPEG2000"]

node_user -->|"starts training"| node_runner
node_runner -->|"calls training"| node_trainer
node_trainer -->|"reads defaults"| node_config
node_trainer -->|"loads datasets"| node_data_loader
node_cifar -->|"provides images"| node_data_loader
node_kodak -->|"provides images"| node_data_loader
node_trainer -->|"trains"| node_model
node_model -->|"applies channel"| node_channels
node_trainer -->|"computes validation"| node_metrics
node_runner -->|"saves weights"| node_model_files
node_user -->|"starts evaluation"| node_evaluator
node_evaluator -->|"loads test data"| node_data_loader
node_evaluator -->|"loads weights"| node_model_files
node_evaluator -->|"evaluates"| node_model
node_evaluator -->|"computes scores"| node_metrics
node_evaluator -->|"writes metrics"| node_result_files
node_user -->|"starts benchmark"| node_benchmark
node_benchmark -->|"benchmarks codecs"| node_jpeg
node_benchmark -->|"writes benchmark data"| node_result_files
node_user -->|"starts plotting"| node_plot_runner
node_plot_runner -->|"reads results"| node_result_files
node_plot_runner -->|"calls comparison plot"| node_visualization
node_user -->|"starts plotting"| node_robustness_runner
node_robustness_runner -->|"reads evaluations"| node_result_files
node_robustness_runner -->|"calls robustness plot"| node_visualization
node_runner -->|"creates training report"| node_visualization

click node_config "https://github.com/yvonne-ytwu/deepjscc/blob/main/config.py"
click node_data_loader "https://github.com/yvonne-ytwu/deepjscc/blob/main/data_load.py"
click node_trainer "https://github.com/yvonne-ytwu/deepjscc/blob/main/train.py"
click node_model "https://github.com/yvonne-ytwu/deepjscc/blob/main/model.py"
click node_channels "https://github.com/yvonne-ytwu/deepjscc/blob/main/utils.py"
click node_metrics "https://github.com/yvonne-ytwu/deepjscc/blob/main/utils.py"
click node_runner "https://github.com/yvonne-ytwu/deepjscc/blob/main/main.py"
click node_evaluator "https://github.com/yvonne-ytwu/deepjscc/blob/main/evaluate.py"
click node_benchmark "https://github.com/yvonne-ytwu/deepjscc/blob/main/benchmark.py"
click node_plot_runner "https://github.com/yvonne-ytwu/deepjscc/blob/main/plot_result.py"
click node_robustness_runner "https://github.com/yvonne-ytwu/deepjscc/blob/main/plot_figure4.py"
click node_visualization "https://github.com/yvonne-ytwu/deepjscc/blob/main/visualization.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_config,node_data_loader toneBlue
class node_model,node_channels,node_metrics,node_cifar,node_kodak toneAmber
class node_trainer,node_runner,node_model_files,node_evaluator,node_benchmark toneMint
class node_result_files,node_plot_runner,node_robustness_runner,node_visualization toneRose
class node_user,node_jpeg toneIndigo
```

## Components

### Data and Configuration

- [Experiment Defaults](https://github.com/yvonne-ytwu/deepjscc/blob/main/config.py): `config.py`
- [Dataset Loaders](https://github.com/yvonne-ytwu/deepjscc/blob/main/data_load.py): `data_load.py`

### Deep JSCC Codec

- [Autoencoder](https://github.com/yvonne-ytwu/deepjscc/blob/main/model.py): `model.py`
- [Channel Models](https://github.com/yvonne-ytwu/deepjscc/blob/main/utils.py): `utils.py`
- [Image Metrics](https://github.com/yvonne-ytwu/deepjscc/blob/main/utils.py): `utils.py`

### Experiments

- [Training Loop](https://github.com/yvonne-ytwu/deepjscc/blob/main/train.py): `train.py`
- [Training Entry Point](https://github.com/yvonne-ytwu/deepjscc/blob/main/main.py): `main.py`
- **Trained Weights**
- [Model Evaluation](https://github.com/yvonne-ytwu/deepjscc/blob/main/evaluate.py): `evaluate.py`
- [Codec Benchmarks](https://github.com/yvonne-ytwu/deepjscc/blob/main/benchmark.py): `benchmark.py`

### Results and Visualization

- **JSON Results**
- [Comparison Plot Runner](https://github.com/yvonne-ytwu/deepjscc/blob/main/plot_result.py): `plot_result.py`
- [Robustness Plot Runner](https://github.com/yvonne-ytwu/deepjscc/blob/main/plot_figure4.py): `plot_figure4.py`
- [Plotting Functions](https://github.com/yvonne-ytwu/deepjscc/blob/main/visualization.py): `visualization.py`

### Other components

- **Researcher**
- **CIFAR-10**
- **Kodak Images**
- **JPEG / JPEG2000**

## Connections

- Researcher → Training Entry Point: starts training (evidence: `main.py`)
- Training Entry Point → Training Loop: calls training (evidence: `main.py`)
- Training Loop → Experiment Defaults: reads defaults (evidence: `train.py`)
- Training Loop → Dataset Loaders: loads datasets (evidence: `train.py`)
- CIFAR-10 → Dataset Loaders: provides images (evidence: `data_load.py`)
- Kodak Images → Dataset Loaders: provides images (evidence: `data_load.py`)
- Training Loop → Autoencoder: trains (evidence: `train.py`)
- Autoencoder → Channel Models: applies channel (evidence: `model.py`)
- Training Loop → Image Metrics: computes validation (evidence: `train.py`)
- Training Entry Point → Trained Weights: saves weights (evidence: `main.py`)
- Researcher → Model Evaluation: starts evaluation (evidence: `evaluate.py`)
- Model Evaluation → Dataset Loaders: loads test data (evidence: `evaluate.py`)
- Model Evaluation → Trained Weights: loads weights (evidence: `evaluate.py`)
- Model Evaluation → Autoencoder: evaluates (evidence: `evaluate.py`)
- Model Evaluation → Image Metrics: computes scores (evidence: `evaluate.py`)
- Model Evaluation → JSON Results: writes metrics (evidence: `evaluate.py`)
- Researcher → Codec Benchmarks: starts benchmark (evidence: `README.md`)
- Codec Benchmarks → JPEG / JPEG2000: benchmarks codecs (evidence: `README.md`)
- Codec Benchmarks → JSON Results: writes benchmark data (evidence: `README.md`)
- Researcher → Comparison Plot Runner: starts plotting (evidence: `plot_result.py`)
- Comparison Plot Runner → JSON Results: reads results (evidence: `plot_result.py`)
- Comparison Plot Runner → Plotting Functions: calls comparison plot (evidence: `plot_result.py`)
- Researcher → Robustness Plot Runner: starts plotting (evidence: `plot_figure4.py`)
- Robustness Plot Runner → JSON Results: reads evaluations (evidence: `plot_figure4.py`)
- Robustness Plot Runner → Plotting Functions: calls robustness plot (evidence: `plot_figure4.py`)
- Training Entry Point → Plotting Functions: creates training report (evidence: `main.py`)
