anishathalye / neural-style

Neural style in TensorFlow! 🎨
https://anishathalye.com/an-ai-that-can-mimic-any-artist/
GNU General Public License v3.0
5.54k stars 1.52k forks source link

Is there a way to extract the style features i.e. corresponding to relu5_1 ? #107

Closed vikiboy closed 6 years ago

vikiboy commented 6 years ago

Is there a way to display the style features like the ones shown in Fig. 1 of the original "A Neural Algorithm of Artistic Style" paper ( Style Reconstructions ‘conv5 1’ (e) ) ?

I tried modifying the code to save the style_features list in stylize.py, which has 5 dictionary keys corresponding to the VGG layers, and the values corresponding to arrays of size (64,64), (128,128), (256,256),(512,512), (512,512).

I am guessing these are the style features of the style image. Is there any way I can visualize these the same way as shown in the paper ?

anishathalye commented 6 years ago

The code isn't set up to do this, but you could do it by choosing your style layers appropriately here, supplying an arbitrary content image, and setting content weight to 0.