Giter VIP home page Giter VIP logo

3d-vq-vae-2's Introduction

Install

conda env create -f environment.yml
pip install .

Checkpoints / Codes / Samples

All checkpoints, codes, and samples are available at https://surfdrive.surf.nl/files/index.php/s/xY7bwjrgfnhPCAt.
Simply copy+pasting the folder structure over the root of this reposity is sufficient.
For completeness, the relative path (from root) of each checkpoint/code/sample is listed in the following table:

Checkpoints Full size (512×512×128) Downscaled (256×256×128)
AE 3-layer 2-layer
Codes 3-layer-codes 2-layer-codes
Pixel Model Top
Mid
Bottom
Top
Bottom
Samples Unconditional Conditional
Unconditional

Due Credit

This implementation alters and re-uses ideas from a few places:

3d-vq-vae-2's People

Contributors

robogast avatar rosinality avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

3d-vq-vae-2's Issues

Installing

When installing the dependencies, I am getting:

$ conda env create -f environment.yml
Collecting package metadata (repodata.json): done
Solving environment: failed

ResolvePackageNotFound: 
  - torchvision==0.9.0.dev20210122=py38_cu110
  - pytorch==1.8.0.dev20210122=py3.8_cuda11.0.221_cudnn8.0.5_0
  

Any ideas?

Clarifications on Decoder and Embeddings

@robogast

Happy to report I was able to train a VQ-VAE using a dataset. Very cool to see - and kudos for the nice Tensorboard outputs you have in place! 😎

  1. Do you have any suggestions or code for randomly sampling from the decoder in a generative fashion?

  2. Also, If you have a summary of these files and their purpose, that would be very helpful. I would be happy to do a PR with some comments in the repository if that would be helpful.

Questions on:
calc_ssim_from_checkpoint.py # does this calculate SSIM across the dataset ❓
decode_embeddings.py # Specifications for db_path ❓
extract_embeddings.py # Does this save embedding to disk ❓

Ran successfully:
plot_from_checkpoint.py # plots a forward pass from a random sample ✅
train.py # trains a model ✅

Much appreciated!
-Akshay

Training PixelCNN unclear

Hi,

I'm using your implementation to generate MRIs. I have trained a VQ-VAE to reconstruct 3D MRIs, but I am unsure about which vectors to use for training the PixelCNN for sampling.

I attempted to understand your LMDB implementation, but it would take me a significant amount of time to fully grasp it. I'm not clear on what exactly is being stored in the LMDB database.

Given that the VQ-VAE encoder outputs multiple quantization vectors (one for each encoding block), what should be the specific input for the PixelCNN?

x = torch.randn(4, 3, 128, 128, 64).to('cuda')
decoded, (commitment_loss, quantizations, encoding_idx) = vqvae(x)

I think i'll have to modify the LMDB data module part.

Thank you!

Steps for Training VQ-VAE?

Hello,

I wanted to confirm the steps for training a VQ-VAE on radiology data. Thank you for working on such an interesting and important application of VQ-VAE. Our research group is particularly interested in applications to oncologic imaging.

1. Sample data

2. Training

  • Would you recommend leaving the default parameters in the vqvae/train.py script (aside from the dataset)?
  • Any suggestions here would be very much appreciated!

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.