explaingit

eriklindernoren/keras-gan

9,210PythonAudience · researcherComplexity · 3/5Setup · moderate

TLDR

A collection of 21 Keras implementations of popular GAN research papers, including CycleGAN, Pix2Pix, and SRGAN, each in its own folder with a training command and link to the original paper.

Mindmap

mindmap
  root((repo))
    What it does
      21 GAN implementations
      Image generation
      Style transfer
    Notable Models
      CycleGAN
      Pix2Pix
      SRGAN super-resolution
    Structure
      Each in own folder
      Paper link included
      Training command provided
    Audience
      ML learners
      Researchers
      PyTorch alternative linked
Click or tap to explore — scroll the page freely

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

Things people build with this

USE CASE 1

Train a CycleGAN to translate images between two visual domains without needing paired training examples.

USE CASE 2

Use the SRGAN implementation as a starting point for building an image super-resolution model.

USE CASE 3

Compare how different GAN architectures differ in code structure by reading multiple implementations side by side.

Tech stack

PythonKeras

Getting it running

Difficulty · moderate Time to first run · 1h+

Training GANs requires a GPU, image datasets must be downloaded separately using included scripts before training can start.

In plain English

This repository is a collection of Python implementations of 21 different Generative Adversarial Network architectures, all written using Keras, a popular deep learning library. Generative Adversarial Networks, or GANs, are a type of AI model where two neural networks are trained together: one generates fake data (usually images), and the other tries to distinguish real data from fake. Over many training rounds, the generator gets better at producing convincing output. The 21 implementations here each correspond to a research paper and cover a range of GAN variations with different goals. Some are designed to generate images that match a certain style or category. CycleGAN, for example, can translate photos of apples into oranges and back without needing paired example images. Pix2Pix translates images of one type into another, such as turning building facades sketches into photographs. SRGAN (super-resolution GAN) attempts to increase the resolution of a low-quality image. Other variants explore different training techniques that stabilize or improve the generation process. Each implementation lives in its own subfolder and includes a short description, a link to the original research paper, and a command you can run to start training. Most examples train on image datasets that are either built into the code or downloadable via included scripts. The README notes that the project is no longer actively maintained, and the implementations are described as simplified versions of the original papers: they aim to convey the core concept of each approach rather than reproduce every architectural detail exactly. This repository suits someone learning about how GANs work by reading and running code, or a researcher who wants a quick reference implementation to compare against or build from. A related repository using PyTorch instead of Keras is also linked.

Copy-paste prompts

Prompt 1
I cloned keras-gan and want to train the CycleGAN to translate horse photos to zebra photos. Walk me through downloading the dataset and running the training script.
Prompt 2
Explain how the Pix2Pix implementation in keras-gan works, what does the generator do, what does the discriminator do, and how does the adversarial loss connect them?
Prompt 3
I want to modify the DCGAN in keras-gan to generate 128x128 images instead of 32x32. What specific changes do I need to make to the generator and discriminator layer sizes?
Open on GitHub → Explain another repo

← eriklindernoren on gitmyhub — every repo by this author, as a profile.

Verify against the repo before relying on details.