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

  1. Train the model:
    python train.py
    
  2. Run the web app:
    python app.py
    
  3. 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
Downloads last month
11
Inference Providers NEW
This model isn't deployed by any Inference Provider. ๐Ÿ™‹ Ask for provider support

Space using a-b-15/DCGAN 1