prepare_all_data

prepare_all_data()[source]

Prepares all Datasets from commandline arguments

prepare_helen_dset

prepare_helen_dset()[source]

Prepares the HELEN Dataset from commandline arguments

prepare_lfpw_dset

prepare_lfpw_dset()[source]

Prepares the LFPW Dataset from commandline arguments

prepare_cat_dset

prepare_cat_dset()[source]

Prepares the Cat Dataset from commandline arguments

_prepare_ibug_dset

_prepare_ibug_dset(zip_file, dset_name, out_dir, remove_zip=False, normalize_pca_rot=True)[source]

Prepares an ibug dataset (from a given zipfile)

Parameters:
  • zip_file (str) – the zip archive containing the data
  • dset_name (str) – the dataset’s name
  • out_dir (str) – the output directory
  • remove_zip (bool, optional) – whether or not to remove the ZIP file after finishing the preparation
  • normalize_pca_rot (bool, optional) – whether or not to normalize the data’s rotation during PCA

See also

iBug Datasets

_prepare_cats

_prepare_cats(out_dir, remove_zip=False, normalize_pca_rot=False, **split_options)[source]

Prepares the cat dataset (with multiprocessing)

Parameters:
  • out_dir (str) – the output directory
  • remove_zip (bool, optional) – whether or not to remove the ZIP file after finishing the preparation
  • normalize_pca_rot (bool, optional) – whether or not to normalize the data’s rotation during PCA

See also

Cat Dataset

_process_single_cat_file

_process_single_cat_file(file, target_dir)[source]

Processes a single file of the cat dataset

Parameters:
  • file (str) – the file to process
  • target_dir (str) – the target directory

_make_pca

_make_pca(data_dir, out_file, normalize_rot=False, rotation_idxs=())[source]

Creates a PCA from data in a given directory

Parameters:
  • data_dir (str) – directory containing the image and landmark files
  • out_file (str) – file the pca will be saved to
  • normalize_rot (bool, optional) – whether or not to normalize the data’s rotation
  • rotation_idxs (tuple, optional) – indices for rotation normalization, msut be specified if normalize_rot=True