Can You Spot the AI? A Tutorial on Making Realistic Images

Stable Diffusion + Fooocus and a Science Experiment That Might Fool You

One Goal
Create realistic photos

This week, we’re diving into an exciting experiment inspired by Dave’s daughter, who is conducting a science project to measure how well people can distinguish between AI-generated images and real-life photos. We’re using Fooocus, an AI model based on Stable Diffusion, to generate hyper-realistic photos and test how convincing they can be.

Why Fooocus?

Fooocus is specifically tuned to create incredibly realistic images, and thanks to the team behind it, there’s an easy way for us to leverage this technology. Instead of setting everything up locally, we’ll use Google Colab, which saves us both time and resources. With Colab, we don’t need to host anything on expensive cloud platforms like Hugging Face (though it’s great for bigger projects). Let’s jump into how you can replicate this setup in just a few steps!

Alright, so let’s talk about what were doing, and how. Fooocus is a model based on Stable Diffusion. Fooocus focuses (pun intended) on generating realistic photos. The next thing to talk about is how we’re going to run this. Luckily the folks that manage the project have created a simple path for us… using Google Collab.

Step 1: Open the Fooocus Colab Notebook

First, you’ll need to open the link below to access the Fooocus Google Colab Notebook:

This notebook contains the necessary code and setup for running Fooocus, so you won’t need to download anything to your computer. Just open it and you’re halfway there.

Step 2: Start the Colab Notebook

Once you’ve opened the notebook, click the play button located at the top left of each code cell. This action will start the project and might take a few moments to get going—be patient while the notebook does its magic.

Step 3: Access the Gradio Live Interface

After the notebook finishes running, scroll to the bottom and look for a gradio.live link. This is your unique URL to access the image generation interface. Each user’s URL will be different, so don’t worry if it doesn’t look exactly the same as in the screenshot.

Step 4: Open the Image Generation Interface

Click on the Gradio link, and a new tab will open with the Fooocus user interface. Here, you can start generating your own images based on text prompts. It’s as easy as typing in what you want to see and letting Fooocus work its magic.

Step 5: Input Your First Prompt

Now it’s time to have some fun! In the prompt box, type out a description of the image you want to generate. For example, try something like:

A man with brown hair and blue eyes, with a goatee.

Once you’ve entered your prompt, click the Generate button and Fooocus will create the image for you.

Step 6: Review and Fine-Tune

After Fooocus generates the image, you can see the results immediately. If you want more control over the output, there are advanced options available where you can tweak things like the image quality, resolution, and other parameters.

Advanced Options: Fine-Tuning Your Output

If you’re aiming for specific results, Fooocus also provides a variety of advanced settings that allow you to adjust the output further. You can experiment with the image settings to match the exact look and feel you’re after.

Download Images: Click on an image and then click the little arrow to down load

Change the number of images being generated: Click on an image and then click the little arrow to down load

Wrapping It Up

And there you have it—a quick and easy way to generate hyper-realistic images using Stable Diffusion and Fooocus through Google Colab. Whether you’re looking to test human perception, create stunning visuals, or just explore the cutting-edge of AI, this setup makes it all possible without the hassle of local installation or expensive hosting.

A huge thanks to Dave and his daughter for inspiring this experiment. It’s awesome to see the next generation getting hands-on with technology, pushing the boundaries of what we can do with AI. Her science project isn’t just about spotting fake images—it’s about exploring the fine line between reality and what machines can create. We’re excited to see where her curiosity takes her next!

Ever forward, Mike

Latest Podcast Episode

Connect & Share

Stay Updated

Thank You!

Thanks to our listeners and followers! Continue to explore AI with us. More at Artificial Antics (antics.tv).

Quote of the week: “When asked how a company can be 'AI-first,' I usually say, 'Don't do that.' If I tell a team, 'Hey, let's be AI-first,' it often shifts the focus to technology. While that’s fine for a research lab, in business, I prefer to be customer-led or mission-led, almost never technology-led." – Andrew Ng