The pytorch implementation of ''Not All Patches Are Equal: Hierarchical Dataset Condensation for Single Image Super-Resolution'', SPL 2023.
- Python 3.7
- PyTorch == 1.7.0
- numpy
- skimage
- imageio
- matplotlib
- cv2
1.1 Download the DIV2K
1.2 Crop the HR images into image patches in 'data_path/DIV2K/HR'
2.1 Measure the complexity of image patches
python texture_complexity_measurement.py
2.2 Remove the low-complexity image patches
python remove_low_complexity.py
3.1 Cluster the image patches
python cluster_patches.py
3.2 Remove the image patches with similar textures in each cluster
python sample_patches.py
python main.py --model EDSR --scale 2 --save DCSR_X2 --patch_size 96 --batch_size 16
2.1 Prepare test data
Download benchmark datasets (e.g., Set5, Set14 and other test sets) and prepare HR/LR images in /benchmark
following the example of benchmark/Set5
2.1 Test the performance
python main.py --model EDSR --data_test Set5 --scale 2 --test_only
@ARTICLE{10305246,
author={Ding, Qingtang and Liang, Zhengyu and Wang, Longguang and Wang, Yingqian and Yang, Jungang},
journal={IEEE Signal Processing Letters},
title={Not All Patches Are Equal: Hierarchical Dataset Condensation for Single Image Super-Resolution},
year={2023},
volume={30},
number={},
pages={1752-1756},
doi={10.1109/LSP.2023.3329754}}
This code is built on EDSR (PyTorch) and ClassSR. We thank the authors for sharing the codes.