We have in our previous post “Tiger Roaring In Forest – Generate Text to Image Using OpenAI CLIP and Siren (Implicit neural representation network)“.

Today in Artificial Intelligence and Deep Learning for natural language processing creating history in many areas.

I am going to show you another library called “Big Sleep”, how to generate an image from text. You can type any combination of words in the program and it will render an abstract Image after many iterations.

Before giving the final output it creates hundreds of images and will proceed towards giving the final abstract image.

Open AI Library – Big Sleep:

Simple command-line tool for text to image generation using OpenAI’s CLIP and BigGAN.

This library can generate images (only images) using natural language.

What is CLIP?

CLIP (Contrastive Language–Image Pre-training) builds on a large body of work on zero-shot transfer, natural language supervision, and multimodal learning. The idea of zero-data learning dates back over a decade but until recently was mostly studied in computer vision as a way of generalizing to unseen object categories.

Source: CLIP

I have tried a couple of examples e-g “Thunderstorm from Sky” and “Ship on the ocean” and below are the final outcome of abstract images.

With more memory in your system, you can get better-quality images.

Run the below program and enter your own image description or you can go to Big Sleep GitHub and click Google Colab to load the code in its IDE.

Copy to Clipboard
Copy to Clipboard

After many iterations, it was rendering different abstract images of ‘Thunderstorm from Sky”.

Thunderstorm_from_sky4
Thunderstorm_from_sky2
Thunderstorm_from_sky1

Let’s try with one more example “Ship on the ocean”.

Ship on the ocean3
ship on the ocean5
ship on the ocean6

Conclusion:

Big sleep library only generates images with natural language Artificial Intelligence at this time of the article, unlike Deep daze.

Even a high-end graphics tool can take some time to generate these images.

I like both Deep daze and Big sleep libraries.

Enjoy this library, thanks to this author/contributor, and contribute to our Artificial Intelligence community.

Let me know your thought, which one you like it and comment below.