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

Downloads last month

-

Downloads are not tracked for this model. How to track
Inference Providers NEW
This model isn't deployed by any Inference Provider. ๐Ÿ™‹ Ask for provider support

Space using manupawar6388/Chessman_image-DCGAN 1