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 #1

Closed
masaladose opened this issue Jul 27, 2017 · 6 comments
Closed

multi class segmentation #1

masaladose opened this issue Jul 27, 2017 · 6 comments

Comments

@masaladose
Copy link

Hi,
This is probably the best CNTK image segmentation example I have seen so far. Thank you!
A few comments:

  1. shouldn't the conv9 be: "Convolution((3,3), 32, init=glorot_uniform(), activation=relu, pad=True)(up9)"?Instead of "Convolution((3,3), 64, init=glorot_uniform(), activation=relu, pad=True)(up9)"

  2. I am trying to modify this to do multi-class segmentation. I modified conv10 as:
    conv10 = Convolution((1,1), num_class, init=glorot_uniform(), activation=sigmoid, pad=True)(conv9)
    and made the target mask also multi class. Using your example, one class is circles another is square.
    However, I am unable to get segmentation output for both classes. It's usually one class that is segmented and the other is all blank.

I was wondering if you had a multi class segmentation implementation.

Thanks

@usuyama
Copy link
Owner

usuyama commented Aug 3, 2017

  1. Seems you're right.
  2. That should work. Could you share your code so that I can reproduce the issue?

@masaladose
Copy link
Author

masaladose commented Aug 10, 2017 via email

@usuyama
Copy link
Owner

usuyama commented Aug 18, 2017

Thanks for the code. I think the problem was the dice coefficient, which can be dominated by a class with larger region. I changed the loss function to per-class dice coefficient then it's working now. Please check the latest commit.

@usuyama usuyama closed this as completed Aug 18, 2017
@usuyama
Copy link
Owner

usuyama commented Aug 20, 2017

@masaladose FYI - I just posted fully-conv-nets for semantic segmentation, too. Might work better than U-net depending on problems.
https://github.com/usuyama/cntk-fully-convolutional-networks

@masaladose
Copy link
Author

masaladose commented Aug 21, 2017 via email

@usuyama
Copy link
Owner

usuyama commented Aug 21, 2017

I'm so happy to hear that! Let me know if you have ideas for improvements!

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