fastface
- fastface.list_pretrained_models() List[str]
Returns available pretrained model names
- Returns:
list of pretrained model names
- Return type:
List[str]
>>> import fastface as ff >>> ff.list_pretrained_models() ['lffd_original', 'lffd_slim']
- fastface.download_pretrained_model(model: str, target_path: str | None = None) str
Downloads pretrained model to given target path, if target path is None, it will use model cache path. If model already exists in the given target path than it will do notting.
- Parameters:
model (str) – pretrained model name to download
target_path (str, optional) – target directory to download model. Defaults to None.
- Returns:
file path of the model
- Return type:
str
- fastface.list_archs() List[str]
Returns available architecture names
- Returns:
list of arch names
- Return type:
List[str]
>>> import fastface as ff >>> ff.list_archs() ['lffd']
- fastface.list_arch_configs(arch: str) List[str]
Returns available architecture configurations as list
- Parameters:
arch (str) – architecture name
- Returns:
list of arch config names
- Return type:
List[str]
>>> import fastface as ff >>> ff.list_arch_configs('lffd') ['original', 'slim']
- fastface.get_arch_config(arch: str, config: str) Dict
Returns configuration dictionary for given arch and config names
- Parameters:
arch (str) – architecture name
config (str) – configuration name
- Returns:
configuration details as dictionary
- Return type:
Dict
>>> import fastface as ff >>> ff.get_arch_config('lffd', 'slim') {'input_shape': (-1, 3, 480, 480), 'backbone_name': 'lffd-v2', 'head_infeatures': [64, 64, 64, 128, 128], 'head_outfeatures': [128, 128, 128, 128, 128], 'rf_sizes': [20, 40, 80, 160, 320], 'rf_start_offsets': [3, 7, 15, 31, 63], 'rf_strides': [4, 8, 16, 32, 64], 'scales': [(10, 20), (20, 40), (40, 80), (80, 160), (160, 320)]}