Open SiyuLuoX opened 5 months ago
Hi Siyu,
Yes, in this version of dataset, we deliberately sample well facies data to make sure they are not 100% consistent with the ground truth facies map, instead well facies data are sampled with a probability to be consistent with the ground truth meaning that some well facies are consistent while some are not. Such a setting is mainly because in this project, we will still have a channel probability map showing the possible location of channels and if the well facies data are just sampl
Suihong Song | |
---|---|
@. | ---- Replied Message ---- | From | @.> | | Date | 03/14/2024 00:53 | | To | SuihongSong/GeoModeling_GANSim-2D_Condition_to_Well_Facies_and_Global_Features @.> | | Cc | Subscribed @.> | | Subject | [SuihongSong/GeoModeling_GANSim-2D_Condition_to_Well_Facies_and_Global_Features] Well facies data does not match the actual facies model when reading the dataset (Issue #2) |
tensorflow2.1 python 3.8
Well facies data does not match the actual facies model when reading the dataset.But the facies model and global conditions match. Here is my code
from tensorflow import keras import tensorflow as tf import os import numpy as np import matplotlib.pyplot as plt
tfrecord_path = 'DataSets/TrainingData/TrainingData-1r06.tfrecords' # 分辨率最大64*64 wellfacies_path = 'DataSets/TrainingData/TrainingData-3wellfacies.tfrecords' label_path = 'DataSets/TrainingData/TrainingData-4rxx.labels'
labels = np.load(label_path) label_type = [1,2,3]
def load_labels(label):
# return labels[label_type]
return tf.gather(label,label_type)
def parse_function(record): feature_description = { 'shape': tf.io.FixedLenFeature([3], tf.int64), 'data': tf.io.FixedLenFeature([], tf.string), } features = tf.io.parse_single_example(record, feature_description)
# 获取'shape'特征并转换为NumPy数组
# shape_array = np.array(features['shape'])
# print("Shape of 'shape' feature:", shape_array)
data = tf.io.decode_raw(features['data'], tf.uint8)
data = tf.reshape(data, features['shape'])
data = tf.transpose(data, perm=[1,2,0])
return data
img64_dataset = tf.data.TFRecordDataset(tfrecord_path).map(parse_function) wellfacies_dataset = tf.data.TFRecordDataset(wellfacies_path).map(parse_function) label_dataset = tf.data.Dataset.from_tensor_slices(labels).map(load_labels)
dataset = tf.data.Dataset.zip((img64_dataset, wellfacies_dataset, label_dataset))
def process_labels(labels):
# labels[:,0] = (labels[:,0]/2+0.5)*168-84
# 背景相比例
labels[0] = (labels[0]/2+0.5)*0.8037109375+0.167724609375
# 河道宽度
labels[1] = (labels[1]/2+0.5)*0.8+2.7
# amplitud/wavelength
labels[2] = (labels[2]/2+0.5)*0.4866197183098592+0.06338028169014084
return labels
num_columns = 2 # 设置子图的列数 fig, axes = plt.subplots(2, num_columns, figsize=(10, 10)) # 创建子图
for i, (image, wellfacie, label) in enumerate(dataset.take(num_columns)): label = label.numpy()
label = process_labels(label)
print(f"Image shape: {image.shape}, Label: {label}")
# 在子图中显示图像
axes[0,i].imshow(image.numpy())
axes[0,i].axis('on') # 可以选择是否显示坐标轴
axes[1,i].imshow(wellfacie.numpy())
axes[1,i].axis('on')
fig.tight_layout() plt.show()
Here's the output graph output.png (view on web)
Almost the eighth row of the second chart does not have a river, but it does show a river. May I ask if there is something I am doing incorrectly
— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you are subscribed to this thread.Message ID: @.***>
Following the last reply:
If the well facies data are directly sampled from the ground truth facies map, then the well facies information is completely included in the probability map (largest values in probability map), so the neural network may neglect the influence of well data. Of course, since well data are slightly perturbed compare to the direct sampling from the ground truth, the facies data of different wells should not contradict.
Suihong Song | |
---|---|
@. | ---- Replied Message ---- | From | @.> | | Date | 03/14/2024 00:53 | | To | SuihongSong/GeoModeling_GANSim-2D_Condition_to_Well_Facies_and_Global_Features @.> | | Cc | Subscribed @.> | | Subject | [SuihongSong/GeoModeling_GANSim-2D_Condition_to_Well_Facies_and_Global_Features] Well facies data does not match the actual facies model when reading the dataset (Issue #2) |
tensorflow2.1 python 3.8
Well facies data does not match the actual facies model when reading the dataset.But the facies model and global conditions match. Here is my code
from tensorflow import keras import tensorflow as tf import os import numpy as np import matplotlib.pyplot as plt
tfrecord_path = 'DataSets/TrainingData/TrainingData-1r06.tfrecords' # 分辨率最大64*64 wellfacies_path = 'DataSets/TrainingData/TrainingData-3wellfacies.tfrecords' label_path = 'DataSets/TrainingData/TrainingData-4rxx.labels'
labels = np.load(label_path) label_type = [1,2,3]
def load_labels(label):
# return labels[label_type]
return tf.gather(label,label_type)
def parse_function(record): feature_description = { 'shape': tf.io.FixedLenFeature([3], tf.int64), 'data': tf.io.FixedLenFeature([], tf.string), } features = tf.io.parse_single_example(record, feature_description)
# 获取'shape'特征并转换为NumPy数组
# shape_array = np.array(features['shape'])
# print("Shape of 'shape' feature:", shape_array)
data = tf.io.decode_raw(features['data'], tf.uint8)
data = tf.reshape(data, features['shape'])
data = tf.transpose(data, perm=[1,2,0])
return data
img64_dataset = tf.data.TFRecordDataset(tfrecord_path).map(parse_function) wellfacies_dataset = tf.data.TFRecordDataset(wellfacies_path).map(parse_function) label_dataset = tf.data.Dataset.from_tensor_slices(labels).map(load_labels)
dataset = tf.data.Dataset.zip((img64_dataset, wellfacies_dataset, label_dataset))
def process_labels(labels):
# labels[:,0] = (labels[:,0]/2+0.5)*168-84
# 背景相比例
labels[0] = (labels[0]/2+0.5)*0.8037109375+0.167724609375
# 河道宽度
labels[1] = (labels[1]/2+0.5)*0.8+2.7
# amplitud/wavelength
labels[2] = (labels[2]/2+0.5)*0.4866197183098592+0.06338028169014084
return labels
num_columns = 2 # 设置子图的列数 fig, axes = plt.subplots(2, num_columns, figsize=(10, 10)) # 创建子图
for i, (image, wellfacie, label) in enumerate(dataset.take(num_columns)): label = label.numpy()
label = process_labels(label)
print(f"Image shape: {image.shape}, Label: {label}")
# 在子图中显示图像
axes[0,i].imshow(image.numpy())
axes[0,i].axis('on') # 可以选择是否显示坐标轴
axes[1,i].imshow(wellfacie.numpy())
axes[1,i].axis('on')
fig.tight_layout() plt.show()
Here's the output graph output.png (view on web)
Almost the eighth row of the second chart does not have a river, but it does show a river. May I ask if there is something I am doing incorrectly
— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you are subscribed to this thread.Message ID: @.***>
Following the last reply:
In our latest version, we add a small random noise into the probability map, and the well facies data are directly sampled from the ground truth facies map.
Suihong Song | |
---|---|
@. | ---- Replied Message ---- | From | @.> | | Date | 03/14/2024 00:53 | | To | SuihongSong/GeoModeling_GANSim-2D_Condition_to_Well_Facies_and_Global_Features @.> | | Cc | Subscribed @.> | | Subject | [SuihongSong/GeoModeling_GANSim-2D_Condition_to_Well_Facies_and_Global_Features] Well facies data does not match the actual facies model when reading the dataset (Issue #2) |
tensorflow2.1 python 3.8
Well facies data does not match the actual facies model when reading the dataset.But the facies model and global conditions match. Here is my code
from tensorflow import keras import tensorflow as tf import os import numpy as np import matplotlib.pyplot as plt
tfrecord_path = 'DataSets/TrainingData/TrainingData-1r06.tfrecords' # 分辨率最大64*64 wellfacies_path = 'DataSets/TrainingData/TrainingData-3wellfacies.tfrecords' label_path = 'DataSets/TrainingData/TrainingData-4rxx.labels'
labels = np.load(label_path) label_type = [1,2,3]
def load_labels(label):
# return labels[label_type]
return tf.gather(label,label_type)
def parse_function(record): feature_description = { 'shape': tf.io.FixedLenFeature([3], tf.int64), 'data': tf.io.FixedLenFeature([], tf.string), } features = tf.io.parse_single_example(record, feature_description)
# 获取'shape'特征并转换为NumPy数组
# shape_array = np.array(features['shape'])
# print("Shape of 'shape' feature:", shape_array)
data = tf.io.decode_raw(features['data'], tf.uint8)
data = tf.reshape(data, features['shape'])
data = tf.transpose(data, perm=[1,2,0])
return data
img64_dataset = tf.data.TFRecordDataset(tfrecord_path).map(parse_function) wellfacies_dataset = tf.data.TFRecordDataset(wellfacies_path).map(parse_function) label_dataset = tf.data.Dataset.from_tensor_slices(labels).map(load_labels)
dataset = tf.data.Dataset.zip((img64_dataset, wellfacies_dataset, label_dataset))
def process_labels(labels):
# labels[:,0] = (labels[:,0]/2+0.5)*168-84
# 背景相比例
labels[0] = (labels[0]/2+0.5)*0.8037109375+0.167724609375
# 河道宽度
labels[1] = (labels[1]/2+0.5)*0.8+2.7
# amplitud/wavelength
labels[2] = (labels[2]/2+0.5)*0.4866197183098592+0.06338028169014084
return labels
num_columns = 2 # 设置子图的列数 fig, axes = plt.subplots(2, num_columns, figsize=(10, 10)) # 创建子图
for i, (image, wellfacie, label) in enumerate(dataset.take(num_columns)): label = label.numpy()
label = process_labels(label)
print(f"Image shape: {image.shape}, Label: {label}")
# 在子图中显示图像
axes[0,i].imshow(image.numpy())
axes[0,i].axis('on') # 可以选择是否显示坐标轴
axes[1,i].imshow(wellfacie.numpy())
axes[1,i].axis('on')
fig.tight_layout() plt.show()
Here's the output graph output.png (view on web)
Almost the eighth row of the second chart does not have a river, but it does show a river. May I ask if there is something I am doing incorrectly
— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you are subscribed to this thread.Message ID: @.***>
Hi, I'm very sorry to bother you again, I didn't find the new version you mentioned. If you can, could you please give me a download link? Appreciate it!
Hi Siyu, Yes, I can share you. download from the following google drive link: https://drive.google.com/file/d/1Fqdz4Vavrb4_qEzWtPnd9FV9VEFdLJ6r/view?usp=sharing
Thanks, Suihong
tensorflow2.1 python 3.8
Well facies data does not match the actual facies model when reading the dataset.But the facies model and global conditions match. Here is my code
Here's the output graph
Almost the eighth row of the second chart does not have a river, but it does show a river. May I ask if there is something I am doing incorrectly