{"id":17408962,"url":"https://github.com/lukasmosser/snist","last_synced_at":"2025-08-21T03:32:35.108Z","repository":{"id":37595085,"uuid":"179105980","full_name":"LukasMosser/SNIST","owner":"LukasMosser","description":"A Benchmark for Seismic Velocity Inversion from Synthetics","archived":false,"fork":false,"pushed_at":"2024-07-25T10:14:43.000Z","size":30911,"stargazers_count":44,"open_issues_count":2,"forks_count":5,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-04-08T03:31:13.484Z","etag":null,"topics":["data-science","deep-learning","geology","geophysics","machine-learning","physics","seismic","waveform"],"latest_commit_sha":null,"homepage":"","language":"Jupyter Notebook","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/LukasMosser.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-04-02T15:21:30.000Z","updated_at":"2025-03-13T05:46:32.000Z","dependencies_parsed_at":"2024-10-18T19:13:29.080Z","dependency_job_id":null,"html_url":"https://github.com/LukasMosser/SNIST","commit_stats":{"total_commits":56,"total_committers":5,"mean_commits":11.2,"dds":0.1785714285714286,"last_synced_commit":"a9fadf4a4ff1d0570cf02ed09116e025348f4a0f"},"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/LukasMosser/SNIST","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LukasMosser%2FSNIST","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LukasMosser%2FSNIST/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LukasMosser%2FSNIST/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LukasMosser%2FSNIST/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/LukasMosser","download_url":"https://codeload.github.com/LukasMosser/SNIST/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LukasMosser%2FSNIST/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":271420516,"owners_count":24756580,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-21T02:00:08.990Z","response_time":74,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["data-science","deep-learning","geology","geophysics","machine-learning","physics","seismic","waveform"],"created_at":"2024-10-16T23:07:03.498Z","updated_at":"2025-08-21T03:32:32.997Z","avatar_url":"https://github.com/LukasMosser.png","language":"Jupyter Notebook","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT) \n[![Language grade: Python](https://img.shields.io/lgtm/grade/python/g/LukasMosser/SNIST.svg?logo=lgtm\u0026logoWidth=18)](https://lgtm.com/projects/g/LukasMosser/SNIST/context:python) [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/LukasMosser/SNIST/blob/master/benchmarks/SNIST_Benchmark_Roeth_and_Tarantola.ipynb)\n[![DOI](https://zenodo.org/badge/179105980.svg)](https://zenodo.org/badge/latestdoi/179105980)\n\n# Seismic-NIST\n\u003cdetails\u003e\u003csummary\u003eTable of Contents\u003c/summary\u003e\u003cp\u003e\n\n* [What the data looks like](#what-the-data-looks-like)\n* [Why Seismic-NIST was created](#why-seismic-nist-was-created)\n* [Get the Data](#get-the-data)\n* [Benchmarks and Results](#benchmarks-and-results)\n* [Generating the data](#generating-the-data)\n* [Contributing](#contributing)\n* [Citation](#citation)\n* [License](#license)\n\u003c/p\u003e\u003c/details\u003e\u003cp\u003e\u003c/p\u003e\n\n```Seismic-NIST``` is a dataset of acoustic [seismic](https://wiki.seg.org/wiki/Seismic_Data_Analysis) waveforms and their underlying [velocity profiles](https://wiki.seg.org/wiki/Inversion_of_seismic_data). The dataset is inspired by the work of [Roeth and Tarantola 1994](https://agupubs.onlinelibrary.wiley.com/doi/abs/10.1029/93JB01563) where the authors tried to perform [seismic inversion](https://wiki.seg.org/wiki/Inversion_of_seismic_data) from raw acoustic waveforms at various levels of noise. Here we provide a reference dataset of such waveforms. The machine learning task to be solved is a regression problem of predicting synthetic [p-Wave velocity](https://wiki.seg.org/wiki/Dictionary:P-wave) profiles from given acoustic waveforms. The data can be generated completly from scratch using [```torch```](pytorch.org) and libraries from the [```devito```](https://github.com/opesci/devito) project.  \nThe dataset is named after the outstanding deep-learning benchmark [MNIST](http://yann.lecun.com/exdb/mnist/index.html) by [Yann Le Cun](http://yann.lecun.com/), and is inspired by other projects such as [FashionMNIST](https://github.com/zalandoresearch/fashion-mnist) and [KMNIST](https://github.com/rois-codh/kmnist).\n\n## What the data looks like\n\nThe dataset consists of 750 waveforms generated from 9-layer earth models of acoustic p-wave velocities.  \nThe training set consists of 600 waveforms and the test sets consist of 150 waveforms.  \nThere are three test sets - SNIST-0, SNIST-1 and SNIST-2.  \nThe number corresponds to the level of noise added to the test set i.e. SNIST-0 has no noise added, SNIST-1 adds 1 sigma of noise, and SNIST-2 has 2 sigma of noise added. The noise is Gaussian uncorrelated noise.  \nEach waveform consists of 20 [traces](https://wiki.seg.org/wiki/Dictionary:Seismic_trace) according to 20 [offsets](https://wiki.seg.org/wiki/Dictionary:Common-offset_gather) sampled at 8 ms time intervals. [p-Wave velocities](https://wiki.seg.org/wiki/Dictionary:P-wave) are capped at 4000 [m/s]. \nHere's what the waveform amplitudes and some of the velocity profiles (ground truth - black) look like.\n\n![](benchmarks/figures/test_amplitudes_grid.png)\n![](benchmarks/figures/test_velocities_grid.png)\n\n## Why Seismic-NIST was created \n\nThe dataset was largely inspired by discussion on the [software-underground](https://softwareunderground.org/) slack channel and by Agile Geoscience's [blog post](https://agilescientific.com/blog/2019/4/3/what-makes-a-good-benchmark-dataset) on benchmark studies in the machine learning - geoscience domain.    \nWhile the realism and usefulness in terms of real seismic applications is limited, this benchmark may serve as a reference on what a realistic benchmark should include. Hence, this benchmark is very much a platform or sandbox as not (m)any reference benchmarks exist in the seismic deep-learning domain. It is up to the community to shape what we want out of such a reference benchmark and I hope to provide here a starting point for such a discussion.  \nIf you would like to contribute or would like to raise an [issue](https://github.com/LukasMosser/SNIST/issues) please do so and join the discussion on the [slack-channel](https://softwareunderground.org/).\n\n## Get the Data\n\nThe data comes prepackaged as ```.npy``` files. Which you can either download manually or use the existing ```torch.dataset``` implementation found in ```utils/snist```.\n\n| File            | Examples | Size | Download (NumPy format)      |\n|-----------|--------------|------------|------------------|\n| Training Amplitudes | 600             | 13 MB | [train_amplitudes.npy](https://raw.githubusercontent.com/LukasMosser/SNIST/master/data/train/train_amplitudes.npy) |\n| Training Velocities | 600             | 21 KB | [train_velocities.npy](https://raw.githubusercontent.com/LukasMosser/SNIST/master/data/train/train_velocities.npy)  |\n| Testing Amplitudes 0 (no noise - SNIST-0)  | 150             | 3 MB |[test_amplitudes.npy](https://raw.githubusercontent.com/LukasMosser/SNIST/master/data/test/test_amplitudes.npy)  |\n| Testing Amplitudes 1 (1 sigma noise - SNIST-1)  | 150             | 3 MB |[test_amplitudes_noise_1.npy](https://raw.githubusercontent.com/LukasMosser/SNIST/master/data/test/test_amplitudes_noise_1.npy)  |\n| Testing Amplitudes 2 (2 sigma noise - SNIST-2)  | 150             | 3 MB |[test_amplitudes_noise_2.npy](https://raw.githubusercontent.com/LukasMosser/SNIST/master/data/test/test_amplitudes_noise_2.npy)  |\n| Testing Velocities  | 150            | 5 KB | [test_velocities.npy](https://raw.githubusercontent.com/LukasMosser/SNIST/master/data/test/test_velocities.npy) |\n\n## Pytorch Datasets\n\nThe following is an example on how to use the provided dataset in ```torch```.\nAll the data will automatically be downloaded - in this case - from the directory and is ready for training.  \nYou can try it out on [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/LukasMosser/SNIST/blob/master/benchmarks/SNIST_Benchmark_Roeth_and_Tarantola.ipynb).\n\n```python\nfrom snist.dataset import SNIST\n\nsnist_train = SNIST('./', train=True, download=True)\nsnist_0_test = SNIST('./', train=False, download=True, noise=0)\nsnist_1_test = SNIST('./', train=False, download=True, noise=1)\nsnist_2_test = SNIST('./', train=False, download=True, noise=2)\n```\n\n## Benchmarks and Results\n\nA reference implementation [is provided](benchmarks/SNIST_Benchmark_Roeth_and_Tarantola.ipynb) and here we collect the performance of methods that have been evaluated on the SeismicNIST dataset.  \nIf you wish to contribute to this list please raise a [pull-request](https://github.com/LukasMosser/SNIST/pulls) and provide a link to a repository where your results can be reproduced.    \n\n|Model                            | SNIST-0 | SNIST-1 | SNIST-2 | Credit | Link \n|---------------------------------|---------|---------|---------|--------|------\n|[1-Hidden Layer Benchmark](benchmarks/SNIST-Benchmark-Roeth-and-Tarantola.ipynb)     | 242.42 [m\\s] | 287.98 [m\\s] | 428.59 [m\\s] | [@porestar](twitter.com/porestar)|[![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/LukasMosser/SNIST/blob/master/benchmarks/SNIST_Benchmark_Roeth_and_Tarantola.ipynb)\n\n## Generating the data\n\nThe data can be reproduced by running ```make build``` in the ```data_generation```\ndirectory.  \nThis will run three scripts:\n- ```generate_velocities.py```: creates the velocity models based on the paper by Roeth and Tarantola\n- ```generate_amplitudes.sh```: runs a docker container of [devito](https://github.com/opesci/devito) and runs the forward model on the created velocities\n- ```generate_noisy_test_set.py```: creates the noisy SNIST versions SNIST-1 and SNIST-2\n\n## Contributing\n\nIf you would like to contribute or would like to raise an [issue](https://github.com/LukasMosser/SNIST/issues) please do so and join the discussion on the [slack-channel](https://softwareunderground.org/).\n\n## Citation\n\nIf you use SNIST in your work we would appreciate if you could cite the dataset throught the DOI\n\n```\n@software{lukas_mosser_2022_6622823,\n  author       = {Lukas Mosser},\n  title        = {{SNIST: A Benchmark for Seismic Velocity Inversion \n                   from Synthetics}},\n  month        = jun,\n  year         = 2022,\n  publisher    = {Zenodo},\n  version      = {v1.0},\n  doi          = {10.5281/zenodo.6622823},\n  url          = {https://doi.org/10.5281/zenodo.6622823}\n}\n```\n\n## License\n\n```\nMIT License\n\nCopyright (c) 2019 Lukas Mosser\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flukasmosser%2Fsnist","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flukasmosser%2Fsnist","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flukasmosser%2Fsnist/lists"}