I've been away from my blog a bit too long already, but well, the past is the past, and we can't change it. So let's focus on the present and future anyway! Today I wan't to give a try to the so called “neural style” concept, where we can input an image, and say a painting with a “given style”, and get that style applied on the input image.
nv_style_transfer --content images/tubingen.jpg --style images/starry-night.jpg --output result.jpg
import utils File "/mnt/array1/dev/projects/NervSeed/python/apps/deep_learning/style_transfer/utils.py", line 3, in <module> import matplotlib.pyplot as plt File "/mnt/array1/dev/projects/NervSeed/tools/linux/python-3.6/lib/python3.6/site-packages/matplotlib/pyplot.py", line 113, in <module> _backend_mod, new_figure_manager, draw_if_interactive, _show = pylab_setup() File "/mnt/array1/dev/projects/NervSeed/tools/linux/python-3.6/lib/python3.6/site-packages/matplotlib/backends/__init__.py", line 60, in pylab_setup [backend_name], 0) File "/mnt/array1/dev/projects/NervSeed/tools/linux/python-3.6/lib/python3.6/site-packages/matplotlib/backends/backend_tkagg.py", line 6, in <module> from six.moves import tkinter as Tk File "/mnt/array1/dev/projects/NervSeed/tools/linux/python-3.6/lib/python3.6/site-packages/six.py", line 92, in __get__ result = self._resolve() File "/mnt/array1/dev/projects/NervSeed/tools/linux/python-3.6/lib/python3.6/site-packages/six.py", line 115, in _resolve return _import_module(self.mod) File "/mnt/array1/dev/projects/NervSeed/tools/linux/python-3.6/lib/python3.6/site-packages/six.py", line 82, in _import_module __import__(name) File "/mnt/array1/dev/projects/NervSeed/tools/linux/python-3.6/lib/python3.6/tkinter/__init__.py", line 36, in <module> import _tkinter # If this fails your Python may not be configured for Tk ModuleNotFoundError: No module named '_tkinter'
⇒ I know I know, that one is pretty standard result So then I moved to more personal content (ie. family picture) with a custom painting style.
nv_style_transfer --max_size 1920 --content /mnt/array1/dev/data/deep_learning/style_transfer/content/famille_cap_antibes.jpg --style /mnt/array1/dev/data/deep_learning/style_transfer/styles/colorful_sunrise.jpg --output /mnt/array1/dev/data/deep_learning/style_transfer/family_colorful_sunrise.jpg
nv_style_transfer --max_size 1280 --content /mnt/array1/dev/data/deep_learning/style_transfer/content/famille_cap_antibes.jpg --style /mnt/array1/dev/data/deep_learning/style_transfer/styles/colorful_sunrise.jpg --output /mnt/array1/dev/data/deep_learning/style_transfer/family_colorful_sunrise.jpg
⇒ Still not quite an amazing image, but at least some of the small artifacts from the previous rendering were removed…
⇒ Again, the result is “nice” but still not really terrific… In fact I'm starting “to feel” that what we really need as a “style” image is not really a “colorfull” painting but instead something with very specific “shapes” instead. So let's try to find that now.