def get_labels(names_path):
    """Loads object labels from .names file in darknet/data.

    Arguments:
    ----------
        names_path (pathlib.Path):
            Path to .names file in darknet/data.

    Returns:
    --------
        labels (list):
            Labels.
    """
    with open(names_path, 'r') as file:
        labels = file.readlines()
    labels = [label.strip() for label in labels]

    return labels