Command line¶
stylish¶
Style transfer using deep neural network
stylish [OPTIONS] COMMAND [ARGS]...
Options
-
--version¶ Show the version and exit.
-
-v,--verbosity<verbosity>¶ Set the logging output verbosity. [default: info]
Options: debug|info|warning|error
apply¶
Apply a style generator model to an image.
stylish apply [OPTIONS]
Options
-
--model<model>¶ Path to trained style generator model which will be used to apply the style. [required]
-
-i,--input<input>¶ Path to image to transform. [required]
-
-o,--output<output>¶ Path to folder in which the transformed image will be saved. Current directory is used by default. [required]
download¶
Download necessary elements to train a style generator model
Example:
stylish download vgg19 stylish download coco2014 -o /tmp
stylish download [OPTIONS] COMMAND1 [ARGS]... [COMMAND2 [ARGS]...]...
extract¶
Extract the style to an image.
stylish extract [OPTIONS]
Options
-
--vgg<vgg>¶ Path to Vgg19 pre-trained model in the MatConvNet data format.
-
-s,--style<style>¶ Path to image from which the style features will be extracted.
-
-o,--output<output>¶ Path to folder in which the style pattern image will be saved. Current directory is used by default.
train¶
Train a style generator model.
stylish train [OPTIONS]
Options
-
--vgg<vgg>¶ Path to Vgg19 pre-trained model in the MatConvNet data format.
-
-s,--style<style>¶ Path to image from which the style features will be extracted.
-
-t,--training<training>¶ Path to a training dataset folder (e.g. COCO 2014).
-
--limit<limit>¶ Maximum number of files to use from the training dataset folder.
-
-l,--learning-rate<learning_rate>¶ Learning rate for optimizer. [default: 0.001]
-
-b,--batch-size<batch_size>¶ Batch size for training. [default: 4]
-
-e,--epochs<epochs>¶ Epochs to train for. [default: 2]
-
-C,--content-weight<content_weight>¶ Weight of content in loss function. [default: 7.5]
-
-S,--style-weight<style_weight>¶ Weight of style in loss function. [default: 100.0]
-
-T,--tv-weight<tv_weight>¶ Weight of total variation term in loss function. [default: 200.0]
-
-o,--output<output>¶ Path to folder in which the trained model will be saved. Current directory is used by default.
-
--log-path<log_path>¶ Path to extract the log information. Default is the same path as the output path.
transfer¶
Transfer a style to an image.
stylish transfer [OPTIONS]
Options
-
--vgg<vgg>¶ Path to Vgg19 pre-trained model in the MatConvNet data format.
-
-i,--input<input>¶ Path to image to transform. [required]
-
-s,--style<style>¶ Path to image from which the style features will be extracted.
-
-l,--learning-rate<learning_rate>¶ Learning rate for optimizer. [default: 0.001]
-
-I,--iterations<iterations>¶ Iterations to train for. [default: 100]
-
-C,--content-weight<content_weight>¶ Weight of content in loss function. [default: 7.5]
-
-S,--style-weight<style_weight>¶ Weight of style in loss function. [default: 100.0]
-
-T,--tv-weight<tv_weight>¶ Weight of total variation term in loss function. [default: 200.0]
-
-o,--output<output>¶ Path to folder in which the transformed image will be saved. Current directory is used by default.
-
--log-path<log_path>¶ Path to extract the log information. Default is the same path as the output path.