Skip to content

Commit 29ae54c

Browse files
author
Руслан Мифтахов
committed
Update folder structure
1 parent d39627f commit 29ae54c

18 files changed

+9
-9
lines changed
Binary file not shown.

pages/1_🟢SELF-SUPERVISED DENOISING.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66
import torch
77
import torch.nn as nn
88
from visualization_helpers import VISUALIZATION
9-
from appdata.seismic.post_processing.Transform2022_SelfSupervisedDenoising.unet import UNet
10-
from appdata.seismic.post_processing.Transform2022_SelfSupervisedDenoising.tutorial_utils import regular_patching_2D, add_whitegaussian_noise, add_bandlimited_noise, weights_init, set_seed, make_data_loader,plot_corruption, plot_training_metrics, plot_synth_results, plot_field_results, multi_active_pixels, n2v_train, n2v_evaluate
9+
from appdata.geophysics.post_processing.Transform2022_SelfSupervisedDenoising.unet import UNet
10+
from appdata.geophysics.post_processing.Transform2022_SelfSupervisedDenoising.tutorial_utils import regular_patching_2D, add_whitegaussian_noise, add_bandlimited_noise, weights_init, set_seed, make_data_loader,plot_corruption, plot_training_metrics, plot_synth_results, plot_field_results, multi_active_pixels, n2v_train, n2v_evaluate
1111
import time
1212

1313

pages/2_🟢FAULT SEGMENTATION-FaultSeg3D.py

+7-7
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@
1111
from utils import find_files_in_directory, predict_with_mask, std_mean_normalization
1212

1313
from keras.models import load_model
14-
from appdata.seismic.faults.faultSeg.unet3 import *
15-
from appdata.seismic.faults.faultSeg.unet3 import cross_entropy_balanced
14+
from appdata.geophysics.faults.faultSeg.unet3 import *
15+
from appdata.geophysics.faults.faultSeg.unet3 import cross_entropy_balanced
1616

1717
st.markdown("### 🛈 FaultSeg3D: using synthetic datasets to train an end-to-end convolutional neural network for 3D seismic fault segmentation by Xinming Wu (Links: [Paper](https://library.seg.org/doi/10.1190/geo2018-0646.1), [GitHub](https://github.com/xinwucwp/faultSeg))")
1818

@@ -78,15 +78,15 @@
7878
st.info("Here you can select several different weights for computing faults. Try out different ones to find the best for your project.")
7979

8080
inference_form = st.form("Inference")
81-
weight_file_list = sorted(find_files_in_directory(r'appdata/seismic/faults/faultSeg/model/', '.hdf5'))
81+
weight_file_list = sorted(find_files_in_directory(r'appdata/geophysics/faults/faultSeg/model/', '.hdf5'))
8282
weight_selected = inference_form.selectbox(
8383
'Available weights',
8484
(weight_file_list))
8585

8686
if (len(weight_file_list) == 0):
8787
st.error('''There is no weights in the model folder.
8888
Please download the pretrained models from https://drive.google.com/drive/folders/1q8sAoLJgbhYHRubzyqMi9KkTeZWXWtNd
89-
and place them here EFramework/appdata/seismic/faults/faultSeg/model.
89+
and place them here EFramework/appdata/geophysics/faults/faultSeg/model.
9090
''')
9191
inference_submit = inference_form.form_submit_button("Submit")
9292
if inference_submit:
@@ -95,12 +95,12 @@
9595
numpy_data = st.session_state[module_name]['numpy_data'].get_cube()
9696
if (weight_selected == "pretrained_model.hdf5"):
9797
# load json and create model
98-
json_file = open('appdata/seismic/faults/faultSeg/model/model3.json', 'r')
98+
json_file = open('appdata/geophysics/faults/faultSeg/model/model3.json', 'r')
9999
loaded_model_json = json_file.read()
100100
json_file.close()
101101
loaded_model = model_from_json(loaded_model_json)
102102
# load weights into new model
103-
loaded_model.load_weights("appdata/seismic/faults/faultSeg/model/"+weight_selected)
103+
loaded_model.load_weights("appdata/geophysics/faults/faultSeg/model/"+weight_selected)
104104

105105
print("Loaded model from disk")
106106

@@ -110,7 +110,7 @@
110110
st.session_state[module_name]['numpy_result'] = Numpy3D(100*predict)
111111
st.session_state[module_name]['is_predicted'] = True
112112
else:
113-
loaded_model = load_model("appdata/seismic/faults/faultSeg/model/"+weight_selected, custom_objects={'cross_entropy_balanced': cross_entropy_balanced})
113+
loaded_model = load_model("appdata/geophysics/faults/faultSeg/model/"+weight_selected, custom_objects={'cross_entropy_balanced': cross_entropy_balanced})
114114
print("Loaded model from disk")
115115
numpy_data = std_mean_normalization(numpy_data)
116116
print (numpy_data.shape)

0 commit comments

Comments
 (0)