Skip to content
This repository has been archived by the owner on Nov 16, 2023. It is now read-only.

fully-run notebooks links and fixed contrib voxel models #123

Merged
merged 14 commits into from
Dec 16, 2019
Merged
Show file tree
Hide file tree
Changes from 13 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ If you run into any problems, chances are your problem has already been solved i
### Pre-run notebooks

Notebooks stored in the repository have output intentionally displaced - you can find full auto-generated versions of the notebooks here:
- [HRNet Penobscot demo](https://deepseismicstore.blob.core.windows.net/shared/HRNet_Penobscot_demo_notebook.ipynb?sp=r&st=2019-12-13T05:11:15Z&se=2019-12-13T13:11:15Z&spr=https&sv=2019-02-02&sr=b&sig=UFwueAhZcJn8o7g1nzD4GGS7lKv9lHIJXJb%2B7kbyUZc%3D)
- [Dutch F3 dataset](https://deepseismicstore.blob.core.windows.net/shared/F3_block_training_and_evaluation_local.ipynb?sp=r&st=2019-12-13T05:10:17Z&se=2019-12-13T13:10:17Z&spr=https&sv=2019-02-02&sr=b&sig=UUDCulVUddhqfxN0%2FqcdLZ7DmcGnIYk0j%2BlM0EN8WiM%3D)
- **HRNet Penobscot demo**: [[HTML](https://deepseismicstore.blob.core.windows.net/shared/HRNet_Penobscot_demo_notebook.html)] [[.ipynb](https://deepseismicstore.blob.core.windows.net/shared/HRNet_Penobscot_demo_notebook.ipynb)]
- **Dutch F3 dataset**: [[HTML](https://deepseismicstore.blob.core.windows.net/shared/F3_block_training_and_evaluation_local.html)] [[.ipynb](https://deepseismicstore.blob.core.windows.net/shared/F3_block_training_and_evaluation_local.ipynb)]

### Azure Machine Learning
[Azure Machine Learning](https://docs.microsoft.com/en-us/azure/machine-learning/) enables you to train and deploy your machine learning models and pipelines at scale, ane leverage open-source Python frameworks, such as PyTorch, TensorFlow, and scikit-learn. If you are looking at getting started with using the code in this repository with Azure Machine Learning, refer to [Azure Machine Learning How-to](https://github.com/Azure/MachineLearningNotebooks/tree/master/how-to-use-azureml) to get started.
Expand Down
8 changes: 5 additions & 3 deletions contrib/experiments/interpretation/dutchf3_voxel/README.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,17 @@
First, make sure that `/mnt/dutch_f3` folder exists and you have write access.
First, make sure that `${HOME}/data/dutch_f3` folder exists and you have write access.

Next, to get the main input dataset which is the [Dutch F3 dataset](https://terranubis.com/datainfo/Netherlands-Offshore-F3-Block-Complete),
navigate to [MalenoV](https://github.com/bolgebrygg/MalenoV) project website and follow the links (which will lead to
[this](https://drive.google.com/drive/folders/0B7brcf-eGK8CbGhBdmZoUnhiTWs) download). Save this file as
`/mnt/dutch_f3/data.segy`
`${HOME}/data/dutch_f3/data.segy`

To download the train and validation masks, from the root of the repo, run
```bash
./scripts/get_F3_voxel.sh /mnt/dutch_f3
./contrib/scripts/get_F3_voxel.sh ${HOME}/data/dutch_f3
```

This will also download train and validation masks to the same location as data.segy.

That's it!

To run the training script, run `python train.py --cfg=configs/texture_net.yaml`.
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ WINDOW_SIZE: 65

DATASET:
NUM_CLASSES: 2
ROOT: /mnt/dutchf3
ROOT: /home/maxkaz/data/dutchf3
FILENAME: data.segy

MODEL:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,19 @@ There is also an
EAGE E-lecture which you can watch: [*Seismic interpretation with deep learning*](https://www.youtube.com/watch?v=lm85Ap4OstM) (YouTube)

### Setup to get started
- make sure you follow `SETUP.md` file in root of repo to install all the proper dependencies.
- download the data by running `scrips/get_F3_voxel.sh` from the root of this repo, i.e. from DeepSeismic folder.
- make sure you follow `README.md` file in root of repo to install all the proper dependencies.
- downgrade TensorFlow and pyTorch's CUDA:
- downgrade TensorFlow by running `pip install tensorflow-gpu==1.14`
- make sure pyTorch uses downgraded CUDA `pip install torch==1.3.1+cu92 torchvision==0.4.2+cu92 -f https://download.pytorch.org/whl/torch_stable.html`
- download the data by running `contrib/scrips/get_F3_voxel.sh` from the `contrib` folder of this repo.
This will download the training and validation labels/masks.
- to get the main input dataset which is the [Dutch F3 dataset](https://terranubis.com/datainfo/Netherlands-Offshore-F3-Block-Complete),
navigate to [MalenoV](https://github.com/bolgebrygg/MalenoV) project website and follow the links (which will lead to
[this](https://drive.google.com/drive/folders/0B7brcf-eGK8CbGhBdmZoUnhiTWs) download). Save this file as
`interpretation/voxel2pixel/F3/data.segy`


If you want to revert downgraded packages, just run `conda env update -f environment/anaconda/local/environment.yml` from the root folder of the repo.

### Monitoring progress with TensorBoard
- from the `voxel2pixel` directory, run `tensorboard --logdir='log'` (all runtime logging information is
written to the `log` folder <br />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
import os

# set default number of GPUs which are discoverable
N_GPU = 1
N_GPU = 4
DEVICE_IDS = list(range(N_GPU))
os.environ["CUDA_VISIBLE_DEVICES"] = ",".join([str(x) for x in DEVICE_IDS])

Expand Down Expand Up @@ -245,7 +245,7 @@ def main_worker(gpu, ngpus_per_node, args):


parser = argparse.ArgumentParser(description="Seismic Distributed Scoring")
parser.add_argument("-d", "--data", default="/mnt/dutchf3", type=str, help="default dataset folder name")
parser.add_argument("-d", "--data", default="/home/maxkaz/data/dutchf3", type=str, help="default dataset folder name")
parser.add_argument(
"-s",
"--slice",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
import utils

# Parameters
ROOT_PATH = "/mnt/dutchf3"
ROOT_PATH = "/home/maxkaz/data/dutchf3"
INPUT_VOXEL = "data.segy"
TRAIN_MASK = "inline_339.png"
VAL_MASK = "inline_405.png"
Expand Down
9 changes: 6 additions & 3 deletions scripts/get_F3_voxel.sh → contrib/scripts/get_F3_voxel.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,22 @@
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License.

echo "Downloading Dutch F3 from https://github.com/bolgebrygg/MalenoV"
echo "Make sure you also download Dutch F3 data from https://github.com/bolgebrygg/MalenoV"
# fetch Dutch F3 from Malenov project.
# wget https://drive.google.com/open?id=0B7brcf-eGK8CUUZKLXJURFNYeXM -O interpretation/voxel2pixel/F3/data.segy

if [ $# -eq 0 ]
then
downdirtrain='interpretation/voxel2pixel/F3/train'
downdirval='interpretation/voxel2pixel/F3/val'
downdirtrain='experiments/interpretation/voxel2pixel/F3/train'
downdirval='experiments/interpretation/voxel2pixel/F3/val'
else
downdirtrain=$1
downdirval=$1
fi

mkdir -p ${downdirtrain}
mkdir -p ${downdirval}

echo "Downloading train label to $downdirtrain and validation label to $downdirval"
wget https://github.com/waldeland/CNN-for-ASI/raw/master/F3/train/inline_339.png -O ${downdirtrain}/inline_339.png
wget https://github.com/waldeland/CNN-for-ASI/raw/master/F3/val/inline_405.png -O ${downdirval}/inline_405.png
Expand Down