What do AIs think about Vietnam?
We used the famous VQGAN+CLIP method to generate artistic images of Vietnam. In particular, paintings of Vietnamese landscapes, festivals, dragons, and villages.
Of course, these aren’t real paintings: they are digitial halluciations that mimic the styles of impressionism, lacquer-art and tapestry. While no one would mistake these paintings for the real thing, some of them, like the Lantern Festival , are eerily beautiful.
Here, we present some of our favorite AI-generated paintings of Vietnam.
Want to learn how to generate your own images? Jump to the section on VQGAN+CLIP
GAN Painting 1: A Vietnamese Festival of Lanterns
Flying lanterns have been banned in Vietnam — they can cause wild fires! But the AI dreams of a lovely scene with flying orbs in the sky.
GAN Painting 2: Impressionist Straw-Children Walking in a Small Village
This impressionist painting features children or peasants carrying stra walking around a rural village. The AI can’t seem to paint the distinctive conical hats of Vietnam.
The children seem to wearing straw-clothing. This may look kind of creepy, but it could also be a depiction of the áo tơi: a traditional coat or cape that was made from coconut fronds. Before there was gortex, there was áo tơi.
GAN Painting 3: Vietnamese Night Market
This is an unbelieveably beautiful AI-image of a bustling night-market. The only flaw is the missing conical hats of Vietnam and a strange Chinese-character UFO floating in the sky.
GAN Painting 4: A Watercolor Karst Landscape of Ninh Binh
A beautiful watercolor scene that is eerily reminiscent of the watery karst landscape of Ninh Binh, complete with misty-hued mountains in the background, and what looks to be various fisherman weirs or boats in a flooded paddy-field.
GAN Lacquer Art 5: Abstract Rice Terraces in Mountains
This GAN image seems to be in the style of Vietnamese lacquer art. It depicts rice terraces and pathways undulating in the Vietnamese mountains, perhaps in Sapa. The style is somewhat abstract: the AI can’t seem to resolve workers, buildings or other manmade structures.
Nonetheless, the fog effects, the mist, and overall composition are arresting.
GAN Vietnamese Tapestry 6: Abstract Dragon in Mountains
The AI has an appreciation for Vietnamese or Chinese tapestries. A quick glance and it is strikingly similar in style to real Eastern tapestries — rich with subtle details and muted colors from an ancient time.
The AI is adept at painting the mountains and vegetation, but what seems to be a pagoda or dragon are, at best, abstract conceptions rather than photo-realistic depictions.
GAN Impressionism 7: Colorful Seascape Village
This impressionist-style painting is common among the painters of Vietnam: colorful thick strokes, bold reds and blues, soft misty mountains in the background. It is reminiscient of a seaside fisherman village along the verdant coast of Central Vietnam.
Once again, the AI has difficulty resolving individual manmade details like the boats and houses, but the composition and color-palette are striking.
GAN Lacquer Art 8: Busy Vietnamese Market
The lacquer art images are the most strange of all the AI creations. This one seems to be a village bustling with wares and food and mats laid out with merchandise. Overall, however, there is something “off” about these images. It could be that this unique Vietnamese style is just too few and sparse in the VQGAN+CLIP training images: it can’t really generate them convincingly or with much aesthetic talent.
One interesting artifact is the lacquer-art’s glare. Clearly the shiny medium is difficult to photograph without glare, and so the AI is confused and thinks it is a core artistic feature.
GAN Tapestry 9: A Mountain Landscape with Chinese-Style Calligraphy
This tapestry comes complete with ruffles in the fabric, and Chinese-style calligraphy floating in the sky. The beautiful undulating landscape looks like an ancient Asian countryside from the 1300s. The roman letters “Ng” are sino-ized in the bottom-left corner. We decided to use this image as a banner for our blog titled “How to pronounce Ng in Vietnamese“.
GAN Painting 10: Peasants in Rice Field
This GAN was supposed to generate a painting about workers in a Vietnamese rice field. However, the AI can’t seem to generate the iconic conical hats of Vietnam. Instead, it populates the paintings with what seems to be 1700’s dutch peasants — such is the bias of the training data.
GAN Failed Experiments
The following are less successful AI creations, but they are fun nonetheless and gorgeous in their own way.
What are GANs and what is VQGAN+CLIP?
GANs are “Generative Adversarial Networks” (Goodfellow et al 2014). The idea is to use dueling AIs to refine an algorithm that can make “hallucinations” — entirely new images learned through the Adversarial training.
Of the two dueling AI, one is learning to generate realistic looking paintings; it’s adversary is learning to classify the other’s fake images as fake, and real paintings as real. The key is that, behind the scenes, and unbeknownst to either AI, their incremental learnings are actually helping one another perform their tasks better.
The result is an arm’s race of incredible effectiveness: the “Generator” AI learns to create incredibly realistic images that the Discriminator AI can no longer distinguish from real images. Technically, the Generator has learned a distribution across all paintings, and we humans can now sample from its hallucinations.
VQGAN+CLIP: Generate Images from Text
The CLIP algorithm (Radford et al) uses a contrastive loss to associate text with images (like captions). When coupled with a conditional GAN, we can make an algorithm that learns to generate hallucinations from user-specified input-text.
In our case, we feed it text like “A lacquer art painting of a traditional Vietnamese village next to a lotus pond“. These are the types of inputs used to generate the images in this article.
Python VQGAN+CLIP Notebook to Generate Images From Text
If you want to generate your own images, run the Python code in the following Google Colab notebook .
To get started, save it to your own Google Drive, Hit “factory reset”, then step through the cells. The user-inputted text is set in the “Args” cell.
If you can’t get it to work, don’t worry, send as a message with your desired input text, and we’ll run it for you.