Home

Awesome

SRZoo

<p align="center"> <img src="figures/logo.png" alt="SRZoo"> </p> <p align="center"> <a href="https://github.com/idearibosome/srzoo"> <img src="https://img.shields.io/badge/srzoo-supported-brightgreen" alt="SRZoo" /> </a> <a href="#pre-trained-super-resolution-models"> <img src="https://img.shields.io/badge/models-29-blue" /> </a> </p>

Introduction

SRZoo is a collection of toolkits and models for deep learning-based image super-resolution. It provides various pre-trained state-of-the-art super-resolution models that are ready for use.

Here are the key features of SRZoo:

You can find our motivation and some detailed description of SRZoo such as performance comparison in the following paper.

Requirements

Pre-trained super-resolution models

We currently provide the following pre-trained super-resolution models, where the model parameters are provided by the original authors. Please cite the paper of the original authors when you use the models.

NameConfigUpscaling factorModelSource
EDSR-baselineedsr_baseline.json2edsr_baseline_x2.pbEDSR-PyTorch
EDSR-baselineedsr_baseline.json3edsr_baseline_x3.pbEDSR-PyTorch
EDSR-baselineedsr_baseline.json4edsr_baseline_x4.pbEDSR-PyTorch
EDSRedsr.json2edsr_x2.pbEDSR-PyTorch
EDSRedsr.json3edsr_x3.pbEDSR-PyTorch
EDSRedsr.json4edsr_x4.pbEDSR-PyTorch
EUSReusr.json2eusr_x2.pbEUSR-TensorFlow
EUSReusr.json4eusr_x4.pbEUSR-TensorFlow
EUSReusr.json8eusr_x8.pbEUSR-TensorFlow
DBPNdbpn.json2dbpn_x2.pbDBPN-Pytorch
DBPNdbpn.json4dbpn_x4.pbDBPN-Pytorch
DBPNdbpn.json8dbpn_x8.pbDBPN-Pytorch
RCANrcan.json2rcan_x2.pbRCAN
RCANrcan.json3rcan_x3.pbRCAN
RCANrcan.json4rcan_x4.pbRCAN
RCANrcan.json8rcan_x8.pbRCAN
MSRNmsrn.json2msrn_x2.pbMSRN-PyTorch
MSRNmsrn.json3msrn_x3.pbMSRN-PyTorch
MSRNmsrn.json4msrn_x4.pbMSRN-PyTorch
4PP-EUSR4pp_eusr.json44pp_eusr_pirm_x4.pbtf-perceptual-eusr
ESRGANesrgan.json4esrgan_x4.pbESRGAN
RRDBrrdb.json4rrdb_x4.pbESRGAN
CARNcarn.json2carn_x2.pbCARN-pytorch
CARNcarn.json3carn_x3.pbCARN-pytorch
CARNcarn.json4carn_x4.pbCARN-pytorch
FRSRfrsr_x2.json2frsr_x2.pbNatSR
FRSRnatsr.json3frsr_x3.pbNatSR
FRSRnatsr.json4frsr_x4.pbNatSR
NatSRnatsr.json4natsr_x4.pbNatSR

Super-resolved image retrieval

SRZoo offers a simple image retrieval via get_sr.py, e.g.,

python get_sr.py --config_path=configs/edsr.json --model_path=edsr_x4.pb --input_path=LR --output_path=SR --scale=4

Arguments:

※ Some models can be run only on GPUs due to the different ordering of the dimensions.

Performance evaluation

With the obtained super-resolved images, it is possible to evaluate the performance via evaluate_sr.py, e.g.,

python evaluate_sr.py --sr_path=SR --truth_path=HR

Arguments:

You can also write your own evaluation metric by implementing an evaluator class that inherits BaseEvaluator in the evaluators/ folder.

Model conversion

It is possible to convert the other pre-trained super-resolution models. Please refer to the converter/ folder for more information. In addition, please refer to the config/ folder to write your own model config file along with the converted model.

Miscellaneous

Image downscaling utilities

We also provide the downscaling utilities for evaluating the super-resolution models, which are in the utils/downscale/ folder.

Employing other image processing models

Since SRZoo is developed to deal with models considering images as both inputs and outputs, our repository can be used to employ the other image processing algorithms with only a few modifications. As a proof-of-concept, we provide a pre-trained deep learning-based image compression model in SRZoo.

NameConfigModelSource
fab-jul/imgcomp-cvprfabjul_imgcomp.jsonfabjul_imgcomp_a.pbimgcomp-cvpr
fab-jul/imgcomp-cvprfabjul_imgcomp.jsonfabjul_imgcomp_b.pbimgcomp-cvpr
fab-jul/imgcomp-cvprfabjul_imgcomp.jsonfabjul_imgcomp_c.pbimgcomp-cvpr

To use these models, simply set the upscaling factor (e.g., --scale option of get_sr.py) to 1. Note that only the GPU mode is currently supported for these models.