      def initialize_detector(self, detector, mtcnn_kwargs):
          """ Initialize face detector """
          kwargs = {"verbose": self.verbose}
          if detector == "mtcnn":
              self.detector = MTCNN_DETECTOR
              mtcnn_kwargs = self.detector.validate_kwargs(mtcnn_kwargs)
              kwargs["mtcnn_kwargs"] = mtcnn_kwargs
          else:
              self.detector = DLIB_DETECTORS
              kwargs["detector"] = detector
 
</s> remove             self.detector = DLIB_DETECTORS
 </s> add  </s> remove         if self.initialized:
            return
        self.initialize_vram(detector)
 </s> add         if not VRAM.initialized:
            self.initialize_vram(detector)

        if not self.keras.initialized:
            self.initialize_keras(detector)
            # VRAM Scaling factor must be set AFTER Keras has loaded
            VRAM.set_scale_to(detector)

        if detector == "mtcnn":
            self.detector = MTCNN_DETECTOR
        else:
            self.detector = DLIB_DETECTORS </s> remove         self.initialize_keras(detector)
        self.initialize_detector(detector, mtcnn_kwargs)
        self.initialized = True
 </s> add         if not self.detector.initialized:
            self.initialize_detector(detector, mtcnn_kwargs)
      def initialize_detector(self, detector, mtcnn_kwargs):
          """ Initialize face detector """
          kwargs = {"verbose": self.verbose}
          if detector == "mtcnn":

              mtcnn_kwargs = self.detector.validate_kwargs(mtcnn_kwargs)
              kwargs["mtcnn_kwargs"] = mtcnn_kwargs
          else:
              self.detector = DLIB_DETECTORS
              kwargs["detector"] = detector
keep keep keep keep 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