Utilities to process dataset.
Reads labels from text file and store it in a dict.
This function supports following formats:
- Each line contains id and description separated by colon or space. Example: ‘0:cat’ or ‘0 cat’.
- Each line contains description only. Label’s id equals to row number.
Parameters: file_path – String, path to the label file. Returns: Dict of (int, string) which maps label id to description.
Is this content helpful?