Skip to content

WHUyyx/MAGC

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MAGC (ISPRS-JPRS 2025)

Official code for Map-Assisted Remote-Sensing Image Compression at Extremely Low Bitrates

📖Table Of Contents

👀Compression Performance

Quantitative Comparisons

Qualitative Comparisons

⚙️Installation

# clone this repo
git clone https://github.com/WHUyyx/MAGC.git

# create an environment with python >= 3.9
conda create -n MAGC python=3.9
conda activate MAGC
pip install -r requirements.txt

🧬Pretrained Models

Please download the pretrained model from Google Drive and place it in the magc_ckpts/ckpts_stage2/ folder for inference.

🧗Dataset

Please access the training set and test set from SGDM.

⚔️Inference

CUDA_VISIBLE_DEVICES=0 python inference.py \
--ckpt magc_ckpts/ckpts_stage2/v40_step=120999-lpips=0.3132.ckpt \
--config configs/model/cldm_stage2.yaml \
--input_path ../dataset/Synthetic-v18-45k/test_4500 \
--steps 50 \
--batchsize 30 \
--output_root metrics_4500_magc \
--device cuda    

🌠Train

For the first stage, you can loat the pretrained parameters:

python scripts/make_stage1_init_weight.py \
--cldm_config configs/model/cldm_stage2.yaml \
--sd_weight pretrained/v2-1_512-ema-pruned.ckpt \
--output pretrained/init_stage1.ckpt

Then you can start the first training stage:

python train.py \
--config configs/train_cldm_stage1.yaml

For the second stage, you can loat the parameters obtained in the first stage:

python scripts/make_stage2_init_weight.py \
--cldm_config configs/model/cldm_stage2.yaml \
--sd_weight magc_ckpts/ckpts_stage1/v38_step=115999-val_loss=0.2284.ckpt \
--output pretrained/init_stage2.ckpt

Finally you can start training:

python train.py \
--config configs/train_cldm_stage2.yaml

Citation

Please cite us if our work is useful for your research.

@misc{ye2024map,
      title={Map-Assisted Remote-Sensing Image Compression at Extremely Low Bitrates}, 
      author={Yixuan Ye and Ce Wang and Wanjie Sun and Zhenzhong Chen},
      year={2024},
      eprint={2409.01935},
      archivePrefix={arXiv},
      primaryClass={cs.CV}
}

Acknowledgement

This project is based on DiffBIR and CompressAI. Thanks for their awesome work.

Contact

If you have any questions, please feel free to contact with me at yeyixuan@whu.edu.cn.

About

Map-Assisted Remote-Sensing Image Compression at Extremely Low Bitrates

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages