Open mshmoon opened 4 years ago
Hi @mshmoon You are correct. This is an issue that I am also facing. Have you been able to resolve this?
@dronefreak I have use the other version code of bisenet
Hi @mshmoon Have you used the other version with CamVid dataset or Cityscapes? Could you kindly share your CamVid training codes and CamVid dataset scripts if you have done so?
@mshmoon The CamVid training codes can be any semantic segmenation codes, but the difference is the label encoding and label decoding betweent these codes, do you have a trouble about it? You can download CamVid from this link: https://github.com/alexgkendall/SegNet-Tutorial/tree/master/CamVid
@mshmoon I have train CamVid, Cityscapes and Pascal VOC2012
Hi @mshmoon
Yes indeed. I am new to this field and I have had some troubles in encoding/decoding the labels. I used the above mentioned link previously, but was unable to train properly. I will try again. Thanks a lot!
Please see the function that come from utils.py: def one_hot_it_v11_dice(label, label_info): semantic_map = [] void = np.zeros(label.shape[:2]) for index, info in enumerate(label_info): color = label_info[info][:3] class_11 = label_info[info][3] if class_11 == 1: equality = np.equal(label, color) class_map = np.all(equality, axis=-1) semantic_map.append(class_map) else: equality = np.equal(label, color) class_map = np.all(equality, axis=-1) void[class_map] = 1 semantic_map.append(void) semantic_map = np.stack(semantic_map, axis=-1).astype(np.float) return semantic_map The variable "semantci_map" is a python list, but in the function ,the list only have twice append operations so that in compute loss pahse the error of output and target have different shape happend, because output shape is [batch, num class,w,h], but target shape is [batch ,2,w,h]. I can't guarantee I'm absolutely right.