8000 GitHub - rlghksdbs/CASR
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

rlghksdbs/CASR

Repository files navigation

CASR : Efficient Cascade Network Structure with Channel Aligned method for 4K Real-Time Single Image Super-Resolution

Kihwan Yoon1  Ganzorig Gankhuyag* 2  Jinman Park2 Haengseon Son2 Kyungwon Mon2
*Equal Contribution
1University of Seoul, South Korea
2Korea Electronics Technology Institute, South Korea

Achieve 1st Place in CVPR2024 Workshop AIS2024 RTSR Challenge 🎉

Page & Presentation Link

Dependencies & Installation

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 Setting

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

Prepare Dataset

Download Train & Test Dataset

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

Dataset preparation for AVIF LR images

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 

Dataset preparation for Noised LR images

You can generate LR images with compression noise.

## LR path & HR path must be set by manually
python source/data/prepare_data.py 

Training and Reproduction

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

Testing

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

Check Result

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

Profilling model inference time

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

Citation

@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}
}

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published
0