Introducing FreeTranslate- deploy a personal webpage for neural machine translation with a click!

THE PROBLEM

The language barrier is a major problem during the COVID-19 pandemic when trying to convey critical safety and medical information and to get information to parents and students as we head back to school. Translation services are expensive and there are many communities that need services.

THE SOLUTION

Amazon Web Services has a product called Amazon Translate which is a neural machine translation service, meaning it translates text using machine learning. It is very powerful, and while it cannot replace a human translator, can help people like teachers convey meaning to the communities they work with reliably. Unfortunately this tool is intended for developers, whereas it can be of great value to people who are not programmers who could leverage its generous free usage tier, letting you translate 2 million characters per month for 12 months at no cost.

That’s where FreeTranslate comes in. FreeTranslate is a software project I have worked on that allows people to deploy a personal translation page to use these free credits by simply clicking a button. It will deploy FreeTranslate to your Amazon account and generate a personal URL just for you!

The technical details are that I have built a CloudFormation template that deploys when you click a URL on my projects page. This template deploys an API Gateway (for the webpage and sending translation requests) and a Lambda function (which does the actual translation bit). You can see a diagram from the CloudFormation designer tool here:

Diagram of FreeTranslate and what CloudFormation deploys when you click my Launch Stack button.

SHARING THE SOLUTION

You can deploy it for yourself, view instructions, and see additional pictures here!

As always, the code is open source! You can view it here.

Make Children’s Artwork look like Eric Carle Illustrations

v_hungry_caterpillar
The Very Hungry Caterpillar, by Eric Carle

Famous author and artist Eric Carle turns 91 today. I remember loving his books when I was a kid, especially The Very Hungry Caterpillar and Brown Bear, Brown Bear, What Do You See?. Each book features his distinctive art style. The images are collages composed of tissue paper and acrylic paint, producing vivid depictions of animals and nature.

THE PROBLEM

Carle’s work is as complex as it is beautiful. How can we make it easier for children to produce their own homages to his creations?

THE SOLUTION

Neural style transfer is a technique that allows you to compose images in another’s style using deep learning. That is, you teach a computer to identify key elements of an image’s style and redraw that image in that style it has just learned.

I found this excellent Google Colab notebook which taught me all about how to do this with tf.Keras!

Taking the code from the tutorial I built a website that lets you upload images, have the style of Eric Carle’s The Very Hungry Caterpillar transferred to it, and display it for the world to see and for you to download! At any given time the latest 10 images will be displayed for any visitors to see. The website is built in one of my favorite frameworks, Flask.

You can access the website at ericcarletransfer.ml. Be warned, the transfer time can be in excess of 10 minutes- it is very computationally intensive.

The results have been encouraging though! Take a look:

The neural network is picking up on the look of the tissue paper and paint. In the future I want to work on reducing the amount of noise seen in the backgrounds.

SHARING THE SOLUTION

The URL again is http://ericcarlearttransfer.ml/

As always, the entire project is opens source and can be found here on GitHub!