Chessman DCGAN - Chess Piece Generator
This is a Deep Convolutional Generative Adversarial Network (DCGAN) trained to generate images of chess pieces.
Model Description
- Architecture: DCGAN (Deep Convolutional GAN)
- Framework: TensorFlow/Keras
- Input: 100-dimensional random noise vector
- Output: 64x64 RGB images of chess pieces
- Training Data: 552 images from the Chessman Image Dataset (6 chess piece types)
Training Details
- Epochs: 50
- Batch Size: 128
- Optimizer: Adam (lr=1e-4, beta_1=0.5)
- Loss: Binary Cross-Entropy with label smoothing
- Data Augmentation: Random flips, rotations, and zoom
Model Architecture
Generator
- Input: 100-dim latent vector
- Dense layer โ 8ร8ร256
- Conv2DTranspose layers: 256โ128โ64โ3
- Output: 64ร64ร3 RGB image
Discriminator
- Input: 64ร64ร3 RGB image
- Conv2D layers: 64โ128โ256
- Output: Binary classification (real/fake)
Usage
import tensorflow as tf
import numpy as np
import matplotlib.pyplot as plt
# Load the model
generator = tf.keras.models.load_model('dcgan_generator.keras')
# Generate random noise
noise = tf.random.normal([1, 100])
# Generate image
generated_image = generator(noise, training=False)
# Display
img = ((generated_image[0, :, :, :] * 127.5) + 127.5).numpy().astype("uint8")
plt.imshow(img)
plt.axis('off')
plt.show()
Limitations
- Images are 64ร64 resolution (relatively low)
- Model trained on only 552 images (small dataset)
- Generated pieces may not always be perfectly recognizable
- No control over which piece type is generated
Citation
Dataset: Chessman Image Dataset on Kaggle
License
MIT License
Inference Providers
NEW
This model isn't deployed by any Inference Provider.
๐
Ask for provider support