Assignment4 Neural Style Transfer
Name : Divam Gupta
Andrew ID : divamg
Contents:
Content Reconstruction
bash content_loss_exps.sh
Effect of optimizing content loss at different layers
Used tubingen.jpeg for the experiment
![](Assignment4%20Neural%20Style%20Transfer%205b4086fbe9784813bc92c24171314ced/Untitled.png)
![](Assignment4%20Neural%20Style%20Transfer%205b4086fbe9784813bc92c24171314ced/Untitled%201.png)
![](Assignment4%20Neural%20Style%20Transfer%205b4086fbe9784813bc92c24171314ced/Untitled%202.png)
![](Assignment4%20Neural%20Style%20Transfer%205b4086fbe9784813bc92c24171314ced/Untitled%203.png)
![](Assignment4%20Neural%20Style%20Transfer%205b4086fbe9784813bc92c24171314ced/Untitled%204.png)
We can see that as we go higher, the reconstruction is more noisy.
Results of two random noises
used phipps.jpeg
![](Assignment4%20Neural%20Style%20Transfer%205b4086fbe9784813bc92c24171314ced/Untitled%205.png)
![](Assignment4%20Neural%20Style%20Transfer%205b4086fbe9784813bc92c24171314ced/Untitled%206.png)
We can see that the outputs of both the runs are pretty much the same.
Texture Synthesis
Used the starry night for this experiment.
bash texture_exps.sh
Effect of optimizing texture loss at different layers
![](Assignment4%20Neural%20Style%20Transfer%205b4086fbe9784813bc92c24171314ced/Untitled%207.png)
![](Assignment4%20Neural%20Style%20Transfer%205b4086fbe9784813bc92c24171314ced/Untitled%208.png)
![](Assignment4%20Neural%20Style%20Transfer%205b4086fbe9784813bc92c24171314ced/Untitled%209.png)
![](Assignment4%20Neural%20Style%20Transfer%205b4086fbe9784813bc92c24171314ced/Untitled%2010.png)
Results of two random noises
![](Assignment4%20Neural%20Style%20Transfer%205b4086fbe9784813bc92c24171314ced/Untitled%2011.png)
![](Assignment4%20Neural%20Style%20Transfer%205b4086fbe9784813bc92c24171314ced/Untitled%2012.png)
- We see as we use higher level conv layers then we can see more complex patterns in the synthesizes texture.
- We also see that the two diffrent outputs are similar but not exactly the same
Style Transfer
bash style_transfer_exps.sh
Implementation details
Hyperparamers
- style_layers=conv_1,conv_2,conv_3,conv_4,conv_5
- style_weight=100000
- content_weight=1
- num_steps=300
- content_layers=conv_4
Grid of results
![](Assignment4%20Neural%20Style%20Transfer%205b4086fbe9784813bc92c24171314ced/Untitled%2013.png)
Compare with random initialization
![](Assignment4%20Neural%20Style%20Transfer%205b4086fbe9784813bc92c24171314ced/Untitled%2014.png)
![](Assignment4%20Neural%20Style%20Transfer%205b4086fbe9784813bc92c24171314ced/Untitled%2015.png)
We see that content image initialization is much better
Style transfer on my images