                                "filetypes": 'alignments',
                                "type": str,
                                "dest": "alignments_path",
                                "help": "Optional path to an alignments file."})
          argument_list.append({"opts": ("--serializer", ),
                                "type": str.lower,
                                "dest": "serializer",
                                "default": "json",
                                "choices": ("json", "pickle", "yaml"),
                                "help": "Serializer for alignments file. If "
                                        "yaml is chosen and not available, then "
                                        "json will be used as the default "
                                        "fallback."})
          argument_list.append({"opts": ("-D", "--detector"),
                                "type": str,
                                # case sensitive because this is used to load a
                                # plugin.
                                "choices": ("dlib-hog", "dlib-cnn",
                                            "dlib-all", "mtcnn"),
                                "default": "mtcnn",
                                "help": "R|Detector to use.\n'dlib-hog': uses "
                                        "least resources, but is the least\n\t"
                                        "reliable.\n'dlib-cnn': faster than "
                                        "mtcnn but detects fewer faces\n\tand "
                                        "fewer false positives.\n'dlib-all': "
                                        "attempts to find faces using "
                                        "dlib-cnn,\n\tif none are found, "
                                        "attempts to find faces\n\tusing "
                                        "dlib-hog.\n'mtcnn': slower than dlib, "
                                        "but uses fewer resources\n\twhilst "
                                        "detecting more faces and more false\n\t"
                                        "positives. Has superior alignment to "
                                        "dlib"})
          argument_list.append({"opts": ("-mtms", "--mtcnn-minsize"),
                                "type": int,
                                "dest": "mtcnn_minsize",
                                "default": 20,
                                "help": "The minimum size of a face to be "
                                        "accepted. Lower values use "
                                        "significantly more VRAM. Minimum "
                                        "value is 10. Default is 20 "
                                        "(MTCNN detector only)"})
          argument_list.append({"opts": ("-mtth", "--mtcnn-threshold"),
                                "nargs": "+",
                                "type": str,
                                "dest": "mtcnn_threshold",
                                "default": ["0.6", "0.7", "0.7"],
                                "help": "R|Three step threshold for face "
                                        "detection. Should be\nthree decimal "
                                        "numbers each less than 1. Eg:\n"
                                        "'--mtcnn-threshold 0.6 0.7 0.7'.\n"
                                        "1st stage: obtains face candidates.\n"
                                        "2nd stage: refinement of face "
                                        "candidates.\n3rd stage: further "
                                        "refinement of face candidates.\n"
                                        "Default is 0.6 0.7 0.7 "
                                        "(MTCNN detector only)"})
          argument_list.append({"opts": ("-mtsc", "--mtcnn-scalefactor"),
                                "type": float,
                                "dest": "mtcnn_scalefactor",
                                "default": 0.709,
                                "help": "The scale factor for the image "
                                        "pyramid. Should be a decimal number "
                                        "less than one. Default is 0.709 "
                                        "(MTCNN detector only)"})
          argument_list.append({"opts": ("-dbf", "--dlib-buffer"),
                                "type": int,
                                "dest": "dlib_buffer",
                                "default": 64,
                                "help": "This should only be increased if you "
                                        "are having issues extracting with "
                                        "DLib-cnn. The calculation of RAM "
                                        "required is approximate, so some RAM "
                                        " is held back in reserve (64MB by "
                                        "default). If this is not enough "
                                        "increase this figure by providing an "
                                        "integer representing the amount of "
                                        "megabytes to reserve. (DLIB-CNN "
                                        "Only)"})
          argument_list.append({"opts": ("-l", "--ref_threshold"),
                                "type": float,
                                "dest": "ref_threshold",
                                "default": 0.6,
                                "help": "Threshold for positive face "
 
</s> remove                               "help": "Run extraction on all available "
                                      "cores. (CPU only)"})
 </s> add                               "help": "Run extraction in parallel. Offers "
                                      "speed up for some extractor/detector "
                                      "combinations, less so for others. "
                                      "Only has an effect if both the "
                                      "aligner and detector use the GPU, "
                                      "otherwise this is automatic."})
        argument_list.append({"opts": ("-sz", "--size"),
                              "type": int,
                              "default": 256,
                              "help": "The output size of extracted faces. "
                                      "Make sure that the model you intend "
                                      "to train supports your required "
                                      "size. This will only need to be "
                                      "changed for hi-res models."}) </s> remove                                       "extracted"})
 </s> add                                       "extracted and exist in the alignments "
                                      "file"})
        argument_list.append({"opts": ("-sf", "--skip-existing-faces"),
                              "action": "store_true",
                              "dest": "skip_faces",
                              "default": False,
                              "help": "Skip frames that already have "
                                      "detected faces in the alignments "
                                      "file"}) </s> remove         if input_dir_A is None or input_dir_B is None:
            raise Exception("To enable the timelapse, you have to supply all the parameters "
                            "(--timelapse-input-A and --timelapse-input-B).")
 </s> add         if input_dir_a is None or input_dir_b is None:
            raise ValueError("To enable the timelapse, you have to supply "
                             "all the parameters (--timelapse-input-A and "
                             "--timelapse-input-B).") </s> remove             final_faces = [self.process_single_face(idx,
                                                    face,
                                                    filename,
                                                    image)
                           for idx, face in process_faces]
 </s> add     def process_item_count(self):
        """ Return the number of items to be processedd """
        processed = sum(os.path.basename(frame) in self.alignments.data.keys()
                        for frame in self.images.input_images)
                                "filetypes": 'alignments',
                                "type": str,
                                "dest": "alignments_path",
                                "help": "Optional path to an alignments file."})











































































          argument_list.append({"opts": ("-l", "--ref_threshold"),
                                "type": float,
                                "dest": "ref_threshold",
                                "default": 0.6,
                                "help": "Threshold for positive face "
keep keep keep keep replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace 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/cli.py