Skip to content

kimtaehyeong/NTIRE2023_ImageSR_x4_LDCC

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Latent Discriminative Cosine Criterion (LDCC) Overview

Environment

How to test the baseline model?

  1. git clone https://github.com/kimtaehyeong/NTIRE2023_ImageSR_x4_LDCC.git
  2. The models weights should download to model_zoo directory at Google Drive
  3. Select the model you would like to test from run.sh
    CUDA_VISIBLE_DEVICES=0 python test_demo.py --data_dir [path to your data dir] --save_dir [path to your save dir] --model_id [number]
    for example :
     CUDA_VISIBLE_DEVICES=0 python test_demo.py --data_dir /home/work/NTIRE/dataset/SUB --save_dir ./results --model_id 2
    • Be sure the change the directories --data_dir and --save_dir.
    • This repository is based on a link.
    • We provide a baseline of our model based on HAT. The code and pretrained models of our models are provided. Our baseline are all test normally with run.sh.

How to calculate the number of parameters, FLOPs, and activations

    from utils.model_summary import get_model_flops, get_model_activation
    from models.team00_RFDN import RFDN
    model = RFDN()
    
    input_dim = (3, 256, 256)  # set the input dimension
    activations, num_conv = get_model_activation(model, input_dim)
    activations = activations / 10 ** 6
    print("{:>16s} : {:<.4f} [M]".format("#Activations", activations))
    print("{:>16s} : {:<d}".format("#Conv2d", num_conv))

    flops = get_model_flops(model, input_dim, False)
    flops = flops / 10 ** 9
    print("{:>16s} : {:<.4f} [G]".format("FLOPs", flops))

    num_parameters = sum(map(lambda x: x.numel(), model.parameters()))
    num_parameters = num_parameters / 10 ** 6
    print("{:>16s} : {:<.4f} [M]".format("#Params", num_parameters))

Acknowledgement

This code is built on HAT codebase. We thank the authors for sharing the codes.

Team

Jungkeong Kil, Eon Kim, Taehyung Kim, Yeonseung Yu, Beomyeol Lee, Subin Lee, Seokjae Lim, Somi Chae, Heungjun Choi

License

This code repository is release under MIT License.

About

NTIRE 2023 Super-Resolution x4 LDCC Team

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published