def class_text_to_int(cls_name, label_map):
    """
    Get index of class name
    :param cls_name: name of class
    :param label_map: label map
    :return: index of class if found
    """
    if cls_name in label_map:
        return label_map[cls_name]
    raise ValueError('Invalid class')