A deep learning project that uses a Wasserstein Generative Adversarial Network with Gradient Penalty (WGAN-GP) to generate realistic human face images.
The model is trained on a dataset of facial images and learns the underlying distribution of human faces, allowing it to create entirely new, synthetic faces that do not correspond to real individuals.
- WGAN-GP implementation for stable GAN training
- Automatic dataset download and preprocessing
- GPU (CUDA) and CPU support
- Generates realistic human face images
- Built with PyTorch
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
git clone https://github.com/MasonAndrewHarrison/Face-Generator.git
cd Face-Generatorpython -m venv venvsource venv/bin/activatevenv\Scripts\activate.batvenv\Scripts\Activate.ps1pip3 install torch torchvision --index-url https://download.pytorch.org/whl/cu130pip3 install torch torchvision --index-url https://download.pytorch.org/whl/cpupip install -r requirements.txtpython create_dataset.pypython main.py- A random latent vector is sampled from a noise distribution.
- The generator transforms this noise into a synthetic face image.
- The critic (discriminator) evaluates how realistic the image appears.
- Gradient Penalty (GP) is used to enforce the Lipschitz constraint, improving training stability.
- Through adversarial training, the generator gradually learns to produce increasingly realistic faces.





