Curious Minds

Clear answers to science and history questions

How 'This Person Does Not Exist' Generates AI Faces

· 4 min read · Science

The website “This Person Does Not Exist” instantly generates photorealistic human faces that never belong to a real individual. It uses a generative adversarial network (GAN) trained on millions of photographs to produce new images that look like real portraits.

Background

Generative models have been a research focus for decades. In 2014, Ian Goodfellow introduced the concept of generative adversarial networks, where two neural networks—generator and discriminator—compete to improve each other. Over the years, improvements such as Progressive Growing of GANs and StyleGAN have made it possible to generate high‑resolution, high‑fidelity images. The project behind “This Person Does Not Exist” was released in 2019 by Philip Tschopp, a computer‑science student, who adapted Nvidia’s StyleGAN2 to run in a web environment.

How It Works

The core technology is a StyleGAN2 model. The process can be broken down into three main stages:

  1. Training the Model: Researchers collect a large dataset of real faces—commonly the Flickr‑Faces‑HQ (FFHQ) set, which contains 70,000 images at 1024×1024 resolution. The GAN learns statistical patterns of skin tone, eye shape, hair texture, and lighting.
  2. Generating Latent Vectors: When a user requests a new face, the server draws a random 512‑dimensional vector from a normal distribution. This vector is the “seed” that determines the final image.
  3. Image Synthesis: The generator transforms the latent vector through a series of convolutional layers, progressively refining the image until it reaches the target resolution. The discriminator, running in parallel, evaluates realism, guiding the generator to improve over time.

Because the model never stores any specific face, each output is statistically independent. The probability that two generated faces are identical is astronomically low, effectively ensuring uniqueness.

Choosing the Right Model

When deploying a similar system, several model variants are available. The most common choices are:

  • StyleGAN1 – earlier version, lower resolution (512×512), faster inference.
  • StyleGAN2 – improved realism, 1024×1024 resolution, better handling of fine details.
  • StyleGAN3 – introduces style‑space consistency, reducing artifacts and improving interpolation.

Factors to consider include desired image quality, inference time, and computational resources. For web‑based demos, StyleGAN2 strikes a balance between fidelity and speed.

Common Problems

Even with robust training, users sometimes encounter issues:

  • Artifacts: Small, unrealistic distortions such as odd eye shapes or mismatched lighting. These usually arise from insufficient training epochs or corrupted dataset entries.
  • Bias: The model reflects the demographics of its training set. If the dataset over‑represents a particular ethnicity or gender, the generated faces will skew similarly. Mitigation involves diversifying the training data.
  • Memory Constraints: High‑resolution generation requires significant GPU memory. On limited hardware, the server may fall back to lower resolution or skip generation entirely.
  • Latency: Network delays can cause a noticeable lag between request and response. Caching popular seeds or using edge servers can reduce perceived latency.

Comparisons

When evaluating face‑generation tools, compare them on:

  • Resolution: 512×512 vs. 1024×1024.
  • Realism: Human perception studies rate StyleGAN2 images near photorealistic.
  • Speed: Inference times of 0.5 s (GPU) to 5 s (CPU).
  • Accessibility: Open‑source weights vs. proprietary APIs.
  • Ethical safeguards: Built‑in filters to prevent generation of minors or extremist imagery.

Costs

Running a GAN at scale involves hardware, storage, and bandwidth. Typical costs include:

  • GPU Instance: A single Nvidia RTX 3090 can serve dozens of concurrent requests; cloud providers charge roughly $0.40 per hour.
  • Storage: Model weights (~1 GB) and dataset snapshots (~10 GB) are inexpensive on SSDs.
  • Bandwidth: Each image is ~200 KB; for 10,000 daily requests, bandwidth costs are modest compared to GPU compute.

Because the model is static after training, most of the expense is upfront. Once the model is deployed, ongoing costs are primarily compute and network.

Safety

Ethical use is critical. Developers should:

  • Implement age filters to avoid generating child likenesses.
  • Provide a disclaimer that images are synthetic and not real people.
  • Use watermarking or metadata tags to signal AI origin.
  • Follow local regulations regarding synthetic media.

OpenAI’s policy on synthetic media recommends transparency and user consent for any application that could be used for deception.

Alternatives

Other tools and libraries can achieve similar results:

  • RunwayML – offers a user‑friendly interface for StyleGAN models.
  • DeepFaceLab – primarily for face swapping but can generate new faces with custom training.
  • Artbreeder – a web platform that blends latent vectors to create new portraits.
  • Google Colab notebooks – free GPU access for experimenting with StyleGAN code.

Frequently Asked Questions

What does “This Person Does Not Exist” actually do?

It uses a pre‑trained StyleGAN2 model to generate a new, realistic human face each time a user loads the page. The face is a synthetic image created from random input vectors, not a photograph of an actual person.

Can I download the model weights?

Yes, the original project released the StyleGAN2 weights under an open‑source license. They can be downloaded from the GitHub repository and used locally or on a server.

Is there a risk of generating a real person’s likeness?

Statistically, the chance of producing an image that matches a real individual is negligible. The model learns general facial features rather than memorizing specific faces.

How can I prevent bias in the generated faces?

Use a diverse training dataset that includes a balanced representation of genders, ethnicities, and age groups. Regularly audit generated samples for skewed patterns.

What are the legal implications of using these images?

Since the images are synthetic, copyright issues are minimal. However, some jurisdictions may require disclosure that the image is AI‑generated, especially if used in media or advertising.

In this article
  1. Background
  2. How It Works
  3. Choosing the Right Model
  4. Common Problems
  5. Comparisons
  6. Costs
  7. Safety
  8. Alternatives
  9. Frequently Asked Questions