<commit_before># Fast Style Combination

Thanks [https://github.com/anishathalye/neural-style][original-code] for the original code of [neural style][paper].

We modify the algorithms of [neural style][paper] to combine the styles of different images and speed up the orignal algorithm.

**See [here][lengstrom-fast-style-transfer] for an implementation of [fast
(feed-forward) neural style][fast-neural-style] in TensorFlow.**

## Running

`python neural_style.py --content <content file> --styles <style file> --output <output file>`

Run `python neural_style.py --help` to see a list of all options.

Use `--checkpoint-output` and `--checkpoint-iterations` to save checkpoint images.

Use `--iterations` to change the number of iterations (default 150).

## Example1
![output](examples/1-output.jpg)

The content input image was a picture of the Stata Center at MIT:

![input-content](examples/1-content.jpg)

The style pictures are as follows:

![input-style](examples/1-style1.jpg)
![input-style](examples/1-style2.jpg)


## Example2

![output](examples/2-output.jpg)

The content input image was a picture of the Stata Center at MIT:

![input-content](examples/2-content.jpg)

The style pictures are as follows:
<commit_msg>tubingen<commit_after># Fast Style Combination

Thanks [https://github.com/anishathalye/neural-style][original-code] for the original code of [neural style][paper].

We modify the algorithms of [neural style][paper] to combine the styles of different images and speed up the orignal algorithm.

**See [here][lengstrom-fast-style-transfer] for an implementation of [fast
(feed-forward) neural style][fast-neural-style] in TensorFlow.**

## Running

`python neural_style.py --content <content file> --styles <style file> --output <output file>`

Run `python neural_style.py --help` to see a list of all options.

Use `--checkpoint-output` and `--checkpoint-iterations` to save checkpoint images.

Use `--iterations` to change the number of iterations (default 150).

## Example1
![output](examples/1-output.jpg)

The content input image was a picture of the Stata Center at MIT:

![input-content](examples/1-content.jpg)

The style pictures are as follows:

![input-style](examples/1-style1.jpg)
![input-style](examples/1-style2.jpg)


## Example2

![output](examples/2-output.jpg)

The content input image is Tubingen, German:

![input-content](examples/2-content.jpg)

The style pictures are as follows:

{'fraction_non_alphanumeric': 0.12202136400986031, 'fraction_numerical': 0.010682004930156122, 'mean_word_length': 4.783847980997625, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, 'https://': 2, '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': '2780174', 'n_tokens_mistral': 759, 'n_tokens_neox': 726, 'n_words': 258}