Skip to main content

PIL × DAT - Pillow extension for AI-based image upscaling.

Project description

iLoveData

PIL × DAT - Pillow extension for AI-based image upscaling.

License


Installation

For PyPI:

pip install pillow-dat

Get started

    1. Download DAT_light_x2.pth model weight from Google Drive. We highly recommend utilizing DAT_light_x*.pth models due to their lightweight design and exceptional speed.
    1. 🎉 Then you are all set to upscale your images:
from PIL.Image import open
from PIL_DAT.Image import upscale

image = open("./lumine.png")
image = upscale(lumine_image, "./DAT_light_x2.pth", 2)
image.show()

Contribution

Please install Miniconda.

Please install VSCode extensions:

  • Black Formatter
  • isort
  • Python
  • Pylance

To create or update the pillow-dat Python environment:

conda env create --file environment.yml
conda env update --file environment.yml --prune

To install dependencies:

poetry install

To run unit tests:

pytest

Acknowledgement

This library is founded upon the pioneering research paper, "Dual Aggregation Transformer for Image Super-Resolution".

@inproceedings{chen2023dual,
    title={Dual Aggregation Transformer for Image Super-Resolution},
    author={Chen, Zheng and Zhang, Yulun and Gu, Jinjin and Kong, Linghe and Yang, Xiaokang and Yu, Fisher},
    booktitle={ICCV},
    year={2023}
}

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pillow_dat-0.1.3.tar.gz (16.6 kB view hashes)

Uploaded Source

Built Distribution

pillow_dat-0.1.3-py3-none-any.whl (19.2 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page