Skip to content

Hxxxz0/RMDM

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

7 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐Ÿ“ก PhyRMDM: Physics-Informed Representation Alignment for Sparse Radio-Map Reconstruction ๐Ÿš€

"When Einstein Meets Deep Learning" โ€” We make radio signals elegantly dance to the laws of physics in virtual cities. ๐Ÿ’ƒ

๐Ÿ“ข NEWS

๐ŸŽ‰ [NEW!] Our paper has been accepted by ACM MM BNI 2025 as an Oral Presentation! ๐Ÿ†
๐Ÿ”“ All code is now available โ€” Ready for researchers and practitioners to explore and build upon our work! ๐Ÿ’ป
๐ŸŽฏ Pre-trained model weights are now available โ€” Download from Baidu Netdisk: Link (Code: dnd4) ๐Ÿ“ฆ

๐ŸŒŸ Project Highlights

RMDM Model Structure

  • ๐Ÿง  Physics-Informed AI: Equipping neural networks with electromagnetic wisdom, enabling AI to think using Helmholtz equations.
  • ๐ŸŽญ Dual U-Net Architecture: Two neural netsโ€”one handling physical laws, the other refining detailsโ€”working seamlessly to reconstruct radio maps.
  • ๐Ÿ“‰ Record-Breaking Accuracy: Achieved an unprecedented 0.0031 NMSE error in static scenarios, 2ร— better than state-of-the-art methods!
  • ๐ŸŒช๏ธ Dynamic Scene Mastery: Robust reconstruction in dynamic, interference-rich environments (vehicles, moving obstacles) with an impressive 0.0047 NMSE.
  • ๐Ÿ•ต๏ธ Sparse Data Champion: Capable of accurately reconstructing complete radio maps even from a mere 1% samplingโ€”like Sherlock deducing from minimal clues.

๐ŸŽฏ Problems Solved

  • ๐Ÿงฉ Signal Reconstruction Puzzle: Restoring complete electromagnetic fields from fragmented measurements.
  • ๐ŸŒ† Urban Maze Complexity: Seamlessly handling complex obstructions from buildings, moving vehicles, and urban environments.
  • โšก Real-Time Performance: Achieving inference speeds up to 10ร— faster than traditional methodsโ€”ideal for real-time 5G/6G applications.

๐Ÿง  Core Technical Innovations

๐ŸŽต Dual U-Net Symphony

  1. Physics-Conductor U-Net: Embeds physical laws (Helmholtz equations) through Physics-Informed Neural Networks (PINNs).
  2. Detail-Sculptor U-Net: Uses advanced diffusion models for ultra-fine precision in radio map reconstruction.

๐Ÿ”ฅ Three Innovative Modules

  • ๐ŸŽฏ Anchor Conditional Mechanism: Precisely locking onto critical physical landmarks (like GPS for radio signals).
  • ๐ŸŒ RF-Space Attention: Models "frequency symphonies" enabling focused learning of electromagnetic signal characteristics.
  • โš–๏ธ Multi-Objective Loss: Harmonizing physics-based constraints and data-driven fitting to achieve optimal results.

๐Ÿ“‚ Benchmark Dataset

Leveraged the authoritative RadioMapSeer dataset:

  • 700+ real-world urban scenarios (London, Berlin, Tel Aviv, etc.)
  • 80 base stations per map with high-resolution 256ร—256 grids
  • Incorporates static and dynamic challenges (buildings, vehicles)

๐Ÿš€ Quick Start

๐Ÿ“‹ Prerequisites

  • Python: 3.8+
  • PyTorch: 2.0+ with CUDA support
  • GPU: NVIDIA GPU with 8GB+ VRAM (recommended)
  • Dataset: RadioMapSeer dataset

๐Ÿ› ๏ธ Installation

  1. Clone the repository:
git clone git@github.com:Hxxxz0/RMDM.git
cd PhyRMDM
  1. Create and activate conda environment:
conda create -n RMDM python=3.8
conda activate RMDM
  1. Install dependencies:
# Install PyTorch with CUDA support
pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu121

# Install all other dependencies
pip install -r requirement.txt
  1. Verify installation:
python -c "import torch; print(f'PyTorch {torch.__version__}, CUDA: {torch.cuda.is_available()}')"

๐Ÿ“ Dataset Setup

Download and organize the RadioMapSeer dataset:

RadioMapSeer/
โ”œโ”€โ”€ gain/
โ”‚   โ”œโ”€โ”€ DPM/
โ”‚   โ”œโ”€โ”€ IRT2/
โ”‚   โ””โ”€โ”€ cars*/
โ”œโ”€โ”€ png/
โ”‚   โ”œโ”€โ”€ buildings_complete/
โ”‚   โ”œโ”€โ”€ antennas/
โ”‚   โ””โ”€โ”€ cars/
โ””โ”€โ”€ dataset.csv

๐ŸŽฏ Training

Single GPU Training (SRM):

conda activate RMDM
python train.py \
  --data_name Radio \
  --data_dir /path/to/RadioMapSeer \
  --batch_size 16 \
  --mixed_precision no \
  --use_checkpoint True \
  --num_channels 96 \
  --attention_resolutions 16 \
  --log_interval 50 \
  --max_steps 100000 \
  --save_interval 10000 \
  --save_dir ./checkpoints_phy

Multi-GPU Training (SRM):

accelerate launch --num_processes=2 --multi_gpu --mixed_precision=no \
  train.py \
  --data_name Radio \
  --data_dir /path/to/RadioMapSeer \
  --batch_size 32 \
  --mixed_precision no \
  --use_checkpoint True \
  --num_channels 96 \
  --attention_resolutions 16 \
  --log_interval 50 \
  --max_steps 100000 \
  --save_interval 10000 \
  --save_dir ./checkpoints_phy

Resume Training:

python train.py \
  --resume_from ./checkpoints_phy/model_phy_step5000.pth \
  --data_name Radio \
  --data_dir /path/to/RadioMapSeer \
  --batch_size 16 \
  --mixed_precision no \
  --save_dir ./checkpoints_phy

๐Ÿ”ฎ Inference & Evaluation

Quick Inference Test (SRM):

python sample_test.py \
  --scheduler_type ddpm \
  --data_dir /path/to/RadioMapSeer \
  --checkpoint_path ./checkpoints_phy/model_phy_step100000.pth \
  --output_dir ./inference_results \
  --ddpm_steps 1000 \
  --batch_size 4 \
  --num_samples 100

Full Test Set Evaluation (SRM):

python sample_test.py \
  --scheduler_type ddpm \
  --data_dir /path/to/RadioMapSeer \
  --checkpoint_path ./checkpoints_phy/model_phy_step10000.pth \
  --output_dir ./full_evaluation \
  --ddpm_steps 1000 \
  --batch_size 4 \
  --num_samples -1

Inference with Image Saving ๐Ÿ–ผ๏ธ:

python sample_test.py \
  --scheduler_type ddpm \
  --data_dir /path/to/RadioMapSeer \
  --checkpoint_path ./checkpoints_phy/model_phy_step10000.pth \
  --output_dir ./results_with_images \
  --ddpm_steps 1000 \
  --batch_size 4 \
  --num_samples 50 \
  --save_images

This will generate:

  • ๐Ÿ“Š Generated radio maps: generated/ folder
  • ๐ŸŽฏ Ground truth maps: ground_truth/ folder
  • ๐Ÿ—๏ธ Input conditions: conditions/ folder (buildings + transmitters)
  • ๐Ÿ” Comparison plots: comparison/ folder (generated vs. ground truth vs. difference)

๐Ÿ“œ Academic Citation

@misc{jia2025rmdmradiomapdiffusion,
      title={RMDM: Radio Map Diffusion Model with Physics Informed}, 
      author={Haozhe Jia and Wenshuo Chen and Zhihui Huang and Hongru Xiao and Nanqian Jia and Keming Wu and Songning Lai and Yutao Yue},
      year={2025},
      eprint={2501.19160},
      archivePrefix={arXiv},
      primaryClass={cs.CV},
      url={https://arxiv.org/abs/2501.19160}, 
}

๐Ÿ™Œ Acknowledgments

Special thanks to:

  • ๐Ÿซ Joint Laboratory of Hong Kong University of Science and Technology (Guangzhou) & Shandong University
  • ๐ŸŒ‰ Guangzhou Education Bureau's Key Research Project
  • ๐Ÿค– DIILab for generous computational support

License: This project is distributed under the Academic Free License v3.0. Please cite accordingly for academic use. For commercial applications, contact the authors directly.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages