simayhosmeyve commited on
Commit
3c58be5
1 Parent(s): e8da5f2

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -182,12 +182,13 @@ def result(Input,Choice,Step):
182
  size0 = Input.shape[0]
183
  size1 = Input.shape[1]
184
  Input = cv2.resize(Input, (256,256), interpolation = cv2.INTER_AREA)
 
185
  Input = np.array(Input).reshape(1,256,256,3)
186
  prediction = pre_trained2(Input,training=True)
187
  Input = prediction[0]
188
  Input = (Input+1)*127.5
189
  Input = np.uint8(Input)
190
- #Input = cv2.resize(Input, (size1,size0))
191
  Psnr = 50
192
  return Input, Psnr
193
 
 
182
  size0 = Input.shape[0]
183
  size1 = Input.shape[1]
184
  Input = cv2.resize(Input, (256,256), interpolation = cv2.INTER_AREA)
185
+ Input = cv2.cvtColor(Input , cv2.COLOR_BGR2GRAY)
186
  Input = np.array(Input).reshape(1,256,256,3)
187
  prediction = pre_trained2(Input,training=True)
188
  Input = prediction[0]
189
  Input = (Input+1)*127.5
190
  Input = np.uint8(Input)
191
+ Input = cv2.resize(Input, (size1,size0), interpolation = cv2.INTER_AREA)
192
  Psnr = 50
193
  return Input, Psnr
194