Skip to content

zhang-guangyi/cdm-jscc

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

This repository is built upon CDC_compression and NTSCC, thanks very much!

We would gradually upload the full-version of the implementation.

Citation (Preprint Version)

@article{yang2024rate,
  title={Rate-Adaptive Generative Semantic Communication Using Conditional Diffusion Models},
  author={Yang, Pujing and Zhang, Guangyi and Cai, Yunlong},
  journal={arXiv preprint arXiv:2409.02597},
  year={2024}
}

Usage

Clone

Clone this repository and enter the directory using the commands below:

git clone https://github.com/zhang-guangyi/cdm-jscc.git
cd cdm-jscc/

Requirements

Python 3.9.12 is recommended.

Install the required packages with:

pip install -r requirements.txt (Not provided yet)

If you're having issues with installing PyTorch compatible with your CUDA version, we strongly recommend related documentation page](https://pytorch.org/get-started/previous-versions/).

Pretrained Models

Usage

Example of test the CDM-JSCC model:

  1. When evaluating FID metric, images are cropped to non-overlapping patches of $256 \times 256$, for example, Kodak images are cropped to 144 patches of $256 \times 256$:
python crop.py
  1. Run test.py
  • Evaluating CDM-JSCC-P model at an average CBR of $1/48$ across SNR of $10$dB:
python test.py --img_dir path_to_testimgdir --cropped_input_dir path_to_croppedimgdir --snr 10 --root path_to_cdm-jscc --ckpt ckpt/cbr1_48-eta0.5-snr10.pt --mask_ratio 0.13 --n_denoise_step 17
  • Evaluating CDM-JSCC-D model at an average CBR of $1/48$ across SNR of $10$dB:
python test.py --img_dir path_to_testimgdir --cropped_input_dir path_to_croppedimgdir --snr 10 --root path_to_cdm-jscc --ckpt ckpt/cbr1_48-eta0.1-snr10.pt --mask_ratio 0.15 --n_denoise_step 1
  • Evaluating CDM-JSCC-P model at an average CBR of $1/24$ across SNR of $10$dB:
python test.py --img_dir path_to_testimgdir --cropped_input_dir path_to_croppedimgdir --snr 10 --root path_to_cdm-jscc --ckpt ckpt/cbr1_24-eta0.5-snr10.pt --mask_ratio 0.316 --n_denoise_step 17
  • Evaluating CDM-JSCC-D model at an average CBR of $1/24$ across SNR of $10$dB:
python test.py --img_dir path_to_testimgdir --cropped_input_dir path_to_croppedimgdir --snr 10 --root path_to_cdm-jscc --ckpt ckpt/cbr1_24-eta0.1-snr10.pt --mask_ratio 0.41 --n_denoise_step 1

About

This is a pytorch implementation of diffusion models-based image transmission systems.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published