peal.data.custom_datasets.parse_datastr

peal.data.custom_datasets.parse_datastr(data_path)[source]

Read a CelebA-HQ style annotation file into one whitespace-separated table.

The leading sample count (the first six characters of the file) is dropped, an idx column is prepended to the header for the file name, and double spaces are collapsed so the rest parses as a single-space-delimited table.

Parameters:

data_path (str) – Path of the annotation text file.

Returns:

The whole table as a single string.

Return type:

str