          else:
              self.detector = DLIB_DETECTORS
              kwargs["detector"] = detector
  
          self.detector.create_detector(**kwargs)
  
      def detect_faces(self, input_is_predetected_face):
          """ Detect faces """
          # Predetected_face is used for sort tool.
          # Landmarks should not be extracted again from predetected faces,
 
</s> remove     def detect_faces(self, images):
        """ Detect faces in images """
 </s> add     def detect_faces(self, image):
        """ Detect faces in rgb image """ </s> remove     def detect_faces(self, images):
        """ Detect faces in images """
 </s> add     def detect_faces(self, image):
        """ Detect faces in rgb image """ </s> remove     @staticmethod
    def compile_color_space(image_bgr):
        """ cv2 and numpy inputs differs in rgb-bgr order
        this affects chance of dlib face detection so
        pass both versions """
        image_rgb = image_bgr[:, :, ::-1].copy()
        return (image_rgb, image_bgr)
 </s> add     def scale_mtcnn(self):
        """ Set scaling for mtcnn """
        pixel_count = self.width * self.height
        if pixel_count > VRAM.scale_to:
            self.input_scale = (VRAM.scale_to / pixel_count)**0.5

    def scale_dlib(self):
        """ Set scaling for dlib

        DLIB is finickity, and pure pixel count won't help as when an
        initial portrait image goes in, rotating it to landscape sucks
        up VRAM for no discernible reason. This does not happen when the
        initial image is a landscape image.
        To mitigate this we need to make sure that all images fit within
        a square based on the pixel count
        There is also no way to set the acceptable size for a positive
        match, so all images should be scaled to the maximum possible
        to detect all available faces """

        max_length_scale = int(VRAM.scale_to ** 0.5)
        max_length_image = max(self.height, self.width)
        self.input_scale = max_length_scale / max_length_image
            scale_to = int(VRAM.scale_to ** 0.5)

            if self.verbose:
                print("Initializing DLib for frame size {}x{}".format(
                    str(scale_to), str(scale_to)))

            placeholder = np.zeros((scale_to, scale_to, 3), dtype=np.uint8)
            kwargs["placeholder"] = placeholder

          else:
              self.detector = DLIB_DETECTORS
              kwargs["detector"] = detector
  
            scale_to = int(VRAM.scale_to ** 0.5)

            if self.verbose:
                print("Initializing DLib for frame size {}x{}".format(
                    str(scale_to), str(scale_to)))

            placeholder = np.zeros((scale_to, scale_to, 3), dtype=np.uint8)
            kwargs["placeholder"] = placeholder

          self.detector.create_detector(**kwargs)
  
      def detect_faces(self, input_is_predetected_face):
          """ Detect faces """
          # Predetected_face is used for sort tool.
          # Landmarks should not be extracted again from predetected faces,
keep keep keep add keep keep keep keep keep keep
 DLib scaling amends (#461)

* Scaling area fix and rework of frames and bounding boxes

* Update DLib scaling and initialization 
lib/face_alignment/extractor.py