mirror of
https://github.com/sbrl/research-rainfallradar
synced 2024-11-16 14:43:01 +00:00
debug 2
This commit is contained in:
parent
bf2f6e9b64
commit
a7a475dcd1
2 changed files with 3 additions and 0 deletions
|
@ -22,6 +22,7 @@ def model_rainfallwater_mono(metadata, shape_water_out, model_arch_enc="convnext
|
||||||
"""
|
"""
|
||||||
rainfall_channels, rainfall_width, rainfall_height = metadata["rainfallradar"] # shape = [channels, width, height]
|
rainfall_channels, rainfall_width, rainfall_height = metadata["rainfallradar"] # shape = [channels, width, height]
|
||||||
|
|
||||||
|
print("RAINFALL channels", rainfall_channels, "width", rainfall_width, "height", rainfall_height)
|
||||||
out_water_width, out_water_height = shape_water_out
|
out_water_width, out_water_height = shape_water_out
|
||||||
|
|
||||||
layer_input = tf.keras.layers.Input(
|
layer_input = tf.keras.layers.Input(
|
||||||
|
|
|
@ -19,6 +19,8 @@ def parse_item(metadata, shape_water_desired=[100,100], water_threshold=0.1, wat
|
||||||
water_width_target, water_height_target = shape_water_desired
|
water_width_target, water_height_target = shape_water_desired
|
||||||
water_offset_x = math.ceil((water_width_source - water_width_target) / 2)
|
water_offset_x = math.ceil((water_width_source - water_width_target) / 2)
|
||||||
water_offset_y = math.ceil((water_height_source - water_height_target) / 2)
|
water_offset_y = math.ceil((water_height_source - water_height_target) / 2)
|
||||||
|
|
||||||
|
rainfall_channels, rainfall_width, rainfall_height = metadata["rainfallradar"]
|
||||||
def parse_item_inner(item):
|
def parse_item_inner(item):
|
||||||
parsed = tf.io.parse_single_example(item, features={
|
parsed = tf.io.parse_single_example(item, features={
|
||||||
"rainfallradar": tf.io.FixedLenFeature([], tf.string),
|
"rainfallradar": tf.io.FixedLenFeature([], tf.string),
|
||||||
|
|
Loading…
Reference in a new issue