Some time ago I ran across a paper describing the machine-learning application of transferring the art-style from a painting into another image. Mathematica v12 includes a built-in command to do this in a single line of code, so I started using it to explore ideas until I had something I liked, which ended up being a “Pop-Art” Machine Learning application for photos.
The idea was to take a photo, and then apply different artstyles or textures borrowed from other images onto it, so that we could then take slices from it and arrange them side by side. As an example, we start with this image:
Load and Rescale
Which is loaded by the following code:
Similarly, we load all the artsyles we want transferred:
Then, we apply the art-style transfer process (takes a really long time):
Assemble the pieces
Finally, we put it back together by taking random slices from each of the style-transferred results:
And we have our assembled image:
As it stands, the process is extremely inefficient in terms of computation. We don’t really need to process the whole image if we are gonna take only one slice at the end. It would also work faster if it was coded in Python with available packages.