Instructions to use a-b-15/DCGAN with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Keras
How to use a-b-15/DCGAN with Keras:
# !pip install -U keras tensorflow huggingface_hub # Keras needs TensorFlow installed to read "hf://" paths, so the tensorflow backend is selected here; # "jax" and "torch" also work for computation once TensorFlow is installed. import os os.environ["KERAS_BACKEND"] = "tensorflow" import keras model = keras.saving.load_model("hf://a-b-15/DCGAN") - Notebooks
- Google Colab
- Kaggle
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:
python train.py - Run the web app:
python app.py - 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