              "opts": ("-M", "--mask-type"),
              "action": Radio,
              "type": str.lower,
              "dest": "mask_type",
              "choices": get_available_masks() + ["predicted"],
              "group": "plugins",
              "default": "predicted",
              "help": "R|Mask to use to replace faces. Blending of the masks can be adjusted in "
                      "'/config/convert.ini' or 'Settings > Configure Convert Plugins':"
                      "\nL|components: An improved face hull mask using a facehull of 8 facial "
 
</s> remove         argument_list.append({
            "opts": ("-D", "--detector"),
            "action": Radio,
            "type": str.lower,
            "choices":  PluginLoader.get_available_extractors("detect"),
            "default": default_detector,
            "group": "Plugins",
            "help": "R|Detector to use. Some of these have configurable settings in "
                    "'/config/extract.ini' or 'Settings > Configure Extract Plugins':"
                    "\nL|cv2-dnn: A CPU only extractor, is the least reliable, but uses least "
                    "resources and runs fast on CPU. Use this if not using a GPU and time is "
                    "important."
                    "\nL|mtcnn: Fast on CPU, Faster on GPU. Uses far fewer resources than other "
                    "GPU detectors but can often return more false positives."
                    "\nL|s3fd: Fast on GPU, slow on CPU. Can detect more faces and "
                    "fewer false positives than other GPU detectors, but is a lot more resource "
                    "intensive."})
        argument_list.append({
            "opts": ("-A", "--aligner"),
            "action": Radio,
            "type": str.lower,
            "choices": PluginLoader.get_available_extractors("align"),
            "default": default_aligner,
            "group": "Plugins",
            "help": "R|Aligner to use."
                    "\nL|cv2-dnn: A cpu only CNN based landmark detector. Faster, less "
                    "resource intensive, but less accurate. Only use this if not using a gpu "
                    " and time is important."
                    "\nL|fan: Face Alignment Network. Best aligner. GPU "
                    "heavy, slow when not running on GPU"})
 </s> add         argument_list.append({"opts": ("-D", "--detector"),
                              "action": Radio,
                              "type": str.lower,
                              "choices":  PluginLoader.get_available_extractors("detect"),
                              "default": default_detector,
                              "group": "Plugins",
                              "help": "R|Detector to use. Some of these have configurable "
                                      "settings in '/config/extract.ini' or 'Settings > Configure "
                                      "Extract 'Plugins':"
                                      "\nL|cv2-dnn: A CPU only extractor which is the least "
                                      "reliable and least resource intensive. Use this if not "
                                      "using a GPU and time is important."
                                      "\nL|mtcnn: Good detector. Fast on CPU, faster on GPU. Uses "
                                      "fewer resources than other GPU detectors but can often "
                                      "return more false positives."
                                      "\nL|s3fd: Best detector. Fast on GPU, slow on CPU. Can "
                                      "detect more faces and fewer false positives than other "
                                      "GPU detectors, but is a lot more resource intensive."})
        argument_list.append({"opts": ("-A", "--aligner"),
                              "action": Radio,
                              "type": str.lower,
                              "choices": PluginLoader.get_available_extractors("align"),
                              "default": default_aligner,
                              "group": "Plugins",
                              "help": "R|Aligner to use."
                                      "\nL|cv2-dnn: A CPU only landmark detector. Faster, less "
                                      "resource intensive, but less accurate. Only use this if "
                                      "not using a GPU and time is important."
                                      "\nL|fan: Best aligner. Fast on GPU, slow on CPU."})
        argument_list.append({"opts": ("-M", "--masker"),
                              "action": Radio,
                              "type": str.lower,
                              "choices": PluginLoader.get_available_extractors("mask"),
                              "default": "components",
                              "group": "Plugins",
                              "help": "R|Masker to use."
                                      "\nL|none: An array of all ones is created to provide a 4th "
                                      "channel that will not mask any portion of the image."
                                      "\nL|components: Mask designed to provide facial "
                                      "segmentation based on the positioning of landmark "
                                      "locations. A convenx hull is constructed around the "
                                      "exterior of the landmarks to create a mask."
                                      "\nL|extended: Mask designed to provide facial segmentation "
                                      "based on the positioning of landmark locations. A convenx "
                                      "hull is constructed around the exterior of the landmarks "
                                      "and the mask is extended upwards onto the forehead."
                                      "\nL|vgg-clear: Mask designed to provide smart segmentation "
                                      "of mostly frontal faces clear of obstructions.  Profile "
                                      "faces and obstructions may result in sub-par performance."
                                      "\nL|vgg-obstructed: Mask designed to provide smart "
                                      "segmentation of mostly frontal faces. The mask model has "
                                      "been specifically trained to recognize some facial "
                                      "obstructions (hands and eyeglasses). Profile faces may "
                                      "result in sub-par performance."
                                      "\nL|unet-dfl: Mask designed to provide smart segmentation "
                                      "of mostly frontal faces. The mask model has been trained "
                                      "by community members and will need testing for further "
                                      "description. Profile faces may result in sub-par "
                                      "performance."}) </s> remove             section=section, title="mask_type", datatype=str, default="none",
            choices=get_available_masks(), group="mask",
            info="The mask to be used for training:"
                 "\n\t none: Doesn't use any mask."
                 "\n\t components: An improved face hull mask using a facehull of 8 facial parts"
                 "\n\t dfl_full: An improved face hull mask using a facehull of 3 facial parts"
                 "\n\t extended: Based on components mask. Extends the eyebrow points to further "
                 "up the forehead. May perform badly on difficult angles."
                 "\n\t facehull: Face cutout based on landmarks")
 </s> add             section=section, title="replicate_input_mask", datatype=bool,
            default=False, group="mask",
            info="Dedicate portions of the model to learning how to duplicate the input "
                 "mask. Increases VRAM usage in exchange for a learning a quick ability "
                 "to try to replicate more complex mask models.") </s> remove                     "not trained with a mask then this will fallback to "
                    "'{}'".format(get_default_mask()) +
 </s> add                     "not trained with a mask then this will fallback to components." </s> remove                    "\nIf you are training with a mask or using 'warp to landmarks' then every "
 </s> add                    "\nIf you are using 'warp to landmarks' then every " </s> remove             loss = self.model.predictors[self.side].train_on_batch(*batch)
 </s> add             loss = self.model.predictors[self.side].train_on_batch(x=model_inputs, y=model_targets)
            "choices": ["dfl_full", "components", "extended", "predicted"],
              "opts": ("-M", "--mask-type"),
              "action": Radio,
              "type": str.lower,
              "dest": "mask_type",
            "choices": ["dfl_full", "components", "extended", "predicted"],
              "group": "plugins",
              "default": "predicted",
              "help": "R|Mask to use to replace faces. Blending of the masks can be adjusted in "
                      "'/config/convert.ini' or 'Settings > Configure Convert Plugins':"
                      "\nL|components: An improved face hull mask using a facehull of 8 facial "
keep keep keep keep replace keep keep keep keep keep
 Smart Mask Exposure for Extraction & Training (#831)

Smart Masks - Initial Commit 
lib/cli.py