The goal of this project was to engineer a Convolutional Neural Network (CNN) model for image classification between datasets consisting of authentic human portraits and AI-generated faces (StyleGAN). Leveraging Python's frameworks for machine learning such as TensorFlow and OpenCV I developed a Jupyter Notebook pipeline for image preprocessing, data normalization, feature extraction, and model validation, achieving high-precision classification.
/DeepDive-Detecting-AI-Generated-Faces
├── data/ # Image datasets (Human/AI)
├── documentation/ # Research poster & icon files
├── models/ # Trained .keras models
├── notebooks/ # Data processing & training scripts
├── .env.example # Configuration template
├── .gitignore # Version control exclusions
├── README.md # Project documentation
├── Tensorboard.bat # Opens Tensorboard interface
├── Tensorflow.bat # Opens Tensorflow interface
├── requirements.txt # Python library dependencies
└── setup.bat # Automated environment setup
-
Clone the repository using:
git clone https://github.com/cdmanning/DeepDive-Detecting-AI-Generated-Faces.git -
Ensure you have Python 3.12 installed and correctly added to your system PATH.
-
Run
setup.batto automatically install all required Python libraries and generate the necessary project folders. -
Rename the
.env.examplefile to.envand verify theDATADIRpath points to your target dataset location. -
Download the image sets and place them into the
./data/Humanand./data/AIdirectories:- Human Dataset: CelebA Dataset
- AI-Generated Dataset: 1M Fake Faces Dataset
-
Run
Tensorboard.batto run the Jupyter Notebook environment and begin training the model.
- All source code in this repository is All Rights Reserved.
- The research poster and findings are licensed under CC BY-NC 4.0 Attribution-NonCommercial.
Developed as part of the 2023 UNG Annual Research Conference.
