Skip to content

Open-source Library of Image Super-Resolution Models, Datasets, and Metrics for Benchmarking or Pretrained Use

License

Notifications You must be signed in to change notification settings

alanderex/pytorch-enhance

 
 

Repository files navigation

pytorch-enhance: Image Super-Resolution in PyTorch

PyPI version PyPI - Downloads GitHub Travis (.com) DOI

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.

Documentation

https://pytorch-enhance.readthedocs.io

Installation

pip

pip install torch-enhance

latest

git clone https://github.com/IsaacCorley/pytorch-enhance.git
cd pytorch-enhance
python setup.py install

Models

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]

State-of-the-Art

Not sure which models are currently the best? Check out the PapersWithCode Image Super-Resolution Leaderboards

Datasets

The following benchmark datasets are available for usage:

Dataset Samples

BSDS300 BSDS500 T91
Set5 Set14 Historical

Losses

  • Perceptual Loss (VGG16)

Metrics

  • Mean Squared Error (MSE)
  • Mean Absolute Error (MAE)
  • Peak-Signal-Noise-Ratio (PSNR)

Examples

$ cd examples

Running Tests

$ pytest -ra

Cite

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

About

Open-source Library of Image Super-Resolution Models, Datasets, and Metrics for Benchmarking or Pretrained Use

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Python 100.0%