  
      @property
      def image_size(self):
          """ Get the training set image size for storing in model data """
          image = cv2.imread(self.images["a"][0])  # pylint: disable=no-member
          size = image.shape[0]
          logger.debug("Training image size: %s", size)
          return size
  
      @property
 
</s> remove         Estimate the amount of blur an image has
        with the variance of the Laplacian.
        Normalize by pixel number to offset the effect
        of image size on pixel gradients & variance
 </s> add         Estimate the amount of blur an image has with the variance of the Laplacian.
        Normalize by pixel number to offset the effect of image size on pixel gradients & variance </s> remove         image = cv2.imread(image_file)
 </s> add         image = cv2_read_img(image_file, raise_error=True) </s> remove             image = cv2.imread(src)  # pylint: disable=no-member
 </s> add             image = cv2_read_img(src, raise_error=True) </s> remove     img = cv2.imread(filename)  # pylint: disable=no-member
 </s> add     img = cv2_read_img(filename, raise_error=True) </s> remove             logger.trace("Loading image: '%s'", filename)
            try:
                image = cv2.imread(filename)  # pylint: disable=no-member
            except Exception as err:  # pylint: disable=broad-except
                logger.error("Failed to load image '%s'. Original Error: %s", filename, err)
 </s> add             image = cv2_read_img(filename, raise_error=False)
            if image is None:
        image = cv2_read_img(self.images["a"][0], raise_error=True)
  
      @property
      def image_size(self):
          """ Get the training set image size for storing in model data """
        image = cv2_read_img(self.images["a"][0], raise_error=True)
          size = image.shape[0]
          logger.debug("Training image size: %s", size)
          return size
  
      @property
keep keep keep keep replace keep keep keep keep keep
 Centralize cv2 image reading and handle bad filenames 
scripts/train.py