Skip to content

daniel-sanche/FaceGen

Repository files navigation

About the Project

This project is an implementation of a Generative Adversarial Network, trained to generate faces using the IMDB-WIKI dataset. This project was created for my term project for the University of Saskatchewan's CMPT 498: Learning and Data Analytics course in Fall 2016.

Python Scripts

  • NeuralNet.py
    • cointains all tensorflow code building the model, along training, logging, sampling, and other related functions
  • Trainer.py
    • loads an instance of the network, and runs training samples through it, printing results
  • DataLoader.py
    • filters the IMDB-WIKI dataset to a smaller number of high quality images, and builds an index for quick access
    • contains a function that will load batches of images in a background thread, for use in training the neural network
  • Sampler.pt
    • used to generate images from the trained network
  • CsvStats.py
    • outputs information about the dataset csv file generated by DataLoader.py
  • FaceDetector.py
    • uses OpenCV's Haar face detector to determine whether a face is in an image
    • used to evaluate results, by running the face deterctor on generated images
    • this file is run to train the network
  • Visualization.py
    • used to generate a png containing a grid of faces
    • faces are input as a numpy array

Usage

Training

To train the network, modify the "datasetDir" variable in Training.py, and run the script for as may training rounds as desired.

Before training, the IMDB-WIKI dataset will be filtered and indexed, with no input required by the user

Sampling

To obtain generated face images from a trained network, run Sampler.py. A number of sample images will be generated in the working directory

Results

Included in this repository is a file called "Project Paper.pdf". This paper details the results of the project, and provides sample images generated by the network

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages