A programming hobbyist has trained a neural network to generate portraits of people based only on a text description and the results are both impressive and disturbing:
Animesh Karnewar, a programmer who likes to experiment with AI and machine learning, wanted to see if he could build an AI that was able to generate images of characters in books based only on the book’s description, according to a Medium post he wrote. By looking to previous examples of creating images from text, including a model called Face2Text from researchers at the University of Copenhagen, he was able to build an AI and train it on a dataset of 400 random faces with accompanying description.
Eventually, the AI became more refined and was able to generate pretty accurate, if somewhat abstract, portraits when fed a description in plain language. The results are low resolution portraits that tend to get the main features right, though sometimes gets details, like hair color, wrong. Take this portrait for example, which the AI created based off the description “man in his late 50s has an elongated face with a prominent nose, short mustache with a receding hairline and brown eyes.”It’s not photorealistic, but the AI pretty much nailed it.Karnewar shared the program on GitHub for anyone else who wants to play around with it, though it requires some technical expertise and existing software to experiment with. Karnewar wrote that training on a larger dataset will allow the AI to get even better, and could potentially be used to help police sketch artists create images of a suspect.“Basically, [it can be used] for any application where we need some head-start to jog our imagination,” Karenwar wrote.Listen to our podcast about the world’s greatest mysteries that were solved by science.