diff options
author | xAlpharax <42233094+xAlpharax@users.noreply.github.com> | 2023-02-26 02:50:33 +0200 |
---|---|---|
committer | xAlpharax <42233094+xAlpharax@users.noreply.github.com> | 2023-02-26 02:50:33 +0200 |
commit | 6fe8a3228e3170600b68d9b19e3b8f07e51222fe (patch) | |
tree | a648ce29c376aa32f3ace8f18b967ca3d5ea4b55 /stylize.sh | |
parent | 4f51d2b619b5cd359ad853494cb826aa5e29495e (diff) |
massive changes in the pipeline and ease of use
Diffstat (limited to 'stylize.sh')
-rwxr-xr-x | stylize.sh | 19 |
1 files changed, 13 insertions, 6 deletions
@@ -1,18 +1,25 @@ -#!/bin/bash +#!/bin/zsh ### You must be in the 'neural-art' directory when you run this -if [ $# -eq 2 ] +if [ $# -eq 0 ] then - echo "Video file needs to be specified" + echo "Style Image and Content Image need to be specified as arguments" + echo "Example: ./stylize.sh Images/Jitter_Doll.jpg Images/cute.jpg" + exit 1 +fi + +if [ $# -eq 1 ] + then + echo "Content image needs to be specified" exit 1 fi # stylize data [pair (style, content)] python neuralart.py $1 $2 -# render images (actual frames) from images.npy -python renderer.py +# render images (actual frames) from (an) images.npy +python renderer.py $1 $2 # turn everything into a video -ffmpeg -framerate 60 -pattern_type glob -i 'Output/neural_art_*.png' -vf "pad=ceil(iw/2)*2:ceil(ih/2)*2" $3 +ffmpeg -framerate 60 -pattern_type glob -i 'Output/neural_art_*.png' -vf "pad=ceil(iw/2)*2:ceil(ih/2)*2" ${${2/*\/}/.*}_in_${${1/*\/}/.*}.mp4 |