Thanks to visit codestin.com
Credit goes to github.com

Skip to content
/ HFEAN Public
forked from Gracewangyy/HFEAN

This is official code of "Learning High-frequency Feature Enhancement and Alignment for Pan-sharpening."

License

Notifications You must be signed in to change notification settings

LYL1015/HFEAN

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🔥 Learning High-frequency Feature Enhancement and Alignment for Pan-sharpening (ACM MM 2023)

Python 3.8 pytorch 1.12.0 paper

This is the official PyTorch codes for the paper.

Learning High-frequency Feature Enhancement and Alignment for Pan-sharpening
Yingying Wang, Yunlong Lin, Ge Meng, Zhenqi Fu, Yuhang Dong, Linyu Fan, Hedeng Yu, Xinghao Ding*, Yue Huang( *indicates corresponding author)

🚀 Highlights:

  • SOTA performance: The proposed HFEAN outperforms SOTA pan-sharpening methods over multiple satellite datasets.

Dependencies and Installation

  • Ubuntu >= 18.04
  • CUDA >= 11.0
  • NumPy
  • Matplotlib
  • OpenCV
  • PyYAML
# git clone this repository
git clone https://github.com/Gracewangyy/HFEAN.git
cd HFEAN

# create new anaconda env
conda create -n HFEAN python=3.8
conda activate HFEAN

pip install torch numpy matplotlib opencv-python pyyaml

Datasets

Training dataset, testing dataset are available at Data.

The directory structure will be arranged as:

Data
    |- WV3_data
        |- train128
            |- pan
                |- xxx.tif
            |- ms
                |- xxx.tif
        |- test128
            |- pan
            |- ms
    |-  WV2_data
        |- train128
            |- pan
            |- ms
        |- test128
            |- pan
            |- ms
    |-  GF2_data
        |- ...

Testing the Model

To test the trained pan-sharpening model, you can run the following command:

python test.py

Configuration

The configuration options are stored in the option.yaml file and test.py. Here is an explanation of each of the options:

algorithm

  • algorithm: The model for testing

Testing

  • algorithm: The algorithm to use for testing.
  • type: The type of testing, test
  • data_dir: The location of the test data.
  • source_ms: The source of the multi-spectral data.
  • source_pan: The source of the panchromatic data.
  • model: The model path to use for testing.
  • save_dir: The location to save the test results.
  • test_config_path : The configuration file path for models

Data Processing

  • upscale: The upscale factor.
  • batch_size: The size of each batch.
  • patch_size: The size of each patch.
  • data_augmentation: Whether to use data augmentation.
  • n_colors: The number of color channels.
  • rgb_range: The range of the RGB values.
  • normalize: Whether to normalize the data.

Acknowledgements

Our work is based on the following projects:

Citation

If you find DIRFL is useful in your research, please cite our paper:

@inproceedings{wang2023learning,
  title={Learning High-frequency Feature Enhancement and Alignment for Pan-sharpening},
  author={Wang, Yingying and Lin, Yunlong and Meng, Ge and Fu, Zhenqi and Dong, Yuhang and Fan, Linyu and Yu, Hedeng and Ding, Xinghao and Huang, Yue},
  booktitle={Proceedings of the 31st ACM International Conference on Multimedia},
  pages={358--367},
  year={2023}
}

About

This is official code of "Learning High-frequency Feature Enhancement and Alignment for Pan-sharpening."

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%