An interface for NVIDIA's gauGAN project that turns crude drawings into realistic images using AI.
Project description
gaugan.py
A Python package providing an interface to NVIDIA's gauGAN project (http://nvidia-research-mingyuliu.com/gaugan/), which turns crude drawings into realistic images using AI.
Installation
pip install gaugan
Usage
processImage(image = imageBytes, [style = 1], [url = 'http://12.34.56.78:90/'])
Returns a bytes object of the processed image in JPG format.
Parameters
image
A bytes object of a PNG image containing a map (the drawing).
style (optional)
Valid values are 'random' or an integer. Default is 'random'.
url (optional)
An URL of a gauGAN server. Useful for bulk processing, as by default it gets a new URL every time processImage() is called. It is necessary because the URLs are changed periodically. You can get an URL from the getUrl() function.
Example
import gaugan, PIL
from PIL import Image
with open('input.png', "rb") as fh:
image = gaugan.processImage(fh.read())
PIL.Image.open(image).show()
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file gaugan-1.tar.gz.
File metadata
- Download URL: gaugan-1.tar.gz
- Upload date:
- Size: 2.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.22.0 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.51.0 CPython/3.8.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
62005fc328a79295b6c9aaf057b1e393e0a87c0eee379b91435f28622346df29
|
|
| MD5 |
3f6a0bf047387f4b94926aa35baba6f3
|
|
| BLAKE2b-256 |
aa2663b2989cf8dcf9ce39f00c33fcccc741802dab68cbeb06d4b460604923f6
|
File details
Details for the file gaugan-1-py3-none-any.whl.
File metadata
- Download URL: gaugan-1-py3-none-any.whl
- Upload date:
- Size: 3.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.22.0 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.51.0 CPython/3.8.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6cb0cf2b5bdb9242fe8c4a72bef134d0f7fdb03b8b2427d9ad1798291e3465ad
|
|
| MD5 |
085f600081f4da8981f5423b87a23d9d
|
|
| BLAKE2b-256 |
836bd1702ca70f6a538ece41ae653f3643b22c9b0840288ee2ecec0920d3ba04
|