title: OpenCV(4.1.0) error: (-215:Assertion failed)
body: <p>I am following this tutorial series: <a href="https://www.youtube.com/watch?v=A4K6D_gx2Iw&amp;list=PLQVvvaa0QuDfhTox0AjmQ6tvTgMBZBEXN&amp;index=6" rel="noreferrer">https://www.youtube.com/watch?v=A4K6D_gx2Iw&amp;list=PLQVvvaa0QuDfhTox0AjmQ6tvTgMBZBEXN&amp;index=6</a></p>
  
  <p>When I try to use the model outside the program by prediction it gives me the following error:
  error: OpenCV(4.1.0) /Users/travis/build/skvark/opencv-python/opencv/modules/imgproc/src/resize.cpp:3718: error: (-215:Assertion failed) !ssize.empty() in function 'resize'</p>
  
  <p>Below the code when loading the model:</p>
  
  <pre><code>import cv2
  import tensorflow as tf
  
  CATEGORIES = ["Dog", "Cat"]
      import cv2
  import tensorflow as tf
  
  CATEGORIES = ["Dog", "Cat"]
  
  def prepare(filepath):
      IMG_SIZE = 50
      img_array = cv2.imread(filepath, cv2.IMREAD_GRAYSCALE)
      #return img_array.reshape(-1, IMG_SIZE, IMG_SIZE, 1)
  
      new_array = cv2.resize(img_array, (IMG_SIZE, IMG_SIZE))
      return new_array.reshape(-1, IMG_SIZE, IMG_SIZE, 1)
  #
  model = tf.keras.models.load_model('iyad')
  #
  predication = model.predict([prepare("Dog.jpg")])
  
  print(predication)
  </code></pre>