Skip to main content
  1. Projects/

Deepai

·117 words·1 min
Jake Roggenbuck
Author
Jake Roggenbuck
I am currently studying Computer Science

Deepai #

Use the deepdream API and other APIs from deepai to convert, upscale, and change images in interesting ways

Use #

Use as CLI #

python3 main.py -i ~/Downloads/input_image.jpg -o image.png -n NeuralStyle -s ~/Downloads/vangohg.png

python3 main.py -i ~/Downloads/input_image.jpg -o image.png -n DeepDream

Use as library #

from main import DeepImage

# NeuralStyle
style_name = "NeuralStyle"
input_file = "~/Downloads/input_image.png"
output_file = "~/Downloads/output_image.png"
style_image = "~/Downloads/style_image.png"

deep = Deep(style_name, input_file, output_file, style_image)


# DeepDream
style_name = "DeepDream"
input_file = "~/Downloads/input_image.png"
output_file = "~/Downloads/output_image.png"

deep = Deep(style_name, input_file, output_file)
deep.download()

Config #

Make the config and get an api key at deepai.org config.py

KEY = "API-KEY"
urls:
    - DeepDream: "https://api.deepai.org/api/deepdream"
    - Colorizer: "https://api.deepai.org/api/colorizer"
    - NeuralStyle: "https://api.deepai.org/api/neural-style"

Example #

Example image
Example image