(root, numerical_sort=False)
return label_names
Get label names from the directories that are named by them.

    The label names are the names of the directories that locate a
    layer below the root directory.

    The label names can be used together with
    :class:`~chainercv.datasets.DirectoryParsingLabelDataset`.
    The index of a label name corresponds to the label id
    that is used by the dataset to refer the label.

    Args:
        root (string): The root directory.
        numerical_sort (bool): Label names are sorted numerically.
            This means that label :obj:`2` is before label :obj:`10`,
            which is not the case when string sort is used.
            The default value is :obj:`False`.

    Returns:
        list of strings:
        Sorted names of classes.
Get label names from the directories that are named by them.
Get label names from the directories that are named by them .
def directory_parsing_label_names(root, numerical_sort=False):
    """Get label names from the directories that are named by them.

    The label names are the names of the directories that locate a
    layer below the root directory.

    The label names can be used together with
    :class:`~chainercv.datasets.DirectoryParsingLabelDataset`.
    The index of a label name corresponds to the label id
    that is used by the dataset to refer the label.

    Args:
        root (string): The root directory.
        numerical_sort (bool): Label names are sorted numerically.
            This means that label :obj:`2` is before label :obj:`10`,
            which is not the case when string sort is used.
            The default value is :obj:`False`.

    Returns:
        list of strings:
        Sorted names of classes.

    """
    label_names = [d for d in os.listdir(root)
                   if os.path.isdir(os.path.join(root, d))]

    if not numerical_sort:
        label_names.sort()
    else:
        label_names = sorted(label_names, key=int)
    return label_names
def directory_parsing_label_names ( root , numerical_sort = False ) : label_names = [ d for d in os . listdir ( root ) if os . path . isdir ( os . path . join ( root , d ) ) ] if not numerical_sort : label_names . sort ( ) else : label_names = sorted ( label_names , key = int ) return label_names