                  resized_face.astype(float)).astype(np.uint8)
              blurry, focus_measure = is_blurry(isolated_face, self.blur_thresh)
  
              if blurry:
                  blur_folder = output_item["output_file"].parts[:-1]
                  blur_folder = get_folder(Path(*blur_folder) / Path("blurry"))
                  frame_name = output_item["output_file"].parts[-1]
                  output_item["output_file"] = blur_folder / Path(frame_name)
                  if self.verbose:
                      print("{}'s focus measure of {} was below the blur "
 
</s> remove             blurry, focus_measure = is_blurry(isolated_face, self.blur_thresh)
 </s> add             blurry, focus_measure = self.is_blurry(isolated_face) </s> remove                 frame_name = output_item["output_file"].parts[-1]
                output_item["output_file"] = blur_folder / Path(frame_name)
                if self.verbose:
                    print("{}'s focus measure of {} was below the blur "
                          "threshold, moving to \"blurry\"".format(
                              frame_name, focus_measure))
 </s> add                 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)  # pylint: disable=no-member
        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()  # pylint: disable=no-member
        logger.trace("Returning: %s", retval)
        return retval </s> remove             print("face {} for frame {} was deleted, skipping".format(
                face_idx, os.path.basename(filename)))
 </s> add             logger.info("face %s for frame '%s' was deleted, skipping",
                        face_idx, os.path.basename(filename)) </s> remove                 alloc = int(sess.run(tf.contrib.memory_stats.BytesLimit()) /
                            (1024 * 1024))
 </s> add  </s> remove                 if self.verbose:
                    print("Skipping {} - Alignments "
                          "not found".format(frame_name))
 </s> add                 logger.verbose("Skipping '%s' - Alignments not found", frame_name)
                blur_folder = detected_face["file_location"].parts[:-1]
                  resized_face.astype(float)).astype(np.uint8)
              blurry, focus_measure = is_blurry(isolated_face, self.blur_thresh)
  
              if blurry:
                blur_folder = detected_face["file_location"].parts[:-1]
                  blur_folder = get_folder(Path(*blur_folder) / Path("blurry"))
                  frame_name = output_item["output_file"].parts[-1]
                  output_item["output_file"] = blur_folder / Path(frame_name)
                  if self.verbose:
                      print("{}'s focus measure of {} was below the blur "
keep keep keep keep replace keep keep keep keep keep
 Logging (#541)

* Convert prints to logger. Further logging improvements. Tidy  up

* Fix system verbosity. Allow SystemExit

* Fix reload extract bug

* Child Traceback handling

* Safer shutdown procedure

* Add shutdown event to queue manager

* landmarks_as_xy > property. GUI notes + linting. Aligner bugfix

* fix FaceFilter. Enable nFilter when no Filter is supplied

* Fix blurry face filter

* Continue on IO error. Better error handling

* Explicitly print stack trace tocrash log

* Windows Multiprocessing bugfix

* Add git info and conda version to crash log

* Windows/Anaconda mp bugfix

* Logging fixes for training 
scripts/fsmedia.py