Skip to content

This is the code for paper "RadioDiff- $k^2$ : Helmholtz Equation Informed Generative Diffusion Model for Multi-Path Aware Radio Map Construction", submitted to IEEE JSAC.

Notifications You must be signed in to change notification settings

UNIC-Lab/RadioDiff-k

Repository files navigation

RadioDiff-k² 📡


Welcome to the RadioDiff family

Base BackBone, Paper Link: RadioDiff, Code Link: GitHub

PINN Enhanced with Helmholtz Equation, Paper Link: RadioDiff-$k^2$, Code Link: GitHub

Efficiency Enhanced RadioDiff, Paper Link: RadioDiff-Turbo

Indoor RM Construction with Physical Information, Code Link: GitHub

3D RM with DataSet, Paper Link: RadioDiff-3D, Code Link: GitHub

Sparse Measurement for RM ISAC, Paper Link: RadioDiff-Inverse

Sparse Measurement for NLoS Localization, Paper Link: RadioDiff-Loc

For more RM information, please visit the repo of Awesome-Radio-Map-Categorized.


An intelligent radio-map reconstruction system based on diffusion models. 📶✨

Python PyTorch License

RadioDiff-k² is an advanced radio-map reconstruction project that leverages conditional diffusion models to generate high-quality radio-coverage maps from sparse measurements. The project serves 5G and 6G network planning, propagation prediction, and network optimization. 🚀📡

✨ Key Features

🎯 Multiple Simulation Methods

  • DPM — deterministic propagation modeling with high speed and accuracy
  • IRT4 — iterative ray tracing with high-precision prediction
  • DPMCARK — vehicle-aware enhancement for urban mobility scenes 🚗📡

🏗️ Advanced Architecture

  • Conditional diffusion model built on Swin Transformer
  • VAE encoder for compact and efficient representation
  • Multi-scale processing for flexible resolution support 🧠🧩

📊 Rich Conditioning Features

  • Building layouts for realistic urban environments
  • Transmitter positions to capture source attributes
  • Vehicle data for dynamic occlusions
  • k² features to encode physical propagation traits 🏙️📍🚘📐

🚀 Quick Start

Environment Requirements

Python >= 3.8
CUDA >= 11.0
PyTorch >= 1.12

📁 Project Structure

RadioDiff-k2/
├── 📋 configs/                    # Configuration files
│   ├── BSDS_sample_*.yaml         # Inference configs
│   └── BSDS_train_*.yaml          # Training configs
├── 🧠 denoising_diffusion_pytorch/ # Diffusion core
├── 🔧 lib/                        # Utilities
│   ├── loaders.py                 # Data loaders
│   └── modules.py                 # Network modules
├── 💾 model/                      # Pretrained models
├── 📊 inference/                  # Inference results
│   ├── DPMCARK/                   # DPMCARK outputs
│   ├── DPMK/                      # DPMK outputs
│   └── IRT4K/                     # IRT4K outputs
├── 📈 metrics/                    # Evaluation metrics
├── ⚡ TFMQ/                        # Quantization and efficiency
├── 🚀 train_cond_ldm.py           # Training script
├── 🔮 sample_cond_ldm.py          # Inference script
├── 🏗️ train_vae.py               # VAE training
├── 🧮 caculate_k.py               # k² feature computation
├── 🎯 demo.py                     # Usage examples
├── 📦 requirements.txt            # Dependencies
└── 📖 README.md                   # Project docs

Method 2: conda

🎯 Usage Guide

1️⃣ Data Preparation

Dataset Layout

RadioMapSeer/
├── 📁 png/
│   ├── buildings_complete/        # Building images 256x256
│   ├── antennas/                  # Transmitter positions 256x256
│   └── cars/                      # Vehicle information optional
├── 📁 gain/
│   ├── DPM/                       # DPM simulation results
│   ├── IRT4/                      # IRT4 simulation results
│   └── IRT4_k2_neg_norm/          # k² feature maps
└── 📁 metadata/                   # Meta files

Generate k² Features

# Run the k² feature computation script
python caculate_k.py

2️⃣ Model Training

Step 1 — Train the conditional diffusion model

# Train the main model
python train_cond_ldm.py --cfg configs/BSDS_train_DPMK.yaml
python train_cond_ldm.py --cfg configs/BSDS_train_DPMCARK.yaml
python train_cond_ldm.py --cfg configs/BSDS_train_IRT4K.yaml

3️⃣ Inference

Basic Inference

# DPMCARK inference
python sample_cond_ldm.py --cfg configs/BSDS_sample_DPMCARK.yaml

# DPMK inference
python sample_cond_ldm.py --cfg configs/BSDS_sample_DPMK.yaml

# IRT4K inference
python sample_cond_ldm.py --cfg configs/BSDS_sample_IRT4K.yaml

About

This is the code for paper "RadioDiff- $k^2$ : Helmholtz Equation Informed Generative Diffusion Model for Multi-Path Aware Radio Map Construction", submitted to IEEE JSAC.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages