CASR : Efficient Cascade Network Structure with Channel Aligned method for 4K Real-Time Single Image Super-Resolution
Achieve 1st Place in CVPR2024 Workshop AIS2024 RTSR Challenge 🎉
Please refer to the following simple steps for installation.
git clone https://github.com/rlghksdbs/CASR.git
cd CASR
pip install -r requirements.txt
docker build --tag ais2024 .
nvidia-docker run --name ais2024 -it --gpus all --ipc=host --pid=host -v /your/data/path/:/AIS2024/dataset -v /your/sorce_code/:/AIS2024/source_code --shm-size=64g ais2024:latest
pip install -U numpy
##If you use RTX A6000
pip install torch==1.12.0+cu116 torchvision==0.13.0+cu116 torchaudio==0.12.0 --extra-index-url https://download.pytorch.org/whl/cu116
AIS2024 dataset from Web AIS2024
Div2k train dataset from Web DIV2K
Div2k validation bicubic dataset from Web validation
Path of Dataset must be set in ./config/name_of_yaml.yaml
You can generate LR images with compression noise 75EF . (FFMpeg 6.1 Version)
## LR path & HR path must be set by manually
python png2avif.py
You can generate LR images with compression noise.
## LR path & HR path must be set by manually
python source/data/prepare_data.py
You could also try less/larger batch-size, if there are limited/enough hardware resources in your GPU-server. We use simple yamlfile for various settings during training. You can set all Parameters at yaml file ./config/name_of_model.yaml
cd CASR
## Scratch Stage
python train.py --config ./configs/AIS_scratch_model.yml
## Fine-Tunning Stage
python train.py --config ./configs/AIS_finetune_model.yml
## Lightweight-Tunning Stage
python train.py --config ./configs/AIS_lasttune_model.yml
You can set all Parameters in ./config/config_base_test.yaml
## For test your model use sr_demo to check inference time.
python sr_demo.py
Validation result image, Test result image, Best weight, Last weight and log files saved in this ./output/{DATE_of_TODAY}/{Last_folder} folder. Wandb result WANDB
You can check ideal model inference time by pytorch profilling tool. You can set all Parameters in ./config/config_base.yaml
## If you set all settings correct
python profiller_model.py
@InProceedings{Yoon_2024_CVPR,
author = {Yoon, Kihwan and Gankhuyag, Ganzorig and Park, Jinman and Son, Haengseon and Min, Kyoungwon},
title = {CASR: Efficient Cascade Network Structure with Channel Aligned method for 4K Real-Time Single Image Super-Resolution},
booktitle = {Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR) Workshops},
month = {June},
year = {2024},
pages = {7911-7920}
}