                  self.keras.model.predict(image)[-1][0],
                  center,
                  scale)
  
          return [(int(pt[0] / self.input_scale),
                   int(pt[1] / self.input_scale))
                  for pt in pts_img]
  
  
  class Extract(object):
      """ Extracts faces from an image, crops and
          calculates landmarks """
 
</s> remove             landmarks.append((
                (int(self.bounding_box['left'] / self.input_scale),
                 int(self.bounding_box['top'] / self.input_scale),
                 int(self.bounding_box['right'] / self.input_scale),
                 int(self.bounding_box['bottom'] / self.input_scale)),
                landmarks_xy))
 </s> add             landmarks.append(((detected_face['left'],
                               detected_face['top'],
                               detected_face['right'],
                               detected_face['bottom']),
                              landmarks_xy)) </s> remove         for d_rect in self.detected_faces:
            self.get_bounding_box(d_rect)
            del d_rect
 </s> add         for detected_face in self.detected_faces: </s> remove         if pixel_count > self.scale_to:
            self.input_scale = self.scale_to / pixel_count
            dimensions = (int(self.width * self.input_scale),
                          int(self.height * self.input_scale))
            if self.verbose:
                print("Resizing image from {}x{} "
                      "to {}.".format(str(self.width), str(self.height),
                                      "x".join(str(i) for i in dimensions)))
            image = cv2.resize(image, dimensions, interpolation=cv2.INTER_AREA)
 </s> add         if detector == "mtcnn":
            self.scale_mtcnn()
        else:
            self.scale_dlib()

        if self.input_scale == 1.0:
            return image

        if self.input_scale > 1.0:
            interpolation = cv2.INTER_LINEAR
        else:
            interpolation = cv2.INTER_AREA

        dimensions = (int(self.width * self.input_scale),
                      int(self.height * self.input_scale))
        if self.verbose and self.input_scale < 1.0:
            print("Resizing image from {}x{} "
                  "to {}.".format(str(self.width), str(self.height),
                                  "x".join(str(i) for i in dimensions)))
        image = cv2.resize(image,
                           dimensions,
                           interpolation=interpolation).copy() </s> remove             self.frame,
 </s> add             self.image, </s> remove     def __init__(self, frame, detected_faces, keras_model, verbose):
 </s> add     def __init__(self, image, detected_faces, keras_model, verbose):
        return [(int(pt[0]), int(pt[1])) for pt in pts_img]
                  self.keras.model.predict(image)[-1][0],
                  center,
                  scale)
  
        return [(int(pt[0]), int(pt[1])) for pt in pts_img]
        return [(int(pt[0]), int(pt[1])) for pt in pts_img]
        return [(int(pt[0]), int(pt[1])) for pt in pts_img]
  
  
  class Extract(object):
      """ Extracts faces from an image, crops and
          calculates landmarks """
keep keep keep keep replace replace replace keep keep keep keep keep
 Merge staging to Master (#470)

* DLib scaling amends (#461)

* Scaling area fix and rework of frames and bounding boxes

* Update DLib scaling and initialization

* Extract - Detector reinitialization bugfix

* Slight OriginaHightRes Model re-factoring (#464)

* Model re-factoring, might fix red screen of death on multi-gpu configurations

* Limited trainer support for various INPUT_SIZE

* Auto Extraction multiprocess bugfix

* Sort tool bugfixes and linting 
lib/face_alignment/extractor.py