If it's always been your dream to hang out with Jesus at The Last Supper or chillax with the howling demon in The Scream, then we judge you, but your dreams are now possible.
In April, a team of AI researchers at Cornell University published a paper on arXiv detailing their new machine-learning algorithm that can put objects and people into paintings, perfectly (or near-perfectly) matching the style of the artist.
You would barely even notice that anything was wrong, were it not for the fact that the Mona Lisa now has Benedict Cumberbatch's face.
The algorithm first places the face or object onto the painting roughly. This stage looks like what would happen if you let your grandad loose with photoshop and zero guidance. In the next stage, it performs a rough style-match to the painting, and it starts to look spookily good. The final stage harmonizes the imported object further, matching the texture and style to the original painting, with spookily accurate results.
It's the reason why this ancient warrior really looks like he has a Captain America shield.
"Painterly compositing is a demanding task because the synthesized style is juxtaposed with the original painting, making any discrepancy immediately visible," the authors write in their study.
Viewers tend to be able to spot any new object immediately due to subtle differences in styles and textures. Humans are good at spotting bad photoshops due to these subtle mistakes or differences. Something just stands out, especially if you compare a faked work to the original.
"In contrast, we conducted a user study that shows that our algorithm produces composites that are often perceived as genuine paintings," the authors write.
The researchers have now made their code open source and posted it for anyone to use on GitHub, where people have been using it to... hang out with Jesus and the howling demon from The Scream.
And give van Gogh a fancy shoulder bird.
The code is open for anyone to use, though it may defeat people who have little or no programming experience. For everyone else, have fun hanging out with the pitchfork creeps from American Gothic.