      exclude_names = [basename(Path(x).stem[:Path(x).stem.rfind('_')] +
                                Path(x).suffix) for x in exclude]
      dir_contents = list()
  
      if not exists(directory):
          directory = get_folder(directory)
  
      dir_scanned = sorted(os.scandir(directory), key=lambda x: x.name)
      for chkfile in dir_scanned:
          if any([chkfile.name.lower().endswith(ext)
 
</s> remove     exclude_names = [basename(Path(x).stem[:Path(x).stem.rfind('_')] +
                              Path(x).suffix) for x in exclude]
 </s> add     exclude_names = [os.path.basename(Path(x).stem[:Path(x).stem.rfind('_')] +
                                      Path(x).suffix) for x in exclude] </s> remove     def load_skip_alignments(self, alignfile, faces_detected):
        """ Load existing alignments if skipping existing images """
        if self.have_alignments_file:
            existing_alignments = self.read_alignments()
            for key, val in existing_alignments.items():
                if val:
                    faces_detected[key] = val
        else:
            print("Existing alignments file '{}' not found.".format(alignfile))
        return faces_detected
 </s> add         detected_faces = output_item["detected_faces"]
        ret_faces = list()
        for face in detected_faces:
            if not self.filter.check(face):
                if self.verbose:
                    print("Skipping not recognized face!")
                continue
            ret_faces.append(face)
        output_item["detected_faces"] = ret_faces </s> remove def __indent_text_block(text):
    a = text.splitlines()
    if len(a)>1:
        b = a[0] + "\r\n"
        for i in range(1, len(a)-1):
            b = b + "        " + a[i] + "\r\n"
        b = b +  "        " + a[-1]
        return b
    else:
        return text

def Term_Support_Color():
    global OS_Version
    return (OS_Version[0] == "Linux" or OS_Version[0] == "Darwin")

def INFO(text):
    t = "%sINFO   %s " % (color_green, color_default) if Term_Support_Color() else "INFO    "
    print(t + __indent_text_block(text))
 </s> add  </s> remove     bounding_box = [[face.x, face.y],
                    [face.x + face.w, face.y],
                    [face.x + face.w, face.y + face.h],
                    [face.x, face.y + face.h]]
    landmarks = face.landmarksXY
 </s> add 
    if not os.path.exists(directory):
      exclude_names = [basename(Path(x).stem[:Path(x).stem.rfind('_')] +
                                Path(x).suffix) for x in exclude]
      dir_contents = list()
  
    if not os.path.exists(directory):
          directory = get_folder(directory)
  
      dir_scanned = sorted(os.scandir(directory), key=lambda x: x.name)
      for chkfile in dir_scanned:
          if any([chkfile.name.lower().endswith(ext)
keep keep keep keep replace keep keep keep keep keep
 Extraction - Speed improvements (#522) (#523)

* Extraction - Speed improvements (#522)

* Initial Plugin restructure

* Detectors to plugins. Detector speed improvements

* Re-implement dlib aligner, remove models, FAN to TF. Parallel processing

* Update manual, update convert, implement parallel/serial switching

* linting + fix cuda check (setup.py). requirements update keras 2.2.4

* Add extract size option. Fix dlib hog init

* GUI: Increase tooltip width

* Update alignment tool to support new DetectedFace

* Add skip existing faces option

* Fix sort tool to new plugin structure

* remove old align plugin

* fix convert -skip faces bug

* Fix convert skipping no faces frames

* Convert - draw onto transparent layer

* Fix blur threshold bug

* fix skip_faces convert bug

* Fix training 
lib/utils.py