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

How can we specify the segmentation class number? #11

Closed
JunMa11 opened this issue Nov 13, 2019 · 2 comments
Closed

How can we specify the segmentation class number? #11

JunMa11 opened this issue Nov 13, 2019 · 2 comments

Comments

@JunMa11
Copy link

JunMa11 commented Nov 13, 2019

Dear @kanezaki ,

Thanks for sharing the great work.

It seems the number of classes is determined by SLIC.

u_labels = np.unique(labels)
l_inds = []
for i in range(len(u_labels)):
l_inds.append( np.where( labels == u_labels[ i ] )[ 0 ] )

How can we manually specify the segmentation class number?
e.g., I only want the method segments the input image into 3 classes.

Best regards,
Jun

@kanezaki
Copy link
Owner

Dear @JunMa11

Sorry for confusion, but the number of classes is actually not determined by SLIC. As you will see when you run the code, the number gradually decreases during training. The training stops when it reaches the minimum number of classes, which can be given by "--minLabels" command option. It is set to 3 by default, so I expect you would get your desired results by just running the code. :)

Best regards,
Asako

@JunMa11
Copy link
Author

JunMa11 commented Nov 17, 2019

Got it. Thanks for your reply very much.

@JunMa11 JunMa11 closed this as completed Nov 17, 2019
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