Welcome to the Geophysical Foundation Model (GFM) repository! This repository is designed to help you explore, understand, and use the Geophysical Foundation Model.
- How to Fork and Clone the Repository
- Getting Started
- Running the Model
- Contributing
- Model Details
- Uses
- Training Details
- Evaluation
- Citations
- Contact
If you want to work on this repository or make changes follow the instructions provided below.
To fork the repository to your GitHub account:
- Go to the Geophysical Foundation Model repository page.
- Click the "Fork" button located at the top right corner of the repository.
Once you have forked the repository, you can clone it to your local machine.
- Open a terminal or command prompt.
- Navigate to the directory where you want to store the cloned repository.
- Run the following command to clone the forked repository (remember to change yourusername to your actual GitHub username):
git clone [email protected]:yourusername/geophysical-foundation-model.git
cd geophysical-foundation-model
Before making changes to the repository, it’s a good practice to create a new branch for your work. This keeps your main codebase clean and organized.
- Create a new branch using the following command. Replace
feature-my-feature
with your desired branch name:
git checkout -b feature-my-feature
- Now you are working on a separate branch and can make changes without affecting the main codebase.
Now that you have forked and cloned the repository to your local machine and have created a new branch, you can start exploring the contents.
The project is organized as follows:
GFM/
: Contains model architecture.src_imgs/
: images used in the repository.Tutorial/
: A Jupyter notebook to get you started with the model.README.md
: This file.LICENSE
: The open source license file.requirements.txt
: Dependencies for the model.
- Ensure you have Python (>3.10) installed on your system.
- Start from the
geophysical-foundation-model
directory in the terminal. - Create a new virtual environment
conda create -n geophysics python=3.10
- After creation, activate the newly created environment:
conda activate geophysics
- Install the required dependencies by running:
pip install -r requirements.txt
- Start up a Jupyterlab notebook and get started with the tutorial in the
Tutorial
directory. To start a notebook server from the terminal run
jupyter lab
And open Tutorial/GFM_webinar.ipynb
to learn more about data processing.
- For advanced users, you can download the model weights from HuggingFace and load them into an instance of the model in Python after you have requested access on HuggingFace.
from huggingface_hub import snapshot_download
MODEL_REPO_ID = "thinkonward/geophysical-foundation-model"
snapshot_download(repo_id=MODEL_REPO_ID, repo_type="model", local_dir="./gfm-weights")
# assuming you are in the `geophysical-foundation-model` directory
from GFM import ElasticViTMAE
model = ElasticViTMAE.ElasticViTMAE()
We welcome contributions from anyone interested in improving this project! To contribute to the model use the following steps:
- Fork the repository.
- Create a new branch for your changes:
git checkout -b feature/my-feature
- Make your changes and commit them:
git add .
git commit -m "Add my feature"
- Push your changes to your forked repository:
git push origin feature/my-feature
- Create a pull request from your forked repository back to the original repository.
Thank you for contributing to the Geophysical Foundation Model
ThinkOnward's Geophysical Foundation Model is a pre-trained a Vision Transformer pre-trained on 450 synthetically generated Synthoseis 3D seismic volumes. We use a new elastic architecture and trace masking process to fine-tune the Geophysical Foundation Model for the downstream task of seismic interpolation. We use 50 3D seismic volumes from the Patch the Planet Challenge, hosted by ThinkOnward as our benchmark hold-out dataset. Using a Structural Similarity Index Metric (SSIM) to compare results we document the Geophysical Foundation Model is 2-3 times better than Shang et al. (2023), and similar to Lasscock et al. (2024).
- Developed by: Ognjen Tanovic and Mike McIntire of ThinkOnward
- Model type: MAE
- License: Apache 2.0
- Based on: facebook/vit-mae-base
Link to the model repository listed below. This model was also presented as a poster at the AAPG/SEG IMAGE Conference in Houston, Texas August 26th-29th, 2024.
- Repository: https://github.com/thinkonward
- Conference Poster Abstract: https://imageevent.aapg.org/portals/26/abstracts/2024/4092088.pdf
This model is a modified version the ViT MAE architecture. The model was used to pretrain a backbone using 450 synthetically generated seismic volumes. The goal of this project is to demonstrate that Vision Transformers (ViT) with Masked Autoencoders (MAE) can be used to leverage large amounts of unlabeled seismic data through masking to train an encoder to recognize specfic features in seismic data. The pretrained backbone can then be used with a specific downstream task like interpolation, denoising, and segmentation.
Downstream tasks include:
Regression:
- Interpolation of missing sections of seismic images
- Denoising seismic data
- Inversion (planned)
Classification:
- Segmentation of horizons
- Segmentation of faults (in progress)
- Segmentation of geobodies (in progress)
The backbone of this model was trained using 3D seismic data from the Patch the Planet Challenge hosted by ThinkOnward. Use of this model on anything outside of seismic data, or similar technologies would be out-of-scope and likely have poor performance.
The data used to train the Geophysical Foundation Model was 450 synthetically generated seismic volumes. The data was generated using the Synthoseis package, which is a synthetic seismic data generator. The data was generated using the default rock properties model in the code repository. The data was genereated for the Patch the Planet Challenge, hosted by ThinkOnward.
Training Dataset Card: patch-the-planet
Test data was generated using the same Synthoseis package as the training data. The test data was generated using the same rock properties model as the training data. The test data was generated for the Patch the Planet Challenge, hosted by ThinkOnward.
Benchmark Dataset Card: patch-the-planet-benchmark
Structural Similarity Index (SSIM) - The primary metric for comparison of interpolation results is the scikit-image
implementation of the Structural Similarity Index. The Structural Similarity Index is a metric used to measure the similarity between two images. When the SSI equals 1, the images are identical. When the SSI equals 0, the images are completely dissimilar. Please refer to the scikit-image
docs for more information about the metric, as well as examples of implementation. Similarity will be calculated for all predictions. The minimum and maximum SSI values will be dropped, and the mean SSI score across all predictions will be the final score.
Mean Squared Error (MSE): - The Mean Squared Error is a metric used as a loss metric for this model to measure the average of the squares of the errors between the true and predicted values. The lower the MSE, the better the model is at predicting the values. MSE is used for regression tasks.
Cross Entropy Loss: - The Cross Entropy Loss is a metric was used as a loss metric for this model to measure the average of the loss function for all predictions. The lower the Cross Entropy Loss, the better the model is at predicting the values. Cross Entropy Loss is used for downstream classification and segmentation tasks.
We use 50 3D seismic volumes from the Patch the Planet Challenge, hosted by ThinkOnward as our benchmark hold-out dataset. Using a Structural Similarity Index Metric (SSIM) to compare results we document the Geophysical Foundation Model is 2-3 times better than Shang et al. (2023), and similar to Lasscock et al. (2024).
This model uses a modified version of the ViT MAE architecture. The model uses a masking technique on traces in 2D seismic images, rather than patches
This model was released in conjunction with the presentation of a poster at the 2024 IMAGE Conference in Houston, Texas (August 26-29th, 2024)
APA:
McIntire, M., Tanovic, O., Mazura, J., Suurmeyer, N., & Pisel, J. (n.d.). Geophysical Foundation Model: Improving results with trace masking. In https://imageevent.aapg.org/portals/26/abstracts/2024/4092088.pdf. 2024 IMAGE Conference, Houston, United States of America.
BibTex:
@misc {thinkonward_2024, author = { {ThinkOnward} }, title = { geophysical-foundation-model (Revision 2f8d6ce) }, year = 2024, url = { https://huggingface.co/thinkonward/geophysical-foundation-model }, doi = { 10.57967/hf/2908 }, publisher = { Hugging Face } }
Please contact [email protected]
for questions, comments, or concerns about this model.