RadioDiff-Inverse

July 4, 2026 ยท View on GitHub

๐Ÿ“ก Welcome to the RadioDiff Family

Radio map construction via generative diffusion models โ€” UNIC Lab, Xidian University


๐Ÿ”ท Base Backbone

RadioDiff โ€” The foundational diffusion model for radio map construction. ย ย ๐Ÿ“„ Paper ย |ย  ๐Ÿ’ป Code ย |ย  IEEE TCCN


๐Ÿ”ฌ Physics-Informed Extensions

RadioDiff-kยฒ โ€” PINN-enhanced diffusion guided by the Helmholtz equation. ย ย ๐Ÿ“„ Paper ย |ย  ๐Ÿ’ป Code ย |ย  IEEE JSAC

iRadioDiff โ€” Indoor radio map construction with physical information integration. ย ย ๐Ÿ“„ Paper ย |ย  ๐Ÿ’ป Code ย |ย  IEEE ICC ย Best Paper


โšก Efficiency & Dynamics

RadioDiff-Turbo โ€” Efficiency-enhanced RadioDiff for accelerated inference. ย ย ๐Ÿ“„ Paper ย |ย  INFOCOM Workshop

RadioDiff-Flux โ€” Adaptive reconstruction under dynamic environments and base station location changes. ย ย ๐Ÿ“„ Paper ย |ย  IEEE TCCN


๐ŸŒ Extended Scenarios

RadioDiff-3D โ€” 3D radio map construction with the UrbanRadio3D dataset. ย ย ๐Ÿ“„ Paper ย |ย  ๐Ÿ’ป Code ย |ย  IEEE TNSE

RadioDiff-FS โ€” Few-shot learning for radio map construction with limited measurements. ย ย ๐Ÿ“„ Paper ย |ย  ๐Ÿ’ป Code ย |ย  IEEE IoTJ


๐Ÿ“ถ Sparse Measurement & Localization

RadioDiff-Inverse โ€” Sparse measurement-based radio map recovery for ISAC applications. ย ย ๐Ÿ“„ Paper ย |ย  ๐Ÿ’ป Code ย |ย  IEEE TWC

RadioDiff-Loc โ€” Sparse measurement-based NLoS localization using diffusion models. ย ย ๐Ÿ“„ Paper ย |ย  arXiv


๐Ÿ“š For a comprehensive categorized overview of radio map research, visit Awesome-Radio-Map-Categorized.

Diffusion posterior sampling for radio-map style inpainting / inverse problems.

This repository applies the FPS-SMC diffusion posterior sampling pipeline to radio map reconstruction tasks, using building masks as conditioning signals and the RadioMapSeer dataset.


1. Environment

conda create -n radiodiff python=3.8 -y
conda activate radiodiff
pip install -r requirements.txt

A CUDA-compatible PyTorch build is strongly recommended. The code was tested with PyTorch 2.0.0+cu118.


2. Dataset: RadioMapSeer

This project uses the RadioMapSeer dataset for radio map reconstruction experiments.

After downloading, organize the data under data/ as follows:

data/
โ”œโ”€โ”€ samples/           # radio map images (used as ground truth)
โ”œโ”€โ”€ buildings_complete/# building footprint masks
โ”œโ”€โ”€ antennas/          # antenna position maps
โ””โ”€โ”€ val_images/        # validation split images

See data/README.md for more details.


3. Pretrained Checkpoints

Download the pretrained score estimation models and place them in models/.

FileDatasetSource
ffhq_10m.ptFFHQGoogle Drive (from DPS2022)
imagenet256.ptImageNetGoogle Drive (from DPS2022)
256x256_diffusion_uncond.ptImageNet (alt.)OpenAI
models/
โ”œโ”€โ”€ ffhq_10m.pt
โ””โ”€โ”€ imagenet256.pt      # or 256x256_diffusion_uncond.pt

See models/README.md for details.


4. Run Experiments

All scripts default to repository-relative output paths under results/. You can override the output directory by passing it as the first argument.

Random mask โ€” with building-mask conditioning

./run_random_cond.sh
# or specify output directory:
./run_random_cond.sh results/my_run

Random mask โ€” unconditional

./run_random_uncond.sh

Sensor-rectangle mask โ€” with building-mask conditioning

./run_sensor_cond.sh

Sensor-rectangle mask โ€” unconditional

./run_sensor_uncond.sh

Run directly with Python

python3 sample_condition.py \
    --task_config configs/inpainting_config_random_cond.yaml \
    --save_dir results/my_run \
    --gpu 0 \
    --num_images 10 \
    --mask_ratios 0.9 \
    --noise_levels 0.05

Interpolation baselines (no diffusion)

python3 sample_interpolation.py \
    --task_config configs/inpainting_config_random_cond.yaml \
    --save_dir results/interp \
    --gpu 0

5. Compute Metrics

Evaluate all experiments under results/:

python3 advanced_metric_calculator.py --base_dir results --gpu 0

Evaluate a single experiment directory:

python3 advanced_metric_calculator.py --exp_dir results/random_cond --gpu 0

Outputs per experiment: metrics.json, per_sample_metrics.json Summary outputs: all_result.json, summary_metrics_vMMDD_HHMM.json


6. Project Structure

.
โ”œโ”€โ”€ sample_condition.py        # main conditional pipeline
โ”œโ”€โ”€ sample_condition_uncond.py # main unconditional pipeline
โ”œโ”€โ”€ sample_interpolation.py    # interpolation baselines (RBF, Linear, etc.)
โ”œโ”€โ”€ advanced_metric_calculator.py
โ”œโ”€โ”€ configs/                   # task / model / diffusion YAML configs
โ”œโ”€โ”€ data/                      # datasets (git-ignored except README)
โ”œโ”€โ”€ models/                    # checkpoints (git-ignored except README)
โ”œโ”€โ”€ results/                   # experiment outputs (git-ignored except README)
โ”œโ”€โ”€ guided_diffusion/          # diffusion model and sampler internals
โ”œโ”€โ”€ util/                      # metrics, image utilities, logging
โ”œโ”€โ”€ ImageNet/                  # ImageNet-specific entry scripts
โ”œโ”€โ”€ scripts/                   # utility scripts
โ”œโ”€โ”€ run_random_cond.sh
โ”œโ”€โ”€ run_random_uncond.sh
โ”œโ”€โ”€ run_sensor_cond.sh
โ””โ”€โ”€ run_sensor_uncond.sh

7. Experimental Components

The road-conditioned path is kept for reference but is not part of the default reproducible pipeline:

  • run_cond_road.sh is intentionally disabled
  • sample_road.py requires additional dataset wiring before use

Acknowledgements

This codebase builds on the diffusion posterior sampling / FPS-SMC framework. Pretrained checkpoints are from DPS2022. Radio map data is from the RadioMapSeer dataset.