          if scale_up or target < source:
              self.scale = target / source
          else:
              self.scale = 1.0
  
      def set_detect_image(self, input_image):
          """ Convert the image to RGB and scale """
          # pylint: disable=no-member
 
</s> remove         if self.verbose and self.scale < 1.0:
            print("Resizing image from {}x{} to {}.".format(
                str(width), str(height), "x".join(str(i) for i in dims)))
 </s> add         if self.scale < 1.0:
            logger.verbose("Resizing image from %sx%s to %s.",
                           width, height, "x".join(str(i) for i in dims)) </s> remove             print("No source folder (-fr or -fc) was provided")
 </s> add             logger.error("No source folder (-fr or -fc) was provided") </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         # See lib.multithreading.QueueManager for getting queues
 </s> add         # See lib.queue_manager.QueueManager for getting queues </s> remove             yield filename, cv2.imread(filename)  # pylint: disable=no-member
 </s> add             logger.trace("Loading image: '%s'", filename)
            try:
                image = cv2.imread(filename)  # pylint: disable=no-member
            except Exception as err:  # pylint: disable=broad-except
                logger.error("Failed to load image '%s'. Original Error: %s", filename, err)
                continue
            yield filename, image
        logger.trace("Detector scale: %s", self.scale)
          if scale_up or target < source:
              self.scale = target / source
          else:
              self.scale = 1.0
        logger.trace("Detector scale: %s", self.scale)
  
      def set_detect_image(self, input_image):
          """ Convert the image to RGB and scale """
          # pylint: disable=no-member
keep keep keep add 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 
plugins/extract/detect/_base.py