Thanks for reply, the map is in this way:

class GTA5DataSet(data.Dataset):
def init(self,
max_iters=None,
num_classes=2,
ignore_label=255,
debug=False,):
    self.split = split
    self.NUM_CLASS = num_classes
    self.data_root = data_root
    self.data_list = []
    
    if max_iters is not None:
        self.label_to_file, self.file_to_label = pickle.load(open(osp.join(data_root, "gtav_label_info.p"), "rb"))
        self.img_ids = []
        SUB_EPOCH_SIZE = 3000
        tmp_list = []
        ind = dict()
        for i in range(self.NUM_CLASS):
            ind[i] = 0
        for e in range(int(max_iters/SUB_EPOCH_SIZE)+1):
            cur_class_dist = np.zeros(self.NUM_CLASS)
            for i in range(SUB_EPOCH_SIZE):
                if cur_class_dist.sum() == 0:
                    dist1 = cur_class_dist.copy()
                else:
                    dist1 = cur_class_dist/cur_class_dist.sum()
                w = 1/np.log(1+1e-2 + dist1)
                w = w/w.sum()
                c = np.random.choice(self.NUM_CLASS, p=w)

                if ind[c] > (len(self.label_to_file[c])-1):
                    np.random.shuffle(self.label_to_file[c])
                    ind[c] = ind[c]%(len(self.label_to_file[c])-1)

                c_file = self.label_to_file[c][ind[c]]
                tmp_list.append(c_file)
                ind[c] = ind[c]+1
                cur_class_dist[self.file_to_label[c_file]] += 1

        self.img_ids = tmp_list

    if max_iters is not None:
        self.data_list = self.data_list * int(np.ceil(float(max_iters) / len(self.data_list)))
    
    print('length of gta5', len(self.data_list))

    self.id_to_trainid = {0: 0, 1: 1}
    self.trainid2name = {
        0:"back",
        1:"file",
         }
    self.transform = transform
    self.ignore_label = ignore_label
    self.debug = debug

def __len__(self):
    return len(self.data_list)

def __getitem__(self, index):
    if self.debug:
        index = 0
    datafiles = self.data_list[index]

    # re-assign labels to match the format of Cityscapes
    label_copy = self.ignore_label * np.ones(label.shape, dtype=np.float32)
    for k, v in self.id_to_trainid.items():
        label_copy[label == k] = v
    label = Image.fromarray(label_copy)

    if self.transform is not None:
        image, label = self.transform(image, label)

    return image, label, name