Danh Tran commited on
Commit
7e30644
·
verified ·
1 Parent(s): bdedf77

Update predict_model.py

Browse files
Files changed (1) hide show
  1. predict_model.py +1 -1
predict_model.py CHANGED
@@ -8,7 +8,7 @@ def run(in_image):
8
  model = tf.keras.models.load_model('autoencoder-gray2color.keras')
9
  #in_image = cv2.imread(im_path)
10
  height, width, channels = in_image.shape
11
- in_image = cv2.cvtColor(in_image, cv2.COLOR_BGR2GRAY)
12
  in_image = cv2.resize(in_image, (160, 160))
13
  in_image = in_image.astype('float32') / 255.0
14
  predicted = np.clip(model.predict(in_image.reshape(1,160, 160,3)),0.0,1.0).reshape(160, 160,3)
 
8
  model = tf.keras.models.load_model('autoencoder-gray2color.keras')
9
  #in_image = cv2.imread(im_path)
10
  height, width, channels = in_image.shape
11
+ # in_image = cv2.cvtColor(in_image, cv2.COLOR_BGR2GRAY)
12
  in_image = cv2.resize(in_image, (160, 160))
13
  in_image = in_image.astype('float32') / 255.0
14
  predicted = np.clip(model.predict(in_image.reshape(1,160, 160,3)),0.0,1.0).reshape(160, 160,3)