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

multi-class segmentation discuss #54

Open
smallboy-code opened this issue Nov 1, 2023 · 6 comments
Open

multi-class segmentation discuss #54

smallboy-code opened this issue Nov 1, 2023 · 6 comments

Comments

@smallboy-code
Copy link

Hi @JuliaWolleb , thank you for your great work. I want to solve the multi-class segmentation problem and I delete the "label = torch.where(label > 0, 1, 0).float()". Now, I got some output looks not well as follows:
2
3
5
6
8
7

So, can you give me some advices about this problem?

@JuliaWolleb
Copy link
Owner

JuliaWolleb commented Nov 6, 2023

Hi
How did you train this multi-class approach? It seems like you trained on a segmentation mask with a single channel, but different values (0,1,2,3) for the different classes?
I suggest you train with one-hot-encoding, i.e., one binary mask for each of the classes.

@smallboy-code
Copy link
Author

Yes, I trained on a segmentation mask with a single channel with different values (0,1,2,3) for the different classes. The one binary mask for each of the classes means training on a segmentation mask with three channels with WT,TC and ET?

@JuliaWolleb
Copy link
Owner

yes exactly, all three classes will have a separate binary channel each.

@smallboy-code
Copy link
Author

Yes, I have also try to do this, but I found the finnal output will be like this:
图片1
WT,TC,ET,respectively. I think the results are worse than one channel.

@ZhengChen6
Copy link

ZhengChen6 commented Mar 17, 2024

Yes, I have also try to do this, but I found the finnal output will be like this: 图片1 WT,TC,ET,respectively. I think the results are worse than one channel.

Hi, I also want to use multi-class segmentation for training, have you solved this problem? @smallboy-code

@smallboy-code
Copy link
Author

It remains unresolved. @ZhengChen6

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

3 participants