PIL × DAT - Pillow extension for AI-based image upscaling.
Project description
PIL × DAT - Pillow extension for AI-based image upscaling.
Installation
For PyPI:
pip install pillow-dat
For Conda:
conda install -c conda-forge pillow-dat
Get started
-
- Download
DAT_light_x2.pth
model weight from Google Drive. We highly recommend utilizingDAT_light_x*.pth
models due to their lightweight design and exceptional speed.
- Download
-
- 🎉 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
Release history Release notifications | RSS feed
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.1.tar.gz
(15.7 kB
view details)
Built Distribution
File details
Details for the file pillow_dat-0.1.1.tar.gz
.
File metadata
- Download URL: pillow_dat-0.1.1.tar.gz
- Upload date:
- Size: 15.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.2 CPython/3.12.2 Windows/11
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | db6722d7e194f20f7996671413d88d0bf5bbabc770241270c9df0936c264213b |
|
MD5 | 279462ca9ce0ce796082951bdd71cf5e |
|
BLAKE2b-256 | 442f5493ffded51b0465af8971cbd7005ca0dce958a8b2182bf44f19e95ce642 |
File details
Details for the file pillow_dat-0.1.1-py3-none-any.whl
.
File metadata
- Download URL: pillow_dat-0.1.1-py3-none-any.whl
- Upload date:
- Size: 18.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.2 CPython/3.12.2 Windows/11
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | a61b989ff57143fe0bd8e9b8089011bdf9869b116b59fa983c646a4a41a7974d |
|
MD5 | 87375af7f0b962f929366c7e425e527e |
|
BLAKE2b-256 | 4ebae627f24b435aacba21c7df759be8514c0dd5eedf6b65427ad4a9449807f7 |