def cre_ground_truth_dict_from_txt(gt_file_path):
    """
    :param gt_file_path: file contains the image_name and label number
    :return: dictionary key image_name, value is label number
    """
    img_gt_dict = {}
    with open(gt_file_path, 'r')as f:
        for line in f.readlines():
            temp = line.strip().split(" ")
            img_name = temp[0].split(".")[0]
            img_lab = temp[1]
            img_gt_dict[img_name] = img_lab
    return img_gt_dict