titu1994 / Neural-Style-Transfer

Keras Implementation of Neural Style Transfer from the paper "A Neural Algorithm of Artistic Style" (http://arxiv.org/abs/1508.06576) in Keras 2.0+
Apache License 2.0
2.26k stars 481 forks source link

Google colab neural style transfer #65

Closed deepdreamstyle closed 4 years ago

deepdreamstyle commented 4 years ago

is there anyway to make higher to 500 px in Google colab? I can change IMAGE_SIZE, but only under 500. Thanks in advance!

Image size

IMAGE_SIZE = 500

Loss Weights

CONTENT_WEIGHT = 0.025 STYLE_WEIGHT = 1.0 STYLE_SCALE = 1.0 TOTAL_VARIATION_WEIGHT = 8.5e-5 CONTENT_LOSS_TYPE = 0

Training arguments

NUM_ITERATIONS = 10 MODEL = 'vgg19' RESCALE_IMAGE = 'false' MAINTAIN_ASPECT_RATIO = 'false' # Set to false if OOM occurs

Transfer Arguments

CONTENT_LAYER = 'conv' + '5_2' # only change the number 5_2 to something in a similar format INITIALIZATION_IMAGE = 'content' POOLING_TYPE = 'max'

Extra arguments

PRESERVE_COLOR = 'false' MIN_IMPROVEMENT = 0.0

titu1994 commented 4 years ago

Depends on whether you can access a high GPU memory system or not. Anything larger than 500 takes more than 4 GB of memory for the image. + The VGG itself takes a lot of memory c

deepdreamstyle commented 4 years ago

oh ok i got it. thanks!