pypi package 'style-image'

Popularity: Low
Installation: pip install style-image
Last version: 0.1.0 (Download)
Size: 5.21 kB


Last modified: August 5, 2022 10:47 PM (6 days ago)
Versions released in one year: 1
Weekly downloads: 0



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


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 = ""

    stylized_image = (
        .transfer(content_image_path, output_image_size=800)