              The background saver for saving the image
          faces: dict
              The output dictionary from :class:`plugins.extract.Pipeline.Extractor`
          """
          logger.debug("Save Faces: Start")
          final_faces = list()
          filename, extension = os.path.splitext(os.path.basename(faces["filename"]))
          for idx, face in enumerate(faces["detected_faces"]):
              output_filename = "{}_{}{}".format(filename, str(idx), extension)
              face.hash, image = encode_image_with_hash(face.aligned_face, extension)
 
</s> remove class BlurryFaceFilter(PostProcessAction):  # pylint: disable=too-few-public-methods
    """ Move blurry faces to a different folder
        Extract Only """
    def __init__(self, *args, **kwargs):
        super().__init__(*args, **kwargs)
        self.blur_thresh = kwargs["blur_thresh"]
        logger.debug("Initialized %s", self.__class__.__name__)

    def process(self, output_item):
        """ Detect and move blurry face """
        extractor = AlignerExtract()

        for idx, detected_face in enumerate(output_item["detected_faces"]):
            frame_name = detected_face["file_location"].parts[-1]
            face = detected_face.aligned_face
            logger.trace("Checking for blurriness. Frame: '%s', Face: %s", frame_name, idx)
            aligned_landmarks = face.aligned_landmarks
            resized_face = face.aligned_face
            size = face.aligned["size"]
            padding = int(size * 0.1875)
            feature_mask = extractor.get_feature_mask(
                aligned_landmarks / size,
                size, padding)
            feature_mask = cv2.blur(feature_mask, (10, 10))
            isolated_face = cv2.multiply(feature_mask, resized_face.astype(float)).astype(np.uint8)
            blurry, focus_measure = self.is_blurry(isolated_face)

            if blurry:
                blur_folder = detected_face["file_location"].parts[:-1]
                blur_folder = get_folder(Path(*blur_folder) / Path("blurry"))
                detected_face["file_location"] = blur_folder / Path(frame_name)
                logger.verbose("%s's focus measure of %s was below the blur threshold, "
                               "moving to 'blurry'", frame_name, "{0:.2f}".format(focus_measure))

    def is_blurry(self, image):
        """ Convert to grayscale, and compute the focus measure of the image using the
            Variance of Laplacian method """
        gray = cv2.cvtColor(image, cv2.COLOR_BGR2GRAY)
        focus_measure = self.variance_of_laplacian(gray)

        # if the focus measure is less than the supplied threshold,
        # then the image should be considered "blurry"
        retval = (focus_measure < self.blur_thresh, focus_measure)
        logger.trace("Returning: (is_blurry: %s, focus_measure %s)", retval[0], retval[1])
        return retval

    @staticmethod
    def variance_of_laplacian(image):
        """ Compute the Laplacian of the image and then return the focus
            measure, which is simply the variance of the Laplacian """
        retval = cv2.Laplacian(image, cv2.CV_64F).var()
        logger.trace("Returning: %s", retval)
        return retval


 </s> add  </s> remove         for idx, detected_face in enumerate(output_item["detected_faces"]):
            face = detected_face.aligned_face
            logger.trace("Drawing Landmarks. Frame: '%s'. Face: %s",
                         detected_face["file_location"].parts[-1], idx)
 </s> add         frame = os.path.splitext(os.path.basename(output_item["filename"]))[0]
        for idx, face in enumerate(output_item["detected_faces"]):
            logger.trace("Drawing Landmarks. Frame: '%s'. Face: %s", frame, idx) </s> remove         # Blurry Face
        if hasattr(self.args, 'blur_thresh') and self.args.blur_thresh:
            kwargs = {"blur_thresh": self.args.blur_thresh}
            postprocess_items["BlurryFaceFilter"] = {"kwargs": kwargs}

 </s> add  </s> remove from lib.utils import (camel_case_split, get_folder, get_image_paths, set_system_verbosity,
                       _video_extensions)
 </s> add from lib.utils import (camel_case_split, get_image_paths, set_system_verbosity, _video_extensions) </s> remove         argument_list.append({
            "opts": ("-bt", "--blur-threshold"),
            "type": float,
            "action": Slider,
            "min_max": (0.0, 100.0),
            "rounding": 1,
            "dest": "blur_thresh",
            "default": 0.0,
            "group": "Face Processing",
            "help": "Automatically discard images blurrier than the specified threshold. "
                    "Discarded images are moved into a \"blurry\" sub-folder. Lower values allow "
                    "more blur. Set to 0.0 to turn off."})
 </s> add 
        logger.trace("Outputting faces for %s", faces["filename"])
              The background saver for saving the image
          faces: dict
              The output dictionary from :class:`plugins.extract.Pipeline.Extractor`
          """
        logger.trace("Outputting faces for %s", faces["filename"])
          final_faces = list()
          filename, extension = os.path.splitext(os.path.basename(faces["filename"]))
          for idx, face in enumerate(faces["detected_faces"]):
              output_filename = "{}_{}{}".format(filename, str(idx), extension)
              face.hash, image = encode_image_with_hash(face.aligned_face, extension)
keep keep keep keep replace keep keep keep keep keep
 scripts.fsmedia - remove blurry face filter. Fix debug landmarks 
scripts/extract.py