This project uses two pretrained Tensorflow.js neural networks, sourced from Reiichiro Nakano 'arbitrary-image-stylization-tfjs' project. The first network is used for style prediction, or 'learning' the style of a given image and generating a style representation. The second network is used for style transfer, or using the style representation to generate a stylized output image. For a more detailed breakdown of how the networks work, check out Reiichiro's blog post. Also, thanks to Nicholas Renotte for his ReactComputerVisonTemplate project.
A very fun fact about TensorFlow.js your browser is locally doing the machine learning, and all your data is kept on your device.