Library for Minimal Modern Image Super-Resolution in PyTorch
PyTorch Enhance provides a consolidated package of popular Image Super-Resolution models, datasets, and metrics to allow for quick and painless benchmarking or for quickly adding pretrained models to your application.
https://pytorch-enhance.readthedocs.io
pip install torch-enhance
git clone https://github.com/IsaacCorley/pytorch-enhance.git
cd pytorch-enhance
python setup.py install
The following models are currently implemented:
import torch
import torch_enhance
# increase resolution by factor of 2 (e.g. 128x128 -> 256x256)
model = torch_enhance.models.SRResNet(scale_factor=2, channels=3)
lr = torch.randn(1, 3, 128, 128)
sr = model(x) # [1, 3, 256, 256]
Not sure which models are currently the best? Check out the PapersWithCode Image Super-Resolution Leaderboards
The following benchmark datasets are available for usage:
BSDS300 | BSDS500 | T91 |
---|---|---|
Set5 | Set14 | Historical |
---|---|---|
$ cd examples
$ pytest -ra
Please cite this repository if you used this code in your own work:
@software{isaac_corley_2020_3739368,
author = {Isaac Corley},
title = {PyTorch Enhance},
month = apr,
year = 2020,
publisher = {Zenodo},
version = {0.1.2},
doi = {10.5281/zenodo.3739368},
url = {https://doi.org/10.5281/zenodo.3739368}
}