mirror of
https://github.com/sbrl/research-rainfallradar
synced 2024-11-04 17:13:02 +00:00
dlr dsm: clash
This commit is contained in:
parent
f7672db599
commit
b2a5acaf4e
2 changed files with 3 additions and 3 deletions
|
@ -58,7 +58,7 @@ dataset_train, dataset_validate = dataset_mono(
|
||||||
output_size=IMAGE_SIZE,
|
output_size=IMAGE_SIZE,
|
||||||
input_size="same",
|
input_size="same",
|
||||||
filepath_heightmap=PATH_HEIGHTMAP,
|
filepath_heightmap=PATH_HEIGHTMAP,
|
||||||
remove_isolated_pixels=REMOVE_ISOLATED_PIXELS
|
do_remove_isolated_pixels=REMOVE_ISOLATED_PIXELS
|
||||||
)
|
)
|
||||||
|
|
||||||
logger.info("Train Dataset:", dataset_train)
|
logger.info("Train Dataset:", dataset_train)
|
||||||
|
|
|
@ -15,7 +15,7 @@ from .primitives.remove_isolated_pixels import remove_isolated_pixels
|
||||||
|
|
||||||
|
|
||||||
# TO PARSE:
|
# TO PARSE:
|
||||||
def parse_item(metadata, output_size=100, input_size="same", water_threshold=0.1, water_bins=2, heightmap=None, rainfall_scale_up=1, remove_isolated_pixels=True):
|
def parse_item(metadata, output_size=100, input_size="same", water_threshold=0.1, water_bins=2, heightmap=None, rainfall_scale_up=1, do_remove_isolated_pixels=True):
|
||||||
if input_size == "same":
|
if input_size == "same":
|
||||||
input_size = output_size # This is almost always the case with e.g. the DeepLabV3+ model
|
input_size = output_size # This is almost always the case with e.g. the DeepLabV3+ model
|
||||||
|
|
||||||
|
@ -96,7 +96,7 @@ def parse_item(metadata, output_size=100, input_size="same", water_threshold=0.1
|
||||||
# water = tf.one_hot(water, water_bins, axis=-1, dtype=tf.int32)
|
# water = tf.one_hot(water, water_bins, axis=-1, dtype=tf.int32)
|
||||||
# SPARSE [LOSS dice]
|
# SPARSE [LOSS dice]
|
||||||
water = tf.cast(tf.math.greater_equal(water, water_threshold), dtype=tf.float32)
|
water = tf.cast(tf.math.greater_equal(water, water_threshold), dtype=tf.float32)
|
||||||
if remove_isolated_pixels:
|
if do_remove_isolated_pixels:
|
||||||
water = remove_isolated_pixels(water)
|
water = remove_isolated_pixels(water)
|
||||||
|
|
||||||
print("DEBUG DATASET_OUT:rainfall shape", rainfall.shape)
|
print("DEBUG DATASET_OUT:rainfall shape", rainfall.shape)
|
||||||
|
|
Loading…
Reference in a new issue