simayhosmeyve commited on
Commit
e96af51
1 Parent(s): ff8da23

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -3
app.py CHANGED
@@ -245,7 +245,7 @@ def upsample(filters, size, apply_dropout=False):
245
  return result
246
 
247
  def Generator(tpu=False):
248
- inputs = tf.keras.layers.Input(shape=[256, 256, 1])
249
 
250
  down_stack = [
251
  downsample(64, 4, apply_batchnorm=False), # (batch_size, 128, 128, 64)
@@ -327,7 +327,7 @@ def ssim_psnr(pre,target):
327
  def Discriminator():
328
  initializer = tf.random_normal_initializer(0., 0.02)
329
 
330
- inp = tf.keras.layers.Input(shape=[256, 256, 1], name='input_image') # lr
331
  tar = tf.keras.layers.Input(shape=[256, 256, 3], name='target_image') # hr
332
 
333
  x = tf.keras.layers.concatenate([inp, tar]) # (batch_size, 256, 256, channels*2)
@@ -464,7 +464,6 @@ def result(Input,Choice):
464
  size0 = Input.shape[0]
465
  size1 = Input.shape[1]
466
  Input = cv2.resize(Input, (256,256), interpolation = cv2.INTER_AREA)
467
- Input = cv2.cvtColor(Input , cv2.COLOR_BGR2GRAY)
468
  Input = np.array(Input).reshape(1,256,256,3)
469
  prediction = pre_trained_2(Input,training=True)
470
  Input = prediction[0]
 
245
  return result
246
 
247
  def Generator(tpu=False):
248
+ inputs = tf.keras.layers.Input(shape=[256, 256, 3])
249
 
250
  down_stack = [
251
  downsample(64, 4, apply_batchnorm=False), # (batch_size, 128, 128, 64)
 
327
  def Discriminator():
328
  initializer = tf.random_normal_initializer(0., 0.02)
329
 
330
+ inp = tf.keras.layers.Input(shape=[256, 256, 3], name='input_image') # lr
331
  tar = tf.keras.layers.Input(shape=[256, 256, 3], name='target_image') # hr
332
 
333
  x = tf.keras.layers.concatenate([inp, tar]) # (batch_size, 256, 256, channels*2)
 
464
  size0 = Input.shape[0]
465
  size1 = Input.shape[1]
466
  Input = cv2.resize(Input, (256,256), interpolation = cv2.INTER_AREA)
 
467
  Input = np.array(Input).reshape(1,256,256,3)
468
  prediction = pre_trained_2(Input,training=True)
469
  Input = prediction[0]