March 2019
Intermediate to advanced
196 pages
4h 50m
English
Next, we use calls to the two preceding functions to display our content and style images, remembering that the image pixels need to be of type unsigned 8-bit integer. The plt.subplot(1,2,1) function means use a grid of one row and two columns at position one; plt.subplot(1,2,2) means use a grid of one row and two columns at position two:
channel_means = [103.939, 116.779, 123.68] # means of the BGR channels, for VGG processingplt.figure(figsize=(10,10))content_image = load_image(content_path).astype('uint8')style_image = load_image(style_path).astype('uint8')plt.subplot(1, 2, 1)show_image(content_image, 'Content Image')plt.subplot(1, 2, 2)show_image(style_image, 'Style Image')plt.show()
The output is shown in ...
Read now
Unlock full access