          # Manual tool does not know the final hash so default to None
          self.hash = alignment.get("hash", None)
          if image is not None and image.any():
              self._image_to_face(image)
          logger.trace("Created from alignment: (x: %s, w: %s, y: %s. h: %s, "
                       "landmarks: %s)",
                       self.x, self.w, self.y, self.h, self.landmarks_xy)
 
</s> remove     def __init__(self, image=None, x=None, w=None, y=None, h=None, landmarks_xy=None):
        logger.trace("Initializing %s: (image: %s, x: %s, w: %s, y: %s, h:%s, landmarks_xy: %s)",
 </s> add     def __init__(self, image=None, x=None, w=None, y=None, h=None,
                 landmarks_xy=None, filename=None):
        logger.trace("Initializing %s: (image: %s, x: %s, w: %s, y: %s, h:%s, "
                     "landmarks_xy: %s, filename: %s)", </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             self.aligned["padding"] = padding
 </s> add             self.aligned["padding"] = self._padding_from_coverage(size, coverage_ratio) </s> remove     def __init__(self, detector, aligner,
                 configfile=None, multiprocess=False, rotate_images=None, min_size=20,
                 normalize_method=None):
        logger.debug("Initializing %s: (detector: %s, aligner: %s, configfile: %s, "
                     "multiprocess: %s, rotate_images: %s, min_size: %s, "
                     "normalize_method: %s)", self.__class__.__name__, detector, aligner,
                     configfile, multiprocess, rotate_images, min_size, normalize_method)
 </s> add     def __init__(self, detector, aligner, masker, configfile=None,
                 multiprocess=False, rotate_images=None, min_size=20,
                 normalize_method=None, input_size=256, output_size=256, coverage_ratio=1.):
        logger.debug("Initializing %s: (detector: %s, aligner: %s, masker: %s, "
                     "configfile: %s, multiprocess: %s, rotate_images: %s, min_size: %s, "
                     "normalize_method: %s, input_size: %s, output_size: %s, coverage_ratio: %s)",
                     self.__class__.__name__, detector, aligner, masker, configfile,
                     multiprocess, rotate_images, min_size, normalize_method, input_size,
                     output_size, coverage_ratio)
            self.image = image
          # Manual tool does not know the final hash so default to None
          self.hash = alignment.get("hash", None)
          if image is not None and image.any():
            self.image = image
              self._image_to_face(image)
          logger.trace("Created from alignment: (x: %s, w: %s, y: %s. h: %s, "
                       "landmarks: %s)",
                       self.x, self.w, self.y, self.h, self.landmarks_xy)
keep keep add keep keep keep keep
 Smart Mask Exposure for Extraction & Training (#831)

Smart Masks - Initial Commit 
lib/faces_detect.py