Micah P. Dombrowski / Sep 19 2019
Remix of PyTorch Template by Nextjournal
Fast Image Style Transfer
Training
Download COCO2014 images.
wget --progress=dot:giga -P /results/ \ http://images.cocodataset.org/zips/val2014.zip \ http://images.cocodataset.org/zips/test2014.zip \ http://images.cocodataset.org/annotations/annotations_trainval2014.zip \ http://images.cocodataset.org/annotations/image_info_test2014.zip
mkdir -p coco cd coco unzip -qtest2014.zipunzip -qtest2014.zip
Train (~2 hours on a P100).
cd /examples/fast_neural_style python neural_style/neural_style.py train --dataset /coco --cuda 1 \ --save-model-dir /results --checkpoint-model-dir /shared \ --style-imageFlammarionWoodcut-crop.png\ --epochs 2 --batch-size 14 --log-interval 280 --checkpoint-interval 2000 \ --content-weight 1e5 --style-weight 1e10
Style Transfer
An Antikythera Mechanism recreation.
cd /examples/fast_neural_style python neural_style/neural_style.py eval --cuda 0 \ --modelAntikythera_model_front_panel_Mogi_Vicentini_2007.JPG\ --content-imageAntikythera_model_front_panel_Mogi_Vicentini_2007.JPG\ --output-image /results/out.jpg
Woah.
Brutalist architecture.
cd /examples/fast_neural_style python neural_style/neural_style.py eval --cuda 0 \ --model812px-NLNZ_ext_5.jpg\ --content-image812px-NLNZ_ext_5.jpg\ --output-image /results/out.jpg
Gears in a printing press.
cd /examples/fast_neural_style python neural_style/neural_style.py eval --cuda 0 \ --modelPIXNIO-206511-725x483.jpeg\ --content-imagePIXNIO-206511-725x483.jpeg\ --output-image /results/out.jpg