Official PyTorch implementation of LR2Flow, presented in:
Enhancing Low-resolution Image Representation Through Normalizing Flows Chenglong Bao, Tongyao Pang, Zuowei Shen, Dihan Zheng, and Yihang Zou arXiv preprint arXiv:2601.06834, 2026.
[Paper]
Pretrained models are available from Google Drive.
Please download the corresponding .pth files and place them in:
./experiments/pretrained_models/
Before training or testing, please configure the corresponding .yml files located in:
./codes/options/train/
./codes/options/test/
The dataset paths, pretrained model paths, and other experimental settings can be specified in these configuration files.
Run the following commands under the ./codes/ directory.
×2 image rescaling
python3 test_rescaling.py --opt options/test/test_rescaling_x2.yml×4 image rescaling
python3 test_rescaling.py --opt options/test/test_rescaling_x4.ymlpython3 test_compression.py --opt options/test/test_compression_x2.ymlAlternatively, to evaluate the compression performance in terms of bits per pixel (bpp), run:
python3 test_compression_bpp.py --opt options/test/test_compression_x2.ymlpython3 test_denoising.py --opt options/test/test_denoising.ymlRun the following commands under the ./codes/ directory.
×2 image rescaling
python3 train_rescaling.py --opt options/train/train_rescaling_x2.yml×4 image rescaling
python3 train_rescaling.py --opt options/train/train_rescaling_x4.ymlpython3 train_compression.py --opt options/train/train_compression_x2.ymlpython3 train_denoising.py --opt options/train/train_denoising.ymlThis codebase is built upon HCFlow and is also inspired by IRN and BasicSR.