GithubHelp home page GithubHelp logo

sayedmohamedscu / vqgan Goto Github PK

View Code? Open in Web Editor NEW
4.0 2.0 0.0 6.31 MB

Vector-Quantized Generative Adversarial Networks

Python 100.00%
codebook encoder-decoder-model gan generative-adversarial-network pytorch vq-vae vqgan

vqgan's Introduction

VQGAN

Vector-Quantized Generative Adversarial Networks:

This repository contains a simple implementaion the code for VQGAN without using Clip :

a deep neural network architecture that can generate images from it used the basic VQVAE followed by a discriminator .

The model consists of an encoder, a decoder, a vector quantization module and a discriminator .

A full visualization of the system

Code

The code for VQGan is divided into two parts:

  • train file

  • Encoder_decoder_disc_VQ file

train file

This folder contains the code for training VQGan on your own dataset. You need to add your dataset to the data folder called Dataset.

To train the model, run the following command:

python train.py

Encoder_decoder_disc_VQ file

This file contains the code for the VQGan model. It has four parts:

  • Encoder
  • Decoder
  • VQ
  • Discriminator

Encoder

The encoder takes an input image and encodes it into a low-dimensional latent vector.

Decoder

The decoder takes the latent vector generated by the encoder and decodes it into an image.

VQ

The VQ module is responsible for learning the discrete latent space and providing the quantized latent code for the generator.

Discriminator

The discriminator is a neural network that takes an image as input and predicts whether it is real or fake. It is used to train the VQGAN model through adversarial learning.

Requirements

The code requires the following packages to be installed:

  • torch
  • torchvision
  • matplotlib
  • numpy
  • torchsummary
  • opencv-python

Dataset

MAinly was 102 Category Flower Dataset

Results

results of epoch 60

vqgan's People

Contributors

sayedmohamedscu avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.