mirror of
https://github.com/sbrl/research-rainfallradar
synced 2024-11-26 02:43:02 +00:00
dataset_mono: debug
This commit is contained in:
parent
527b34942d
commit
ace4c8b246
1 changed files with 2 additions and 1 deletions
|
@ -46,11 +46,12 @@ def parse_item(metadata, shape_water_desired=[100,100], water_threshold=0.1, wat
|
||||||
rainfall = tf.transpose(rainfall, [2, 1, 0])
|
rainfall = tf.transpose(rainfall, [2, 1, 0])
|
||||||
|
|
||||||
# rainfall = tf.image.resize(rainfall, tf.cast(tf.constant(metadata["rainfallradar"]) / 2, dtype=tf.int32))
|
# rainfall = tf.image.resize(rainfall, tf.cast(tf.constant(metadata["rainfallradar"]) / 2, dtype=tf.int32))
|
||||||
|
|
||||||
water = tf.expand_dims(water, axis=-1) # [width, height] → [width, height, channels=1]
|
water = tf.expand_dims(water, axis=-1) # [width, height] → [width, height, channels=1]
|
||||||
water = tf.image.crop_to_bounding_box(water, water_offset_x, water_offset_y, water_width_target, water_height_target)
|
water = tf.image.crop_to_bounding_box(water, water_offset_x, water_offset_y, water_width_target, water_height_target)
|
||||||
|
|
||||||
|
print("DEBUG:dataset water BEFORE_SQUEEZE")
|
||||||
water = tf.squeeze(water)
|
water = tf.squeeze(water)
|
||||||
|
print("DEBUG:dataset water AFTER_SQUEEZE")
|
||||||
water = tf.cast(tf.math.greater_equal(water, water_threshold), dtype=tf.int32)
|
water = tf.cast(tf.math.greater_equal(water, water_threshold), dtype=tf.int32)
|
||||||
water = tf.one_hot(water, water_bins, axis=-1, dtype=tf.int32)
|
water = tf.one_hot(water, water_bins, axis=-1, dtype=tf.int32)
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue