Skip to content

Generative flow models for creating porous media images

License

Notifications You must be signed in to change notification settings

suetri-a/RockFlow

Repository files navigation

RockFlow

This repository is based on a PyTorch implementation of the Glow model. Please see documentation at y0ast/Glow-Pytorch for further details of the implementation.

Setup and run

You will need the following dependencies and python 3.6+

pytorch (tested on 1.1.0)
torchvision
pytorch-ignite (0.3.0)
tqdm
matplotlib
tensorboard (1.14.0)
pytz
pillow (6.1)

Training

To reproduce the Bentheimer training results, download the dataset here, and run

python train.py --dataset=Bentheimer --patch_size=128 --batch_size=4 --epochs=30

Everything is configurable through command line arguments, see

python train.py --help

for what is possible.

Generation

For 3D volume generation, to generate N unique volumes, run

python gen3d.py --name=/PATH_TO_RESULTS --model=/MODEL_NAME.pth --iter=N

For additional configurations (step size, post-processing), see

python gen3d.py --help

Example output

Bentheimer output example

References:

@inproceedings{kingma2018glow,
  title={Glow: Generative flow with invertible 1x1 convolutions},
  author={Kingma, Durk P and Dhariwal, Prafulla},
  booktitle={Advances in Neural Information Processing Systems},
  pages={10215--10224},
  year={2018}
}

@inproceedings{nalisnick2018do,
    title={Do Deep Generative Models Know What They Don't Know? },
    author={Eric Nalisnick and Akihiro Matsukawa and Yee Whye Teh and Dilan Gorur and Balaji Lakshminarayanan},
    booktitle={International Conference on Learning Representations},
    year={2019},
    url={https://openreview.net/forum?id=H1xwNhCcYm},
}

About

Generative flow models for creating porous media images

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages