aligner_distance

plugins.extract.extract_config.aligner_distance = ConfigItem(datatype=<class 'float'>, default=40.0, group='align', info="Filters out faces who's landmarks are above this distance from an 'average' face. Values above 15 tend to be fairly safe. Values above 10 will remove more false positives, but may also filter out some faces at extreme angles.", choices=[], gui_radio=False, min_max=(0.0, 45.0), rounding=1, fixed=True, _value=40.0, _name='')

A dataclass for storing config items loaded from config.ini files and dynamically assigning and validating that the correct datatype is used.

The value loaded from the .ini config file can be accessed with either:

>>> conf.value
>>> conf()
>>> conf.get()
Parameters:
  • datatype – A python type class. This limits the type of data that can be provided in the .ini file and ensures that the value is returned to faceswap is correct. Valid datatypes are: int, float, str, bool or list. Note that list items must all be strings.

  • default – The default value for this option. It must be of the same type as datatype.

  • group – The group that this config item exists within in the config section

  • info – A description of what this option does.

  • choices – If this option’s datatype is a str then valid selections can be defined here, empty list for any value. If the option’s datatype is a list, then this option must be populated with the valid selections. This validates the option and also enables a combobox / radio option in the GUI. If the default value is a hex color value, then this should be the literal “colorchooser” to present a color choosing interface in the GUI. Ignored for all other datatypes Default: [] (empty list: no options)

  • gui_radio – If choices are defined, this indicates that the GUI should use radio buttons rather than a combobox to display this option. Default: False

  • min_max – For int and float datatype this is required otherwise it is ignored. Should be a tuple of min and max accepted values of the same datatype as the option value. This is used for controlling the GUI slider range. Values are not enforced. Default: None

  • rounding – For int and float :attr:datatypes this is required to be > 0 otherwise it is ignored. Used for the GUI slider. For `float, this is the number of decimal places to display. For int this is the step size. Default: -1 (ignored)

  • fixed – [train only]. Training configurations are fixed when the model is created, and then reloaded from the state file. Marking an item as fixed=``False`` indicates that this value can be changed for existing models, and will override the value saved in the state file with the updated value in config. Default: True

Return type:

T