Coder Social home page Coder Social logo

demetoir / allgans Goto Github PK

View Code? Open in Web Editor NEW
9.0 4.0 2.0 6.81 MB

머신러닝 프레임워크를 활용한 비교사(Unsupervised) 학습 모델 구현 프로젝트

License: MIT License

Python 100.00%
python wasserstein-gans inception wgan gan lsgan framework tesnorflow machine-learning generative-adversarial-network

allgans's Introduction

ALLGANs

머신러닝 프레임워크를 활용한 비교사(Unsupervised) 학습 모델 구현 프로젝트

Unsupervised Learning Model Implementation Project Using Machine Learning Framework

Authors

Index

Training Dataset

Results

  • GAN, LSGAN, WGAN are have same generator and discriminator CNN structure.
  • No data augmentation.

GAN

dataset MNIST(20 epoch) fashion-mnist(20 epoch)
result image GAN_MNIST_img GAN_Fashion-MNIST_img
loss D GAN_MNIST_loss-d GAN_Fashion-MNIST_loss-d
loss D_real GAN_MNIST_loss-d-real GAN_Fashion-MNIST_loss-d-real
loss D_gen GAN_MNIST_loss-d-gen GAN_Fashion-MNIST_loss-d-gen
loss G GAN_MNIST_loss-g GAN_Fashion-MNIST_loss-g
dataset CIFAR10(20 epoch) LLD(20 epoch)
result image GAN_CIFAR10_img GAN_LLD_img
loss D GAN_CIFAR10_loss-d GAN_LLD_loss-d
loss D_real GAN_CIFAR10_loss-d-real GAN_LLD_loss-d-real
loss D_gen GAN_CIFAR10_loss-d-gen GAN_LLD_loss-d-gen
loss G GAN_CIFAR10_loss-g GAN_LLD_loss-g

LSGAN

dataset MNIST(20 epoch) fashion-mnist(20 epoch)
result image LSGAN_MNIST_img LSGAN_Fashion-MNIST_img
loss D LSGAN_MNIST_loss-d LSGAN_Fashion-MNIST_loss-d
loss D_real LSGAN_MNIST_loss-d-real LSGAN_Fashion-MNIST_loss-d-real
loss D_gen LSGAN_MNIST_loss-d-gen LSGAN_Fashion-MNIST_loss-d-gen
loss G LSGAN_MNIST_loss-g LSGAN_Fashion-MNIST_loss-g
dataset CIFAR10(20 epoch) LLD(20 epoch)
result image LSGAN_CIFAR10_img LSGAN_LLD_img
loss D LSGAN_CIFAR10_loss-d LSGAN_LLD_loss-d
loss D_real LSGAN_CIFAR10_loss-d-real LSGAN_LLD_loss-d-real
loss D_gen LSGAN_CIFAR10_loss-d-gen LSGAN_LLD_loss-d-gen
loss G LSGAN_CIFAR10_loss-g LSGAN_LLD_loss-g

WGAN

dataset MNIST(20 epoch) fashion-mnist(20 epoch)
result image WGAN_MNIST_img LSGAN_Fashion-MNIST_img
loss D WGAN_MNIST_loss-d LSGAN_Fashion-MNIST_loss-d
loss D_real WGAN_MNIST_loss-d-real LSGAN_Fashion-MNIST_loss-d-real
loss D_gen WGAN_MNIST_loss-d-gen LSGAN_Fashion-MNIST_loss-d-gen
loss G WGAN_MNIST_loss-g LSGAN_Fashion-MNIST_loss-g
dataset CIFAR10(20 epoch) LLD(20 epoch)
result image WGAN_CIFAR10_img WGAN_LLD_img
loss D WGAN_CIFAR10_loss-d WGAN_LLD_loss-d
loss D_real WGAN_CIFAR10_loss-d-real WGAN_LLD_loss-d-real
loss D_gen WGAN_CIFAR10_loss-d-gen WGAN_LLD_loss-d-gen
loss G WGAN_CIFAR10_loss-g WGAN_LLD_loss-g
after 5 epoch
WGAN result - after training LLD dataset for 5 epoch

Observation

  1. MNIST dataset is easy for GAN, LSGAN, WGAN.
  2. Training with Fashion-MNIST dataset, GAN is slightly better others.
  3. Training with CIFAR 10 dataset, WGAN are better than others. but clearly does not generate looks pretty image like original image.
  4. Training with LLD dataset, three GANs generate similar image. Compare with original image, three GANs generate ugly image.

Compare other GANs, WGAN generate best image in less epoch, but after 5 epoch generate worse than others.

Above loss of generator and discriminator, generator overpowered discriminator.

GANs trained outline of all original dataset(fashion-mnist, CIFAR10, LLD), but did not train detail.

Getting Started

  1. python ./setup.py install and follow console (If you already installed dependencies, follow step 2.)
  2. Run bench code python ./main.py
  3. If you want to run another instance, modify workbench/bench_code.py.

Folder structure

├─data          # default dataset
├─data_handler
├─dict_keys
├─instance      # default model instance
├─model
├─unit_test
├─util
├─visualizer
└─workbench     # bench code, DatasetHelper

Dependency

  • Python 3.5+
    • matplotlib (2.1.2)
    • numpy (1.14.0)
    • pandas (0.22.0)
    • Pillow (5.0.0)
    • scikit-image (0.13.1)
    • scikit-learn (0.19.1)
    • scipy (1.0.0)
    • tensorflow (1.4.1)
    • tensorflow-gpu (1.4.1)
    • tensorflow-tensorboard (0.4.0)
    • opencv-python (3.4.0.12)
    • requests (2.18.4)

Reference

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.