No project description provided
Project description
Style_Image
This simple python package takes two images, the style image, and the content image, and performs style transfer. It was created to explain how to build python packages using poetry.
style_image
uses the magenta/arbitrary-image-stylization-v1-256
model under the hood available in TensorflowHub.
To get more info about the model check this link : magenta/arbitrary-image-stylization-v1-256
Installation
To install the package, run the following command:
pip install style_image
You can use style_image
from the command line or using the python API.
use in the terminal
For running style_image
from the terminal, run the command below.
style_image -s picasso_violin -c /Users/haruiz/style_image/data/content_image.jpg -sz 800
To get more information about the parameters that need to be provided, run the command style_image --help
.
Use from code
from style_image import StyleImage
if __name__ == "__main__":
content_image_path = "data/content_image.jpg"
style_image_path = "https://upload.wikimedia.org/wikipedia/commons/thumb/e/ea/Van_Gogh_-_Starry_Night_-_Google_Art_Project.jpg/1024px-Van_Gogh_-_Starry_Night_-_Google_Art_Project.jpg"
stylized_image = (
StyleImage(style_image_path)
.transfer(content_image_path, output_image_size=800)
.save("stylized_image.jpg")
)
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
Hashes for style_image-0.1.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 99a6208ee39a09dbacebd71f506e552c3c95b45d97bdb025047ea4d0c3ce7698 |
|
MD5 | 8a87b7b663174207f3b3adef73b3fb13 |
|
BLAKE2b-256 | 1b121cfd352016cfb1d252b6f8459667c78536eb46cac3401cc0c7fc97d707c6 |