GAN Fake vs Real Classifier
This project is an end-to-end system to classify images as either "Real" or "Fake" (GAN-generated).
Project Structure
train.py: Script to train the CNN model on the dataset.
app.py: Flask web application for image classification.
templates/: HTML templates for the web UI.
Final Dataset/: Directory containing the training images.
classifier_model.keras: The trained classification model (generated after training).
How to Run
- Train the model:
- Run the web app:
- Open your browser and navigate to
http://127.0.0.1:5000.
Architecture
The system uses a Convolutional Neural Network (CNN) built with TensorFlow/Keras. It includes:
- Rescaling layer (normalization)
- Multiple Conv2D and MaxPooling2D layers for feature extraction
- Dropout layer for regularization
- Dense layers for classification
UI Features
- Modern Glassmorphism design
- Drag and Drop image upload
- Instant classification results with confidence scores
- Responsive layout