isaaccorley / pytorch-enhance

Open-source Library of Image Super-Resolution Models, Datasets, and Metrics for Benchmarking or Pretrained Use
Apache License 2.0
80 stars 12 forks source link
artificial-intelligence computer-vision deep-learning pytorch super-resolution

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

Metrics

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