      logger.trace("Requested image: '%s'", filename)
      success = True
      image = None
      try:
          image = cv2.imread(filename)
          if image is None:
              raise ValueError
      except TypeError:
          success = False
          msg = "Error while reading image (TypeError): '{}'".format(filename)
 
</s> remove             self.aligned["padding"] = padding
 </s> add             self.aligned["padding"] = self._padding_from_coverage(size, coverage_ratio) </s> remove                      x, w, y, h, landmarks_xy)
 </s> add                      x, w, y, h, landmarks_xy, filename) </s> remove             padding = int(size * self._extract_ratio) // 2
 </s> add  </s> remove                     "image": image}
 </s> add                     "image": image[..., :3]} </s> remove         self.state.config["mask_type"] = None
 </s> add         self.state.config["replicate_input_mask"] = False
        image = cv2.imread(filename, cv2.IMREAD_UNCHANGED)
      logger.trace("Requested image: '%s'", filename)
      success = True
      image = None
      try:
        image = cv2.imread(filename, cv2.IMREAD_UNCHANGED)
          if image is None:
              raise ValueError
      except TypeError:
          success = False
          msg = "Error while reading image (TypeError): '{}'".format(filename)
keep keep keep keep replace keep keep keep keep keep
 Smart Mask Exposure for Extraction & Training (#831)

Smart Masks - Initial Commit 
lib/image.py