Skip to content

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

License

Notifications You must be signed in to change notification settings

demetoir/ALLGANS

Repository files navigation

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