read_label_map_tsv#
- petpal.utils.image_io.read_label_map_tsv(label_map_file: str) dict | pandas.DataFrame#
Static method to read a label map, translating region indices to region names, as a dictionary. Assumes tsv format.
- Parameters:
label_map_file (str) – Path to a json-formatted label map file.
- Returns:
label_map (pd.DataFrame) –
- Dataframe matching region indices, names,
abbreviations, and mappings.
- Raises:
FileNotFoundError – If the provided ctab file cannot be found in the directory.