Skip to content
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

Open
mshmoon opened this issue Mar 26, 2020 · 6 comments
Open

I think there is a trouble code #37

mshmoon opened this issue Mar 26, 2020 · 6 comments

Comments

@mshmoon
Copy link

mshmoon commented Mar 26, 2020

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.

@dronefreak
Copy link

Hi @mshmoon
You are correct. This is an issue that I am also facing.
Have you been able to resolve this?

@mshmoon
Copy link
Author

mshmoon commented May 11, 2020

@dronefreak I have use the other version code of bisenet

@dronefreak
Copy link

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
Copy link
Author

mshmoon commented May 15, 2020

@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
Copy link
Author

mshmoon commented May 15, 2020

@mshmoon I have train CamVid, Cityscapes and Pascal VOC2012

@dronefreak
Copy link

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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants