What is AI Bias in Image Generation? Type in ‘An engineer smiling at the camera’ as the prompt into a few AI image generators. What do you see? A collection of men in most cases. In a recent experiment, 298 out of the 300 stable diffusion generated images were of perceived men for the prompt ‘Engineer’. A similar racial/gender bias exists across many AI image generators and models today. AI bias is the phenomenon of artificial intelligence systems producing results that are skewed or unfair towards certain groups or individuals, based on factors such as race, gender, age, or religion. This can occur due to various reasons, such as data bias, algorithm bias or human bias. As the use of AI grows, bias can have serious negative consequences for individuals and society, such as violating human rights, perpetuating social inequalities, and undermining trust in AI systems. While the pervasive bias in AI systems has been spotlighted time and again, especially in the art world, its nuances remain elusive. To explore this, we built our own AI portrait generator from scratch, delving into the subtle ways bias sneaks in and strategizing on crafting prompts to counteract it. Our tool of choice is Dreamup.ai, a completely free AI image generator that shares 30% of its proceeds with artists. We’ll harness the power of the renowned Dreamshaper model. But let’s clear the air first: our pick is based on its stellar image quality and soaring popularity, not because it stands out as more or less biased than its counterparts—it doesn’t. Let’s get started! Creating the AI Portrait Generator For this experiment, we will create a Portrait Generator that transforms any given face into a salad, inspired by the 16th-century Italian painter, Giuseppe Arcimboldo. For this project, we’ll also use ControlNet and Depth Estimation. The process involves taking the 3D structure from an input image and using it, along with a prompt, to produce the final image. This method allows us to create a portrait generator without the need to train a LoRA model from scratch. Step 1: Preparing the Reference Image – Turning a Face into a Salad To start, we’ll use the Dreamshaper model to generate our reference image. Prompt: stunning photograph of a handsome man in a business suit, portrait, city sidewalk background, shallow depth of field Right off the bat, we see a bias issue. The prompt didn’t mention race, but all the generated images are of white men with brown hair, all striking a similar pose with a hand in the left pocket. This lack of diversity stems from the fact that these models are primarily trained on images with English captions, reflecting the biases of English-speaking regions. As our aim is to highlight how biases manifest, let’s adjust our prompt to get a more diverse result. Prompt: stunning photograph of a handsome black man in a business suit, portrait, city sidewalk background, shallow depth of field By specifying race, we get a more diverse image, though the hand-in-pocket pose remains consistent. This suggests that our prompt might be triggering certain cultural or stylistic associations. However, we won’t delve into that now. To ensure authenticity, let’s use a real stock photo as the reference image. Fortune Vieyra in a black business suit, standing by a wall. Source: https://unsplash.com/photos/aAN9ocBHbyo Interestingly, even in this real photo, the hand-in-pocket pose persists. Step 2: Extracting the Depth Map Next, we’ll employ MiDaS Depth Estimation to derive a depth map from our reference image. This depth map will provide us with a 3D perspective of the reference, which is crucial for generating our final artwork. From the depth map, we can discern the structure and layout of the image. However, the color data is absent. This lack of color might pose challenges in the subsequent steps. Depth map derived from our reference image Step 3: Crafting the Perfect Prompt Our first attempt will be a neutral prompt, devoid of any racial or gender specifics. Prompt: Detailed portrait of a person in the ((style of Giuseppe Arcimboldo)), face made of vegetables As expected, the generated images predominantly feature white men, maintaining the composition of the reference. This could be due to the inherent model bias or the historical context of Arcimboldo, a European artist from the 16th century. To achieve our desired outcome, we’ll need to refine our prompt. Prompt: Detailed portrait of a black man in the ((style of Giuseppe Arcimboldo)), face made of vegetables By specifying the race, we get closer to our reference image. However, the overall image is notably darker. This might be due to the encoding process of the text, which can lose intricate details. Prompt: Detailed portrait of an African American man in the ((style of Giuseppe Arcimboldo)), face made of vegetables Switching “black” for “African American” yields a lighter image, but the generated faces are of lighter-skinned individuals. This could reflect a broader spectrum of skin tones or a potential cultural bias. Prompt: Detailed portrait of an african man in the ((style of Giuseppe Arcimboldo)), face made of vegetables Requesting an “african” man gives us darker skin tones, but the backgrounds seem less opulent. This might inadvertently introduce cultural stereotypes. Also, the vegetable face aspect is still missing. Prompt: Detailed portrait of an african aristocratic man in the ((style of Giuseppe Arcimboldo)) Incorporating “aristocratic” brings back the grandeur in the backgrounds. Yet, the vegetable face remains elusive. Prompt: Detailed ((vegetable painting)) of an african aristocratic man in the ((style of Vertumnus by Guiseppe Arcimboldo)) Negative Prompt: (((skin))) Despite multiple attempts, achieving a vegetable-composed face proves challenging. It might be beneficial to use a closer reference image focusing solely on the face for better results. New Reference Image, Depth Map and Prompt Reference image (Photo by Prince Akachi on Unsplash) and New Depth Map With a fresh reference image of a young black woman and an updated depth map, our goal remains: a vegetable-composed face. Prompt: Detailed ((vegetable painting)) of an african aristocratic woman in the ((style