<commit_before># Instructions

### [weighted_neural_style_transfer.py](weighted_neural_style_transfer.py)

This is an advanced implementation of the paper [A Neural Algorithm of Artistic Style](http://arxiv.org/abs/1508.06576) in keras 2.0. To use this script, you need to provide a base image ,a mask of the base image(optional) and a style reference image.

The generated image is initialized with the base image. This algorithm uses the mask image to control the effect of gradients added on the base image, in order to make the key element in the base image to become more distinctive.

### [mask_style_transfer.py](mask_style_transfer.py)

This script requires a base image ,a mask of the base image and two different style reference images. 

This script will produce a combination image which is mixed with two different styles. One is generated into the key elements of the base image, and the other is generated into the background.

## Examples

### [weighted_neural_style_transfer.py](weighted_neural_style_transfer.py)

Base image:

![Taylor2](https://raw.githubusercontent.com/GloryDream/mask-neural-transfer/master/pic/Taylor2.jpeg)

Mask image:

![Taylor2_pascal_voc](https://raw.githubusercontent.com/GloryDream/mask-neural-transfer/master/pic/Taylor2_pascal_voc.png)

Style reference image:

![starry_night](https://raw.githubusercontent.com/GloryDream/mask-neural-transfer/master/pic/starry_night.jpg)

Result:

![maskeq0.5v0.5_at_iteration_9](https://raw.githubusercontent.com/GloryDream/mask-neural-transfer/master/pic/maskeq0.5v0.5_at_iteration_9.png)

### [mask_style_transfer.py](mask_style_transfer.py)

Base image:

![Taylor2](https://raw.githubusercontent.com/GloryDream/mask-neural-transfer/master/pic/Taylor2.jpeg)

Mask image:

![Taylor2_pascal_voc](https://raw.githubusercontent.com/GloryDream/mask-neural-transfer/master/pic/Taylor2_pascal_voc.png)

Background style reference image:

![starry_night](https://raw.githubusercontent.com/GloryDream/mask-neural-transfer/master/pic/starry_night.jpg)

Key element style reference image:

![picasso_selfport1907](https://raw.githubusercontent.com/GloryDream/mask-neural-transfer/master/pic/picasso_selfport1907.jpg)

Result:

![mix_maskv0.1_at_iteration_9](https://raw.githubusercontent.com/GloryDream/mask-neural-transfer/master/pic/mix_maskv0.1_at_iteration_9.png)

<commit_msg>README upgrades<commit_after># Instructions

### [weighted_neural_style_transfer.py](weighted_neural_style_transfer.py)

This is an advanced implementation of the paper [A Neural Algorithm of Artistic Style](http://arxiv.org/abs/1508.06576) in keras 2.0. To use this script, you need to provide a base image ,a mask of the base image(optional) and a style reference image.

The generated image is initialized with the base image. This algorithm uses the mask image to control the effect of gradients added on the base image, in order to make the key element in the base image to become more distinctive.

### [mask_style_transfer.py](mask_style_transfer.py)

This script requires a base image ,a mask of the base image and two different style reference images. 

This script will produce a combination image which is mixed with two different styles. One is generated into the key elements of the base image, and the other is generated into the background.

## Examples
### [weighted_neural_style_transfer.py](weighted_neural_style_transfer.py)
<img src="https://raw.githubusercontent.com/GloryDream/mask-neural-transfer/master/pic/Taylor2.jpeg" width=49% height=300 alt="<NAME>"> <img src="https://raw.githubusercontent.com/GloryDream/mask-neural-transfer/master/pic/starry_night.jpg" width=49% height=300 alt="starry night">
<br><br> Results after 10 iterations using the INetwork<br>
<img src="https://raw.githubusercontent.com/GloryDream/mask-neural-transfer/master/pic/maskeq0.5v0.5_at_iteration_9.png" width=98% height=450 alt="blue moon lake style transfer">

### [mask_style_transfer.py](mask_style_transfer.py)
<img src="https://raw.githubusercontent.com/GloryDream/mask-neural-transfer/master/pic/starry_night.jpg" height=300 width=50% alt="dawn sky anime"> <img src="https://raw.githubusercontent.com/GloryDream/mask-neural-transfer/master/pic/picasso_selfport1907.jpg" height=300 width=49%>

<img src="https://raw.githubusercontent.com/GloryDream/mask-neural-transfer/master/pic/Taylor2.jpeg" height=300 width=50%> <img src="https://raw.githubusercontent.com/GloryDream/mask-neural-transfer/master/pic/mix_maskv0.1_at_iteration_9.png" height=300 width=49% alt="dawn sky style transfer anime">




{'fraction_non_alphanumeric': 0.10653222270933801, 'fraction_numerical': 0.023016220955721176, 'mean_word_length': 5.934650455927052, 'pattern_counts': {'":': 0, '<': 14, '<?xml version=': 0, '>': 14, 'https://': 16, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1129140', 'n_tokens_mistral': 1526, 'n_tokens_neox': 1435, 'n_words': 360}