All Projects → jenspetersen → Gqn Pytorch

jenspetersen / Gqn Pytorch

Licence: mit
Implementation of GQN in PyTorch

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to Gqn Pytorch

Jsia Reid
[AAAI2020] Cross-Modality Paired-Images Generation for RGB-InfraredPerson Re-Identification
Stars: ✭ 40 (-36.51%)
Mutual labels:  deeplearning
Python Tutorial Notebooks
Python tutorials as Jupyter Notebooks for NLP, ML, AI
Stars: ✭ 52 (-17.46%)
Mutual labels:  deeplearning
Deep Kernel Gp
Deep Kernel Learning. Gaussian Process Regression where the input is a neural network mapping of x that maximizes the marginal likelihood
Stars: ✭ 58 (-7.94%)
Mutual labels:  deeplearning
Realtime Detectron
Real-time Detectron using webcam.
Stars: ✭ 42 (-33.33%)
Mutual labels:  deeplearning
Awesome Semantic Segmentation
🤘 awesome-semantic-segmentation
Stars: ✭ 8,831 (+13917.46%)
Mutual labels:  deeplearning
Pycm
Multi-class confusion matrix library in Python
Stars: ✭ 1,076 (+1607.94%)
Mutual labels:  deeplearning
Dface
Deep learning face detection and recognition, implemented by pytorch. (pytorch实现的人脸检测和人脸识别)
Stars: ✭ 994 (+1477.78%)
Mutual labels:  deeplearning
Tensorflow 101
learn code with tensorflow
Stars: ✭ 1,116 (+1671.43%)
Mutual labels:  deeplearning
Jacinto Ai Devkit
Training & Quantization of embedded friendly Deep Learning / Machine Learning / Computer Vision models
Stars: ✭ 49 (-22.22%)
Mutual labels:  deeplearning
Polyaxon Examples
Code for polyaxon tutorials and examples
Stars: ✭ 57 (-9.52%)
Mutual labels:  deeplearning
Adaptive Multispeaker Separation
Adaptive and Focusing Neural Layers for Multi-Speaker Separation Problem
Stars: ✭ 42 (-33.33%)
Mutual labels:  deeplearning
Gbrain
GPU Javascript Library for Machine Learning
Stars: ✭ 48 (-23.81%)
Mutual labels:  deeplearning
Active Convolution
Active Convolution
Stars: ✭ 56 (-11.11%)
Mutual labels:  deeplearning
Ludwig
Data-centric declarative deep learning framework
Stars: ✭ 8,018 (+12626.98%)
Mutual labels:  deeplearning
Bidaf Keras
Bidirectional Attention Flow for Machine Comprehension implemented in Keras 2
Stars: ✭ 60 (-4.76%)
Mutual labels:  deeplearning
Keras basic
keras를 이용한 딥러닝 기초 학습
Stars: ✭ 39 (-38.1%)
Mutual labels:  deeplearning
Deep dream tensorflow
An implement of google deep dream with tensorflow
Stars: ✭ 53 (-15.87%)
Mutual labels:  deeplearning
Ssd Models
把极速检测器的门槛给我打下来make lightweight caffe-ssd great again
Stars: ✭ 62 (-1.59%)
Mutual labels:  deeplearning
Aorun
Deep Learning over PyTorch
Stars: ✭ 61 (-3.17%)
Mutual labels:  deeplearning
Usss iccv19
Code for Universal Semi-Supervised Semantic Segmentation models paper accepted in ICCV 2019
Stars: ✭ 57 (-9.52%)
Mutual labels:  deeplearning

gqn-pytorch

Implementation of GQN in PyTorch.

I'd like to encourage you to also check out these two implementations that I used extensively for inspiration, troubleshooting, etc.:

https://github.com/iShohei220/torch-gqn
https://github.com/wohlert/generative-query-network-pytorch

They're probably more accessible than this implementation, because I tried to make mine very flexible.
That being said, what I found a little bit annoying with the others was the need to convert the data first, so I uploaded them in numpy format for your convenience, to be found here, so you should have this one up and running faster than the others ;) UPDATE: All datasets are now online!

No readme is complete without at least one nice picture, so here are some example predictions from the prior (bottom) along with the groundtruth (top) after training for 1 million batches (the model could see all other viewpoints for the prediction).

Groundtruth

Prediction

Prerequisites

I've only tried this with Python 3, but feel free to give it a go with version 2 and report any errors (or that it's working fine), it shouldn't take much to get it to work. Also, Windows is probably not working, not least because the batchgenerators I'm using don't support it. All dependencies are listed in requirements.txt, at the moment there are only two, batchgenerators and trixi, everything else you need will be installed with them. This GQN implementation will also become an official trixi example very soon :)

Running

  1. Download the data from here. By default the loader will assume that the data folder is on the same level as this repository. You can also set the data location from the CLI. To unpack the data, use pigz with as many processes as you can afford.

     pigz -p PROCESSES -d data_folder/*
    
  2. Install dependencies (if you work with virtualenv or conda, it's probably good practice to set up a new environment first).

     pip install -r requirements.txt
    
  3. If you want live monitoring using Visdom, start the server

     python -m visdom.server -port 8080
    

    trixi uses port 8080 by default instead of 8097.

  4. Run the experiment with

     python run.py OUTPUT_FOLDER [-v]
    

    where -v indicates you want to use a VisdomLogger. If you look into run.py, you will find a rather large default Config. Everything in this Config will be exposed to the command line automatically, as is described in the trixi docs. For example, if you don't want to hardcode the location of the data, you can just use the data_dir attribute via --data_dir SOME_OTHER_LOCATION. So far there is only one mod SHAREDCORES, i.e. modification to the default Config, but in principle mods are designed to be combined, e.g. -m MOD1 MOD2. You can of course resume experiments and do everything else that trixi offers.

Speed, Stability and Performance

I'm using PyTorch 1.0.0 with CUDA 10.0.130 and CuDNN 7.4.1, and sometimes I get a CUDNN_STATUS_INTERNAL_ERROR in the backward pass. I'm not entirely sure what the reason for this is, other people have had similar errors in different contexts and with different PyTorch versions. If you encounter this problem, set cudnn_benchmark = False in run.py. Unfortunately that makes the whole thing quite a bit slower, ~1.1s/~1.5s per batch with and without shared cores versus ~0.6s/~0.8s when cudnn_benchmark is on.

I can fit batches of size 36 on my TitanXp with 12GB memory. I'm not sure that's how it's supposed to be, because in the paper the authors state that they're working with batch size 36 on 4 K80 GPUs. Not sure whether that's 24GB K80s or 12GB like the Google Colab ones. My best guess is that it's the latter and they just had a full batch on each at a time. Running the experiment for 1 million batches (paper used twice as many) took me 22 days.

TBD

To be honest I don't see myself investing loads of time into this project, so feel free work on it yourself, pull requests are more than welcome :) A few things that are missing.

  • Multi-GPU support
  • A test function (as opposed to training and validation)
  • Actual tests (as in unittests)
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].