-
Notifications
You must be signed in to change notification settings - Fork 74
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I think there is a trouble code #37
Comments
Hi @mshmoon |
@dronefreak I have use the other version code of bisenet |
Hi @mshmoon |
@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? |
@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. |
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.
The text was updated successfully, but these errors were encountered: