Practical overview
When it fits
Use it for hands-on experimentation with GAN training and small synthetic face images when you can work with its documented Python 2.7, Torch, CUDA and GPU requirements.
Who it is for
- Developers experimenting with GAN-based image generation.
- Researchers or learners exploring synthetic face-image generation and comparisons with training data.
Documented uses
- Prepare Labeled Faces in the Wild data for GAN training.
- Train a face-image generator and monitor its progress locally.
- Sample color or grayscale synthetic face images.
- Inspect generated samples alongside nearest neighbours from the training set.
Requirements & limits
The code repository is public and MIT-licensed.
- Dataset preparation is a separate step and requires Labeled Faces in the Wild.
- The GAN workflow depends on Torch libraries, CUDA components, cuDNN 3, display and an Nvidia GPU with at least 4 GB of memory.
- The documented image size is 32 × 32, with color and grayscale modes.
Check current requirements in the official documentation. Source-based guidance does not mean OpenViST has run or independently tested this project.
Prepare the face dataset
Create the dataset used by the GAN training workflow.
Before you start
- The original Labeled Faces in the Wild dataset without funneling
- Python 2.7 with SciPy, NumPy and scikit-image
Steps
Download and extract the Labeled Faces in the Wild dataset.
From the repository's dataset directory, run the command below, replacing the example path with the extracted dataset location.
python generate_dataset.py --path="/foo/bar/lfw"
Expected outcome
A dataset prepared for the project's GAN workflow.
Guide limitations
- The documentation says Python 2.7 was the only tested version.
Train and sample 32 × 32 face images
Train the project's GAN and use its sampling script to generate images.
Before you start
- The prepared face dataset
- Torch with the listed
pl,nn,paths,image,optim,cutorch,cunn,cudnnanddpnnlibraries - The display tool, an Nvidia GPU with at least 4 GB of memory, and cuDNN 3
Steps
Start display with
~/.display/run.js &.Open
http://localhost:8000to view training progress.Run
th train.luafor a 32 × 32 color generator; add--grayscalefor grayscale images.Run
th sample.luato sample images. The documentation also describes--neighboursfor nearest-neighbour sampling and--runs=10to generate ten times the amount of images.
Expected outcome
A trained generator and sampled synthetic face images.
Guide limitations
- The project notes that training parameters such as
--D_iterations,--G_iterations,--D_L2and--G_L2may need adjustment. - Nearest-neighbour sampling is described as taking a long time.
Sources & review
Source record details
- Source availability
- Active
- Sources checked
- 20 November 2026
- Original website title
- aleju/face-generator · Official homepage title · retained in its source language

