This commit is contained in:
Starbeamrainbowlabs 2022-11-11 18:38:07 +00:00
parent bf2f6e9b64
commit a7a475dcd1
Signed by: sbrl
GPG key ID: 1BE5172E637709C2
2 changed files with 3 additions and 0 deletions

View file

@ -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(

View file

@ -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),