Skip to content

grongier/fluvgan

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

FluvGAN

DOI:10.4121/3469c879-f443-4fcf-83a2-b6df56e96714.v1

FluvGAN is a set of Python scripts to test generating and inverting fluvial deposits using generative adversarial networks (GANs) in the context of predicting the physical properties of the subsurface. It builds upon FluvDepoSet – a dataset of 3D representations of fluvial deposits simulated with CHILD, a landscape evolution model – for training, and upon voxgan, a Python package making it easier to define and train GANs with PyTorch.

You can find more details about the context of this work and about its results in the two companion preprints to FluvGAN:

Towards geological inference with process-based and deep generative modeling

Training FluvGAN

Installation

You can install all the packages needed to run all the scripts using conda and the environment.yml file included in this repository:

conda env create -f environment.yml

In addition, the environment_cluster.yml file contains the full list of packages with which the scripts were run on a cluster with a Linux system:

conda env create -f environment_cluster.yml

This environment misses some packages to visualize the results, because those steps were not done on the cluster, and it misses voxgan, because it was used during voxgan's development (now you can install it using pip).

Usage

FluvGAN is subdivided into three folders:

  • scripts contains all the Python scripts and Jupyter notebooks to train and test the GANs, which can be subdivided into three parts:

    • Part 0, labeled data, has a single script used to download FluvDepoSet into a train and a test folder.

    • Part 1, labeled training, focuses on assessing training stability and sample quality:

      • Section 1, labeled architecture, trains different GAN architectures based on DCGAN and WGAN.
      • Sections 2 & 3, labeled test-msswd & test-los, assess the quality and diversity of samples from architecture_dcgan_4 against the test samples.
      • Section 4, labeled memorization, assesses if architecture_dcgan_4 only memorizes its training data.
      • Section 5, labeled training-size, assesses the impact of the size of the training dataset on architecture_dcgan_4.
      • Section 6, labeled latent-size, assesses the impact of the size of the latent vector on architecture_dcgan_4.
      • Section 7, labeled non-centered, assesses if architecture_dcgan_4 can generate smaller samples where the channel belt isn't centered.
      • Sections 8 & 9, labeled facies & facies-non-centered, assess if architecture_dcgan_4 can generate discrete properties.
      • Section 10, labeled no-time, assesses the impact of the second generated property, the deposition time, on training architecture_dcgan_4.
      • An extra section, labeled figure, gathers the notebooks used to generate the figures of the article that summarizes the results of this part.
    • Part 2 is labeled inversion and focuses on assessing GAN inversion quality:

      • Section 1, labeled data-generation, extracts the well & seismic data used in the inversion from three test samples.
      • Section 2, labeled initial-error, assesses the inversion and generalization errors prior to inversion.
      • Section 3, labeled prior-art, assesses the inversion error for four approaches used in previous studies.
      • Section 4, labeled loss-landscape, uses the loss landscape to visualize the inversion error.
      • Section 5, labeled architecture, assesses if changing the GAN architecture impacts the inversion.
      • Section 6, labeled latent-size, assesses if changing the size of the latent vector impacts the inversion.
      • Section 7, labeled disentangling, assesses if using a conditional GAN impacts the inversion.
      • Section 8, labeled editing, assesses if using pivotal tuning impacts the inversion.
      • Section 9, labeled seismic, assesses the impact of adding seismic data to the inversion.
      • Section 10, labeled summary-samples, computes sample mean and standard deviation before and after pivotal tuning without and with seismic data.
      • Section 11, labeled test-msswd, assesses the quality and diversity of the samples before and after pivotal tuning without and with seismic data against the test samples.
      • Section 12, labeled random-samples, randomly selects some samples after pivotal tuning without and with seismic data for visualization.
      • An extra section, labeled figure, gathers the notebooks used to generate the figures of the article that summarizes the results of this part.
  • data is not directly available on GitHub but here and contains all the data:

    • The samples from FluvDepoSet; they need to be downloaded using the script fluvgan_0_data.py, which organizes them into two folders:
      • train contains the samples 1 to 20000, which are used for training.
      • test contains the samples 20001 to 20200, which are used for testing.
    • The well & seismic data and the ground truths used in part 2, which can be recreated using the notebook fluvgan_2_inversion_1_data-generation.ipynb.
  • outputs is not directly available on GitHub but here and contains all the outputs from all the scripts, including the pretrained GAN models; the outputs' names follow the same convention as the scripts, and the scripts showcase how to reuse those outputs using Python.

Citation

If you use scripts or outputs from part 1 on training in your research, please cite the following preprint:

Rongier, G., & Peeters, L. (2025). Towards geological inference with process-based and deep generative modeling, part 1: training on fluvial deposits. arXiv. https://doi.org/10.48550/arXiv.2510.14445

If you use scripts or outputs from part 2 on inversion in your research, please cite the following preprint:

Rongier, G., & Peeters, L. (2025). Towards geological inference with process-based and deep generative modeling, part 2: inversion of fluvial deposits and latent-space disentanglement. arXiv. https://doi.org/10.48550/arXiv.2510.17478

If you use FluvDepoSet in your research, please cite the following preprint:

Rongier, G., & Peeters, L. (2025). FluvDepoSet: A dataset of synthetic 3D models of fluvial deposits. EarthArXiv. https://doi.org/10.31223/X5HX8D

Credits

This software was developed by:

Guillaume Rongier
ORCID Badge
Luk Peeters
ORCID Badge

License

Copyright notice: Technische Universiteit Delft hereby disclaims all copyright interest in the program fluvgan written by the Author(s). Prof.dr.ir. S.G.J. Aarninkhof, Dean of the Faculty of Civil Engineering and Geosciences

© 2025, Guillaume Rongier, Luk Peeters

This work is licensed under a MIT OSS licence, see LICENSE for more information.

About

Python scripts to test generating and inverting fluvial deposits using GANs

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published