-
Notifications
You must be signed in to change notification settings - Fork 100
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
image segmentation with multiple classes #12
Comments
This repo explains the process very well. |
@karliesama , did you try out @vriez suggestion? I want to know how that worked out for you in the end. Thanks! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Thanks for the amazing project! My dataset is multiple classes segmentation. Mask image is (H, W), which H is height, W is width, each pixel is an integer representing the class. For example, tree: 0, ... car: 8, sky: 9. The mask looks like [[0,3,9],[3,4,5]].
The number of my classes is 10.
I'm wondering how to train on this dataset. Should it be like
However, the prediction size seems to be wrong.
The
y_pred
istorch.Size([8, 38, 256, 456])
buty_truth
istorch.Size([8, 256, 456])
, 8 is the batch size, 256 is H, 456 is W.y_pred = model(inputs)['out']
The size doesn't match to feed into loss function. Moreover, the y_pred has float number for every element but I expect it should be the number representing class like 0,1,2,3.
May I ask how to deal with it? Thanks a lot for helping!
The text was updated successfully, but these errors were encountered: