Image style transfer using a style attentional network.
- install requirements with
pip install -r requirements.txt
- get your kaggle API key from here
- start training with
python3 train.py
content_dir
directory to content images (default todata/content
)style_dir
directory to style images (default todata/style
)vgg
pretrained vgg file (default topretrained/vgg.pth
)lr
leaning ratelr_decay
leaning rate decaymax_iter
maximum number of iterations (default to 160,000)batch_size
number of image pairs in a batchstyle_weight
style images weight (default to 3.0)content_weight
content images weight (default to 1.0)n_threads
number of threads used for the data loader (default to 2)save_model_interval
interval to save models (default to 1000)start iter
number of iteration to start training from (in case training was stopped)
- run
test.py
with appropriate arguments
content
content imagestyle
style imagealpha
style content trade-offvgg
path to pretrained vgg modeldecoder
path to pretrained decodertransformer
path to pretrained transfomer model