YAML Metadata Warning:empty or missing yaml metadata in repo card
Check out the documentation for more information.
Unconditional DCGAN β Pokemon Image Generator
Model Description
A DCGAN-style unconditional Generative Adversarial Network trained to generate Pokemon-style images from random noise.
The Generator uses transposed convolutions to progressively upsample a latent vector into a 64Γ64 RGB image, while the Discriminator uses strided convolutions to downsample and classify images as real or fake.
Architecture
Generator
- Input: noise vector
z(latent dim = 100) - Linear projection: 100 β 512Γ4Γ4, reshaped to
(512, 4, 4) - Transposed conv layers: 4Γ4 β 8Γ8 β 16Γ16 β 32Γ32 β 64Γ64
- BatchNorm + ReLU activations, Tanh output
- Output:
(3, 64, 64)RGB image
Discriminator
- Input:
(3, 64, 64)RGB image - Strided conv layers: 64Γ64 β 32Γ32 β 16Γ16 β 8Γ8 β 4Γ4
- BatchNorm + LeakyReLU activations, Sigmoid output
Training
- Dataset: huggan/pokemon (7,357 images)
- Epochs: 200
- Batch size: 64
- Optimizer: Adam β Generator lr = 0.0002, Discriminator lr = 0.0001 (Ξ² = 0.5, 0.999)
- Loss: Binary Cross-Entropy with label smoothing (real targets = 0.9)
- Generator steps per batch: 2 (to balance training against the Discriminator)
- Augmentation: random crop, horizontal flip, color jitter
- Hardware: Apple MPS (Metal Performance Shaders)
Usage
from huggingface_hub import hf_hub_download
import torch
from pokemon_gan_model import Generator
model = Generator(latent_dim=100)
weights_path = hf_hub_download(repo_id="beatrizfarias/pokemon-gan", filename="pokemon_gan_generator.pth")
model.load_state_dict(torch.load(weights_path, map_location="cpu"))
model.eval()
z = torch.randn(1, 100)
with torch.no_grad():
img = model(z) # shape: (1, 3, 64, 64)
Results
After 200 epochs, the generator produces images with clear creature-like silhouettes and Pokemon-style color palettes on white backgrounds.
Inference Providers NEW
This model isn't deployed by any Inference Provider. π Ask for provider support