title: display unet predicted image using cv2
body: <p>I have trained a model using images and masks, and predicted one single image.
  The shape of the images im predicting is <code>(1024,1024,3)</code></p>
  
  <p>Code.</p>
  
  <pre><code>nueva_imagen = cv2.imread("../input/dataset/Training_dataset/Images/all_imgs/zanzibar_4_35_04.jpg")
  print(nueva_imagen.shape)
  nueva_imagen = cv2.resize(nueva_imagen,(256,256))
  nueva_imagen = np.expand_dims(nueva_imagen,axis=0)
  print(nueva_imagen.shape)
  pred_img = model.predict(nueva_imagen)
  print(pred_img.shape)
  #pred_img = np.squeeze(pred_img,axis=0)
  #print(pred_img.shape)
  </code></pre>
  
  <p>The reason why I add another dimension its because my model only takes images with 3 dimension.
  At the end my predicted image shape is <code>(1,256,256,1)</code>
  Now reading cv2 docs i cant show images with 4 dimension so here is what i have done.</p>
  
  <pre><code>image_to_predict = _images[789]
  mask_of_image = masks_arr[789]
  
  
  
  pred_img = np.squeeze(pred_img,axis=0)
  pred_img = np.squeeze(pred_img,axis=2)
  
  
  
  fig = plt.figure()
  fig.subplots_adjust(hspace=0.4, wspace=0.4)
  ax = fig.add_subplot(1, 2, 1);plt.title("original image")
  ax.imshow(image_to_predict)
  
  #ax = fig.add_subplot(1, 2, 2);plt.title("mask")
  #ax.imshow(mask_of_image)
  
  ax = fig.add_subplot(1,2,2);plt.title("Predicted image")
  ax.imshow(pred_img)
  </code></pre>
  
  <p>i removed dimensions on axis 0 and 3 to show the image but what i get its a purple image.
  Is that the predicted image or I am doing something wrong?</p>