Skip to content

Latest commit

 

History

History
39 lines (29 loc) · 1 KB

README.md

File metadata and controls

39 lines (29 loc) · 1 KB

Image Generation

Image generation using GAN, with CIFAR-10 and Celeb-A

Early sample from Celeb-A training

Implemented Variations

  • DCGAN (Deep Convolutional GAN)
  • WGAN-WC (Wasserstein GAN with Weight Clipping)
  • WGAN-GP (Wassertstein GAN with Gradient Clipping)

Build and Run

With uv installed

# Clone the repo
git clone [email protected]:hmzdot/imgen.git
cd imgen

# Install dependencies
uv sync

# Run training
# Under the hood it calls `uv run python -m bin.train`
# (This generates snapshots/dw_{timestamp}.pth and snapshots/gw_{timestamp}.pth)
uv run train --model=dcgan --dataset=cifar10
uv run train --model=wgan_wc --dataset=cifar10
uv run train --model=wgan_gp --dataset=celeba
uv run train --help

# Generate a random image
# Under the hood it calls `uv run python -m bin.eval`
# Takes generator network's weights as the input
uv run eval snapshosts/gw_{timestamp}.pth
uv run eval snapshosts/gw_{timestamp}.pth --img_size=128 # For Celeb-A
uv run eval --help