  
      def _image_to_face(self, image):
          """ set self.image to be the cropped face from detected bounding box """
          logger.trace("Cropping face from image")
          self.image = image[self.top: self.bottom,
                             self.left: self.right]
  
      # <<< Aligned Face methods and properties >>> #
      def load_aligned(self, image, size=256, dtype=None):
          """ Align a face from a given image.
 
</s> remove     def load_aligned(self, image, size=256, dtype=None):
 </s> add     def load_aligned(self, image, size=256, coverage_ratio=1.0, dtype=None): </s> remove         adjusted_ratio = coverage_ratio - (1 - self._extract_ratio)
        padding = round((size * adjusted_ratio) / 2)
 </s> add         padding = int((size * (coverage_ratio - 0.625)) / 2) </s> remove         face = np.expand_dims(face - self.average_img, axis=0)
 </s> add         face = face[None, :, :, :3] - self.average_img </s> remove     def _extract_ratio(self):
        """ float: The ratio of padding to add for training images """
        return 0.375
 </s> add     def training_coverage(self):
        """ The coverage ratio to add for training images """
        return 1.0 </s> remove         blob = cv2.dnn.blobFromImage(face,  # pylint: disable=no-member
 </s> add         blob = cv2.dnn.blobFromImage(face[..., :3],  # pylint: disable=no-member
        self.face = image[self.top: self.bottom,
  
      def _image_to_face(self, image):
          """ set self.image to be the cropped face from detected bounding box """
          logger.trace("Cropping face from image")
        self.face = image[self.top: self.bottom,
                             self.left: self.right]
  
      # <<< Aligned Face methods and properties >>> #
      def load_aligned(self, image, size=256, dtype=None):
          """ Align a face from a given image.
keep keep keep keep replace keep keep keep keep keep
 Smart Mask Exposure for Extraction & Training (#831)

Smart Masks - Initial Commit 
lib/faces_detect.py