All Projects → akanimax → Pro_gan_pytorch Examples

akanimax / Pro_gan_pytorch Examples

Licence: mit
Examples trained using the python pytorch package pro-gan-pth

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to Pro gan pytorch Examples

Tensorflow Srgan
Tensorflow implementation of "Photo-Realistic Single Image Super-Resolution Using a Generative Adversarial Network" (Ledig et al. 2017)
Stars: ✭ 33 (-15.38%)
Mutual labels:  convolutional-neural-networks, gan
Deblurgan
Image Deblurring using Generative Adversarial Networks
Stars: ✭ 2,033 (+5112.82%)
Mutual labels:  convolutional-neural-networks, gan
Niftynet
[unmaintained] An open-source convolutional neural networks platform for research in medical image analysis and image-guided therapy
Stars: ✭ 1,276 (+3171.79%)
Mutual labels:  convolutional-neural-networks, gan
Cyclegan Qp
Official PyTorch implementation of "Artist Style Transfer Via Quadratic Potential"
Stars: ✭ 59 (+51.28%)
Mutual labels:  convolutional-neural-networks, gan
Pytorch Srgan
A modern PyTorch implementation of SRGAN
Stars: ✭ 289 (+641.03%)
Mutual labels:  convolutional-neural-networks, gan
Fashion Mnist
A MNIST-like fashion product database. Benchmark 👇
Stars: ✭ 9,675 (+24707.69%)
Mutual labels:  convolutional-neural-networks, gan
Exermote
Using Machine Learning to predict the type of exercise from movement data
Stars: ✭ 108 (+176.92%)
Mutual labels:  convolutional-neural-networks, gan
Neuralnetworkpostprocessing
Unity Post Processing with Convolution Neural Network
Stars: ✭ 81 (+107.69%)
Mutual labels:  convolutional-neural-networks, gan
Torchfusion
A modern deep learning framework built to accelerate research and development of AI systems
Stars: ✭ 244 (+525.64%)
Mutual labels:  convolutional-neural-networks, gan
Iseebetter
iSeeBetter: Spatio-Temporal Video Super Resolution using Recurrent-Generative Back-Projection Networks | Python3 | PyTorch | GANs | CNNs | ResNets | RNNs | Published in Springer Journal of Computational Visual Media, September 2020, Tsinghua University Press
Stars: ✭ 202 (+417.95%)
Mutual labels:  convolutional-neural-networks, gan
Dped
Software and pre-trained models for automatic photo quality enhancement using Deep Convolutional Networks
Stars: ✭ 1,315 (+3271.79%)
Mutual labels:  convolutional-neural-networks, gan
T81 558 deep learning
Washington University (in St. Louis) Course T81-558: Applications of Deep Neural Networks
Stars: ✭ 4,152 (+10546.15%)
Mutual labels:  convolutional-neural-networks, gan
Machine Learning Is All You Need
🔥🌟《Machine Learning 格物志》: ML + DL + RL basic codes and notes by sklearn, PyTorch, TensorFlow, Keras & the most important, from scratch!💪 This repository is ALL You Need!
Stars: ✭ 173 (+343.59%)
Mutual labels:  convolutional-neural-networks, gan
Zhihu
This repo contains the source code in my personal column (https://zhuanlan.zhihu.com/zhaoyeyu), implemented using Python 3.6. Including Natural Language Processing and Computer Vision projects, such as text generation, machine translation, deep convolution GAN and other actual combat code.
Stars: ✭ 3,307 (+8379.49%)
Mutual labels:  convolutional-neural-networks, gan
Deep learning projects
Stars: ✭ 28 (-28.21%)
Mutual labels:  convolutional-neural-networks, gan
Lane Detector
This repository is for my article "Tutorial: Build a lane detector" published on Medium.
Stars: ✭ 31 (-20.51%)
Mutual labels:  convolutional-neural-networks
Teacher Student Training
This repository stores the files used for my summer internship's work on "teacher-student learning", an experimental method for training deep neural networks using a trained teacher model.
Stars: ✭ 34 (-12.82%)
Mutual labels:  convolutional-neural-networks
Dogembeddings
Rare pupper image compression model for word-embedding-esque operations.
Stars: ✭ 30 (-23.08%)
Mutual labels:  convolutional-neural-networks
Relativistic Average Gan Keras
The implementation of Relativistic average GAN with Keras
Stars: ✭ 36 (-7.69%)
Mutual labels:  gan
Image To Image Papers
🦓<->🦒 🌃<->🌆 A collection of image to image papers with code (constantly updating)
Stars: ✭ 949 (+2333.33%)
Mutual labels:  gan

pro_gan_pytorch-examples

This repository contains examples trained using the python package pro-gan-pth. You can find the github repo for the project at github-repository and the PyPI package at pypi

There are two examples presented here for LFW dataset and MNIST dataset. Please refer to the following sections for how to train and / or load the provided trained weights for these models.

Prior Setup

Before running any of the following training experiments, please setup your VirtualEnv with the required packages for this project. Importantly, please install the progan package using $ pip install pro-gan-pth and your appropriate gpu / cpu version of PyTorch 0.4.0. Once this is done, you can proceed with the following experiments.

LFW Experiment

The configuration used for the LFW training experiment can be found in implementation/configs/lfw.conf in this repository. The training was performed using the wgan-gp loss function.

Examples:


Sample loss plot:


MNIST Experiment

The configuration used for the MNIST training experiment can be found in implementation/configs/mnist.conf in this repository. The training was performed using the lsgan loss function.

Examples:


Sample loss plot:


How to use:

Running the training script:

For running the training script, simply use the following procedure:
$ cd implementation
$ python train_network.py --config=configs/mnist.conf

You can tinker with the configuration for your desired behaviour. This training script also exposes some of the use cases of the package's api.

Generating loss plots:

You can generate the loss plots from the `loss-logs` by using the provided script. The logs get generated while the training is in progress.
$ python generate_loss_plots --logdir=training_runs/mnist/losses/ \
                             --plotdir=training_runs/mnist/losses/loss_plots/

Using trained model:

please refer to the following code snippet if you just wish to use the trained model for generating samples:
import torch as th
import pro_gan_pytorch.PRO_GAN as pg
import matplotlib.pyplot as plt

device = th.device("cuda" if th.cuda.is_available() 
                   else "cpu")
gen = pg.Generator(depth=4, latent_size=128, 
                   use_eql=False).to(device)

gen.load_state_dict(
    th.load("training_runs/saved_models/GAN_GEN_3.pth")
)

noise = th.randn(1, 128).to(device)

sample_image = gen(noise, detph=3, alpha=1).detach()

plt.imshow(sample_image[0].permute(1, 2, 0) / 2 + 0.5)
plt.show()

The trained weights can be found in the saved_models directory present in respective training_runs.

How to use on Google Colab Notebook:

This code can be run on Google Colaboratory using GPU acceleration. Colab offers a free Tesla K80 GPU with up to ~12GB of VRAM. However, the duration of the instance is limited and closes after a certain time. All installed libraries and saved files will be reset in that process. A workaround is to save training results to Google Drive. The packages need to be installed after every instance reset.

Here is a step-by-step instruction on how to run this using Google Colab. ProGAN Colaboratory Notebook

Thanks:

Please feel free to open PRs here if you train on other datasets using this package.

Best regards,
@akanimax :)

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].