summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--README.md12
-rw-r--r--examples/style_interpolation/afremov_grey_2_8_.pngbin0 -> 439675 bytes
-rw-r--r--examples/style_interpolation/afremov_grey_5_5.pngbin0 -> 440266 bytes
-rw-r--r--examples/style_interpolation/afremov_grey_8_2_.pngbin0 -> 441781 bytes
-rw-r--r--stylize_video.sh11
5 files changed, 14 insertions, 9 deletions
diff --git a/README.md b/README.md
index 957767c..5e318f3 100644
--- a/README.md
+++ b/README.md
@@ -73,13 +73,13 @@ More than one style image can be used to blend multiple artistic styles.
### Style Interpolation
When using multiple style images, the degree to which they are blended can be controlled.
<p align="center">
+<img src="image_input/taj_mahal.jpg" height="178px">
<img src="examples/style_interpolation/taj_mahal_scream_1_starry_9.png" height="178px">
-<img src="examples/style_interpolation/taj_mahal_scream_5_starry_5.png" height="178px">
<img src="examples/style_interpolation/taj_mahal_scream_9_starry_1.png" height="178px">
-<img src="examples/style_interpolation/taj_mahal_afremov_grey_9_1.png" height="178px">
+<img src="examples/style_interpolation/taj_mahal_afremov_grey_8_2.png" height="178px">
<img src="examples/style_interpolation/taj_mahal_afremov_grey_5_5.png" height="178px">
-<img src="examples/style_interpolation/taj_mahal_afremov_grey_1_9.png" height="178px">
+<img src="examples/style_interpolation/taj_mahal_afremov_grey_2_8.png" height="178px">
</p>
### Transfer style but not color
@@ -114,14 +114,14 @@ Style can be transferred to semantic segmentations in the content image.
<img src="examples/segmentation/00110_output.png" height="192px">
<img src="examples/segmentation/00017.jpg" height="192px">
<img src="examples/segmentation/00017_mask.png" height="192px">
-<img src="examples/segmentation/00017_output.png" height="192px">
+<img src="examples/segmentation/00017_output.png" height="192px">
<img src="examples/segmentation/00768.jpg" height="192px">
<img src="examples/segmentation/00768_mask.png" height="192px">
<img src="examples/segmentation/00768_output.png" height="192px">
<img src="examples/segmentation/02630.png" height="192px">
<img src="examples/segmentation/02630_mask.png" height="192px">
-<img src="examples/segmentation/02630_output.png" height="192px">
+<img src="examples/segmentation/02630_output.png" height="192px">
</p>
Multiple styles can be transferred to the foreground and background of the content image.
@@ -353,4 +353,4 @@ If you find this code useful for your research, please cite:
journal = {GitHub repository},
howpublished = {\url{https://github.com/cysmith/neural-style-tf}},
}
-``` \ No newline at end of file
+```
diff --git a/examples/style_interpolation/afremov_grey_2_8_.png b/examples/style_interpolation/afremov_grey_2_8_.png
new file mode 100644
index 0000000..e716a51
--- /dev/null
+++ b/examples/style_interpolation/afremov_grey_2_8_.png
Binary files differ
diff --git a/examples/style_interpolation/afremov_grey_5_5.png b/examples/style_interpolation/afremov_grey_5_5.png
new file mode 100644
index 0000000..f036770
--- /dev/null
+++ b/examples/style_interpolation/afremov_grey_5_5.png
Binary files differ
diff --git a/examples/style_interpolation/afremov_grey_8_2_.png b/examples/style_interpolation/afremov_grey_8_2_.png
new file mode 100644
index 0000000..1711263
--- /dev/null
+++ b/examples/style_interpolation/afremov_grey_8_2_.png
Binary files differ
diff --git a/stylize_video.sh b/stylize_video.sh
index 14cbd8e..5f39f89 100644
--- a/stylize_video.sh
+++ b/stylize_video.sh
@@ -45,6 +45,9 @@ style_image="$2"
style_dir=$(dirname "$style_image")
style_filename=$(basename "$style_image")
+if [ ! -d "./video_input" ]; then
+ mkdir -p ./video_input
+fi
temp_dir="./video_input/${content_filename}"
# Create output folder
@@ -56,9 +59,9 @@ eval $(ffprobe -v error -of flat=s=_ -select_streams v:0 -show_entries stream=wi
width="${streams_stream_0_width}"
height="${streams_stream_0_height}"
if [ "$width" -gt "$height" ]; then
- max_size="$width"
+ max_size="$width"
else
- max_size="$height"
+ max_size="$height"
fi
num_frames=$(find "$temp_dir" -iname "*.ppm" | wc -l)
@@ -81,4 +84,6 @@ echo "Converting image sequence to video. This should be quick..."
$FFMPEG -v quiet -i ./video_output/frame_%04d.ppm ./video_output/${content_filename}-stylized.$extension
# Clean up garbage
-rm -rf "${temp_dir}" \ No newline at end of file
+if [ -d "${temp_dir}" ]; then
+ rm -rf "${temp_dir}"
+fi