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 #81
Comments
Yes it can handle mutli class segmentation, see this example where I segment, starts, galaxies and background pixels. Training, however, can be hard. People had successes training one model per class and combining their predictions |
Thanks for your response! |
Frankly, my experience with multiclass segmentation problems is rather limited. Anyway, as often with DL there is no absolute correct answer. Which means you have to experiment what works best for your problem and data set. What you describe is probably what I would try. I recommend to read the reports of the Kaggle DSTL challenge winners |
Hello jakeret, I tried multi-label segmentation for Unet. As you mentioned in the previous post regarding the multilabel segmentation, I created my train data and corresponding labels with the following dimensions and these are what I sent to the data provider (n_class = 3). net = unet.Unet(channels=1, n_class=3, cost="cross_entropy" , features_root=64) I receive the following error: InvalidArgumentError (see above for traceback): Assign requires shapes of both tensors to match. lhs shape= [1,1,64,3] rhs shape= [1,1,64,2] and when I change the initialization of network as follow, it works So it means that although I have used the 3 labels in my train data, the network still is training on just 2 labels. Have you ever trained the network on multiple labels? |
Hard to tell what is going on without the traceback. |
Thanks for your reply. Yes, I checked what I receive from the data provider and I also visualized them to see if they are what I want. Data provider creates the correct input. Traceback (most recent call last): Caused by op 'save/Assign_18', defined at: InvalidArgumentError (see above for traceback): Assign requires shapes of both tensors to match. lhs shape= [3] rhs shape= [2] |
Also, this is the code that I used for training the network: data_provider = image_util.SimpleDataProvider(data , label , channels=1, n_class = 3) |
well the training seems to work fine. That about
|
@nargeshn may I know what tool u used to do generate masks for training? |
itk-snap may work if dealing with nifti images |
any luck on this implementation? at present I am dealing with the same issue |
@dhinkris You should edit the image_util.py file. In it, you should set classes to 3 and change codes in _process_labels part. |
@meijie0401 Hi i am currently attempting the same change but i dont understand what should be changes in _process_labels part ? Thanks ! |
Do you solved it ? I have the same problem with you . do you have any idea ? thanks! |
I think this question has been asked by other people but I can not find the issue and your response.
I am trying to use U_net for segmentation of medical images. The segmentations contain more than one label. I modified the labels to binary but I am just curious if U-Net can handle the multi_Class segmentation.
The text was updated successfully, but these errors were encountered: