Skip to content
Snippets Groups Projects
Commit bcdb8f8b authored by tomrink's avatar tomrink
Browse files

snapshot...

parent 7fdeea93
No related branches found
No related tags found
No related merge requests found
...@@ -197,11 +197,12 @@ class OpdNpyDataset: ...@@ -197,11 +197,12 @@ class OpdNpyDataset:
hr_image = tf.image.crop_to_bounding_box(hr_image, 0, 0, self.hr_size, self.hr_size) hr_image = tf.image.crop_to_bounding_box(hr_image, 0, 0, self.hr_size, self.hr_size)
low_resolution = tf.image.resize(hr_image, [self.lr_size, self.lr_size], method='bicubic') low_resolution = tf.image.resize(hr_image, [self.lr_size, self.lr_size], method='bicubic')
low_resolution = tf.math.multiply(low_resolution, 255.0) # low_resolution = tf.math.multiply(low_resolution, 255.0)
low_resolution = tf.clip_by_value(low_resolution, 0, 255) low_resolution = tf.clip_by_value(low_resolution, 0, 1)
hr_image = tf.math.multiply(hr_image[:, :, :, 1], 255.0) # hr_image = tf.math.multiply(hr_image[:, :, :, 1], 255.0)
high_resolution = tf.clip_by_value(hr_image, 0, 255) hr_image = hr_image[:, :, :, 1]
high_resolution = tf.clip_by_value(hr_image, 0, 1)
high_resolution = tf.expand_dims(high_resolution, axis=3) high_resolution = tf.expand_dims(high_resolution, axis=3)
low_resolution, high_resolution = augment_image()(low_resolution, high_resolution) low_resolution, high_resolution = augment_image()(low_resolution, high_resolution)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment