Programmer trains artificial intelligence to draw faces from text descriptions

Programmer Animesh Karnewar wanted to know how characters described in books would appear in reality, so he turned to artificial intelligence to see if it could properly render these fictional people. Called T2F, the research project uses a generative adversarial network (GAN) to encode text and synthesize facial images.

Simply put, a GAN consists of two neural networks that argue with each other to produce the best results. For example, the job of network No. 1 is to fool network No. 2 into believing a rendered image is a real photograph while network No. 2 sets out to prove the alleged photo is just a rendered image. This back-and-forth process fine-tunes the rendering process until network No. 2 is eventually fooled.

Karnewar started the project using a dataset called Face2Text provided by researchers at the University of Copenhagen, which contains natural language descriptions for 400 random images.

“The descriptions are cleaned to remove reluctant and irrelevant captions provided for the people in the images,” he writes. “Some of the descriptions not only describe the facial features, but also provide some implied information from the pictures.”

While the results stemming from Karnewar’s T2F project aren’t exactly photorealistic, it’s a start. The video embedded above shows a time-lapsed view of how the GAN was trained to render illustrations from text, starting with solid blocks of color and ending with rough but identifiable pixilated renderings.

“I found that the generated samples at higher resolutions (32 x 32 and 64 x 64) has more background noise compared to the samples generated at lower resolutions,” Karnewar explains. “I perceive it due to the insufficient amount of data (only 400 images).”

The technique used to train the adversarial networks is called “Progressive Growing of GANs,” which improves quality and stability over time. As the video shows, the image generator starts from an extremely low resolution. New layers are slowly introduced into the model, increasing the details as the training progresses over time.

“The Progressive Growing of GANs is a phenomenal technique for training GANs faster and in a more stable manner,” he adds. “This can be coupled with various novel contributions from other papers.”

artificial intelligence trained to render faces from text ai facial rendering

In a provided example, the text description illustrates a woman in her late 20s with long brown hair swiped over to one side, gentle facial features and no make-up. She’s “casual” and “relaxed.” Another description illustrates a man in his 40s with an elongated face, a prominent nose, brown eyes, a receding hairline and a short mustache. Although the end results are extremely pixelated, the final renders show great progress in how A.I. can generate faces from scratch.

Karnewar says he plans to scale out the project to integrate additional datasets such as Flicker8K and Coco captions. Eventually, T2F could be used in the law enforcement field to identify victims and/or criminals based on text descriptions, among other applications. He’s open to suggestions and contributions to the project.

To access the code and contribute, head to Karnewar’s repository on Github here.

Emerging Tech

From electron microscopes to X-rays, high-tech tools expose low-tech art forgery

At the Indianapolis Museum of Art, conservation scientist Greg Smith and Glennis Rayermann, then a Ph.D student, used high-tech equipment to determine if a painting was made by master forger Icilio Federico Joni.
Gaming

Here's where Xur is and what he has for wares this week in 'Destiny 2: Forsaken'

The weekly vendor in Destiny 2: Forsaken always brings Exotic weapons and armor, some of the toughest loot to find in the game. Here's everything you need to know to track down Xur: Where he is, when he shows up, and what he's stocking.
Mobile

Huawei is working on a 5G foldable phone, the Mate 20 X may be its template

Huawei is working on a folding 5G smartphone, according to the company's CEO, Richard Yu. He also provoked speculation the phone may have something in common with the massive Mate 20 X and its 7.2-inch screen.
Social Media

These are the best ways to make an animated GIF

Love sharing GIFs with your friends and peers, but wish you could make your own? Here's how to do so in Photoshop, or using a few other methods that don't require you to shell out a premium fee with each calendar year.
Computing

Will Apple introduce a new MacBook at its Oct. 30 event? Here's everything we know

Whether it's called the MacBook Air or just the MacBook, Apple is highly rumored to introduce a new, affordable laptop in 2018. We discuss reports about upgrading displays, processors, sign-in features, and more.
Computing

Apple CEO demands Bloomberg retract its Chinese surveillance story

Apple CEO Tim Cook is calling on Bloomberg to retract a story alleging that Apple had purchased compromised servers that allowed the Chinese government to spy on Apple. Apple's investigation found no truth to the story.
Product Review

Dell’s G3 Gaming laptop knows what gamers want, and what they can live without

Compromise and budget gaming laptops go hand-in-hand, but with the G3, Dell has figured out how to balance what gamers want with what they can live without.
Product Review

Amid a new fleet of budget laptops, the ZenBook 13 sails where others sink

It’s never been truer that you don’t need to spend over a thousand bucks to buy a good laptop. The ZenBook 13 takes we’ve always loved about its predecessor and makes enough small refinements to keep it ahead of its competitors.
Computing

Protect your digital identity with these four easy steps to online anonymity

You don't have to be a secret agent or a notorious hacktivist to care about anonymity. Consult this guide to learn tips, tricks, and best practices for staying anonymous and keeping your online activity private
Computing

Gaming on a laptop has never been better. These are your best options

Gaming desktops are powerful, but they tie you down to your desk. For those of us who prefer a more mobile experience, here are the best gaming laptops on the market, ranging from budget machines to maxed-out, wallet-emptying PCs.
Computing

How does Samsung's new 2-in-1 stack up against the tried-and-true Surface Pro 6?

We're the stacking Surface Pro 6 and Galaxy Book 2 up against each other in this head-to-head. Both of these devices share a similar form factor and design, but be it LTE connectivity or difference in pricing, each offers up its own pros…
Social Media

How to turn off Safe Mode in Tumblr

If you've joined Tumblr after hearing tales about the social network's more adult communities, you may be disappointed by how family-friendly it seems. Here's how to turn off "Safe Search" in Tumblr and delve into the site's seedy…
Product Review

Samsung CHG90 Ultrawide gaming monitor review

Samsung has taken "ultrawide" to its new limit with its 49-inch gaming monitor, the CHG90. With a 144Hz refresh rate and ungodly amounts of screen real estate, it just might be the most impressive gaming monitor ever made.
Computing

Choose your weapon wisely -- these are the best keyboards for gaming on your PC

Your PC isn't complete without one of the best gaming keyboards on the planet. We have a list spanning full-sized models to compact versions from Razer, Cooler Master, Corsair, Logitech G, and more.