Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/sh
- # This script takes multiple png from its folder and processes them via neural style:
- # https://github.com/jcjohnson/neural-style
- # This WILL take long time
- # PLEASE TOUCH THESE SETTINGS
- si="source.jpg" # Source image (style to take from)
- output=".png" # Target extension
- folder="mars" # Working folder
- be="clnn" # Backend: clnn (opencl), cunn (cuda), nn (other)
- iter="1000" # Number of iterations (100 on Radeon RX470 tooks 15~25 seconds approx, default 1000)
- directory="out" # Result directory
- # DO NOT TOUCH LOWER!
- x=$(ls $folder/*png | wc -l)
- mkdir $folder/$directory
- for (( i=1; i<=$x; i++ )); do
- lz=$(printf "%04d" $i)
- time th neural_style.lua -style_image $folder/$si -content_image $folder/output_$lz.png -backend $be -num_iterations $iter -output_image $folder/$directory/frame$lz$output
- done
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement