{"id":17053851,"url":"https://github.com/isaaccorley/pytorch-enhance","last_synced_at":"2025-04-12T16:46:22.555Z","repository":{"id":41251133,"uuid":"230674803","full_name":"isaaccorley/pytorch-enhance","owner":"isaaccorley","description":"Open-source Library of Image Super-Resolution Models, Datasets, and Metrics for Benchmarking or Pretrained Use","archived":false,"fork":false,"pushed_at":"2021-09-03T11:55:19.000Z","size":30498,"stargazers_count":81,"open_issues_count":6,"forks_count":11,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-04-09T13:08:27.741Z","etag":null,"topics":["artificial-intelligence","computer-vision","deep-learning","pytorch","super-resolution"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/isaaccorley.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-12-28T22:23:10.000Z","updated_at":"2025-04-03T01:13:16.000Z","dependencies_parsed_at":"2022-08-10T01:43:20.456Z","dependency_job_id":null,"html_url":"https://github.com/isaaccorley/pytorch-enhance","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/isaaccorley%2Fpytorch-enhance","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/isaaccorley%2Fpytorch-enhance/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/isaaccorley%2Fpytorch-enhance/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/isaaccorley%2Fpytorch-enhance/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/isaaccorley","download_url":"https://codeload.github.com/isaaccorley/pytorch-enhance/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248600797,"owners_count":21131551,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["artificial-intelligence","computer-vision","deep-learning","pytorch","super-resolution"],"created_at":"2024-10-14T10:13:26.843Z","updated_at":"2025-04-12T16:46:22.515Z","avatar_url":"https://github.com/isaaccorley.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"![](assets/pytorch-enhance-logo-cropped.png)\n\n# pytorch-enhance: Image Super-Resolution in PyTorch\n[![PyPI version](https://badge.fury.io/py/torch-enhance.svg)](https://badge.fury.io/py/torch-enhance)\n![PyPI - Downloads](https://img.shields.io/pypi/dm/torch-enhance?style=plastic)\n![GitHub](https://img.shields.io/github/license/IsaacCorley/pytorch-enhance?style=plastic)\n![Travis (.com)](https://img.shields.io/travis/com/IsaacCorley/pytorch-enhance?style=plastic)\n[![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.3739368.svg)](https://doi.org/10.5281/zenodo.3739368)\n\nLibrary for Minimal Modern Image Super-Resolution in PyTorch\n\n\n--------------------------------------------------------------------------------\nPyTorch 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.\n\n## Documentation\n\n[https://pytorch-enhance.readthedocs.io](https://pytorch-enhance.readthedocs.io)\n\n## Installation\n\n### pip\n```\npip install torch-enhance\n```\n\n### latest\n```\ngit clone https://github.com/IsaacCorley/pytorch-enhance.git\ncd pytorch-enhance\npython setup.py install\n```\n\n## Models\nThe following models are currently implemented:\n\n* **SRCNN** from Dong et. al [Image Super-Resolution Using Deep Convolutional Networks](https://arxiv.org/pdf/1501.00092v3.pdf)\n* **VDSR** from Lee et al. [Accurate Image Super-Resolution Using Very Deep Convolutional Networks](https://arxiv.org/pdf/1511.04587.pdf)\n* **ESPCN** from Shi et. al [Real-Time Single Image and Video Super-Resolution Using an Efficient Sub-Pixel Convolutional Neural Network](https://arxiv.org/pdf/1609.05158v2.pdf)\n* **SRResNet** from Ledig et. al [Photo-Realistic Single Image Super-Resolution Using a Generative Adversarial Network](https://arxiv.org/pdf/1609.04802v5.pdf)\n* **EDSR** from Lim et. al [Enhanced Deep Residual Networks for Single Image Super-Resolution](https://arxiv.org/pdf/1707.02921v1.pdf)\n\n```python\nimport torch\nimport torch_enhance\n\n# increase resolution by factor of 2 (e.g. 128x128 -\u003e 256x256)\nmodel = torch_enhance.models.SRResNet(scale_factor=2, channels=3)\n\nlr = torch.randn(1, 3, 128, 128)\nsr = model(x) # [1, 3, 256, 256]\n```\n\n## State-of-the-Art\nNot sure which models are currently the best? Check out the [PapersWithCode Image Super-Resolution Leaderboards](https://paperswithcode.com/task/image-super-resolution)\n\n\n## Datasets\nThe following benchmark datasets are available for usage:\n\n* **[BSDS100](https://drive.google.com/drive/folders/1pRmhEmmY-tPF7uH8DuVthfHoApZWJ1QU)**\n* **[BSDS200](https://drive.google.com/drive/folders/1pRmhEmmY-tPF7uH8DuVthfHoApZWJ1QU)**\n* **[BSDS300](https://www2.eecs.berkeley.edu/Research/Projects/CS/vision/bsds/)**\n* **[BSDS500](https://www2.eecs.berkeley.edu/Research/Projects/CS/vision/grouping/resources.html)**\n* **[Set5](https://drive.google.com/drive/folders/1pRmhEmmY-tPF7uH8DuVthfHoApZWJ1QU)**\n* **[Set14](https://drive.google.com/drive/folders/1pRmhEmmY-tPF7uH8DuVthfHoApZWJ1QU)**\n* **[T91](https://drive.google.com/drive/folders/1pRmhEmmY-tPF7uH8DuVthfHoApZWJ1QU)**\n* **[Historical](https://drive.google.com/drive/folders/1pRmhEmmY-tPF7uH8DuVthfHoApZWJ1QU)**\n* **[Urban100](https://drive.google.com/drive/folders/1pRmhEmmY-tPF7uH8DuVthfHoApZWJ1QU)**\n* **[Manga109](https://drive.google.com/drive/folders/1pRmhEmmY-tPF7uH8DuVthfHoApZWJ1QU)**\n* **[General100](https://drive.google.com/drive/folders/1pRmhEmmY-tPF7uH8DuVthfHoApZWJ1QU)**\n* **[DIV2K](https://data.vision.ee.ethz.ch/cvl/DIV2K/)**\n\n\n## Dataset Samples\n\n**BSDS300**                 |  **BSDS500**              |   **T91**\n:-------------------------:|:-------------------------:|:-------------------------:\n![](assets/BSDS300.gif)  |  ![](assets/BSDS500.gif)     | ![](assets/T91.gif) \n\n**Set5**                    |  **Set14**                |   **Historical**\n:-------------------------:|:-------------------------:|:-------------------------:\n![](assets/Set5.gif)  |  ![](assets/Set14.gif)          | ![](assets/Historical.gif) \n\n## Losses\n\n* **Perceptual Loss (VGG16)**\n\n## Metrics\n\n* **Mean Squared Error (MSE)**\n* **Mean Absolute Error (MAE)**\n* **Peak-Signal-Noise-Ratio (PSNR)**\n\n## Examples\n\n```\n$ cd examples\n```\n\n* **[Get up and benchmarking quickly with PyTorch Lightning](examples/pytorch_lightning_example.py)**\n* **[Coming from Keras? Try our example using the Poutyne library](examples/poutyne_example.py)**\n\n## Running Tests\n\n```\n$ pytest -ra\n```\n\n## Cite\n\nPlease cite this repository if you used this code in your own work:\n\n```\n@software{isaac_corley_2020_3739368,\n  author       = {Isaac Corley},\n  title        = {PyTorch Enhance},\n  month        = apr,\n  year         = 2020,\n  publisher    = {Zenodo},\n  version      = {0.1.2},\n  doi          = {10.5281/zenodo.3739368},\n  url          = {https://doi.org/10.5281/zenodo.3739368}\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fisaaccorley%2Fpytorch-enhance","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fisaaccorley%2Fpytorch-enhance","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fisaaccorley%2Fpytorch-enhance/lists"}