pip install git+https://github.com/moritztng/prism.git
style-transfer content.jpg style.jpg
style-transfer content.jpg style.jpg --artwork artwork.png --style_weight 1000 --lr 1 --iter 500
# Create low-resolution artwork with area of 512 * 512.
style-transfer content.jpg style.jpg
# Initialize with low-resolution artwork to create artwork with area of 1024 * 1024.
style-transfer content.jpg style.jpg --init_img artwork.png --area 1024 --iter 200
Faster training, less memory, same quality on GPUs.
style-transfer content.jpg style.jpg --use_amp
style-transfer content.jpg style.jpg --preserve_color content
from PIL import Image
from style_transfer.learn import StyleTransfer
style_transfer = StyleTransfer()
artwork = style_transfer(Image.open('content.jpg'), Image.open('style.jpg'))
artwork.save('artwork.png')
The shop was based on this implementation and customers ordered canvas prints there.