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
Is multiclass segmentation possible? #19
Comments
Hello, |
Hi @dev-walter , thanks for your interest in our project. Thank you @kabbas570 for resolving the issue. |
Thank you this worked perfectly and the model performed very well :). |
Really glad to hear that @dev-walter , best wishes for you |
Thank you very much, I will test that too. But is the change from 1 to 4 really correct? There was already a background before, so there have always been 2 classes. [Edit: I think I understand it now. With one class plus background, you get the probability of it being the other class, sort of inclusive. Starting from two classes plus background you have to output it explicitly.] Are there actually any other changes that have become mandatory, e.g. is the Jaccard index in its current form defined for multiclass predictions? |
Thanks @saskra . Yes for 2 class the background is just the opposite prediction probability. Nevertheless, you can work with 2 class using 2 output classes, but that’s kind of redundant. in regards to evolution metrics, you can either collapse them to one dimension or class or compute them individually. hope this helps, best wishes. |
Hello, sir. |
Hi, |
If you already did this, then check your target shape. |
thanks for the response.
I've changed the line to conv10 = conv2d_bn(mresblock9, 3, 1, 1,
activation='sigmoid').
however I get an error : logit and label must have the same form ((1, 192,
256, 3) vs (1, 192, 256, 1)).
to check the target shape in what line?
Thank you
Pada tanggal Sab, 16 Jul 2022 pukul 02.40 Abbas Khan <
***@***.***> menulis:
… If you already did this, then check your target shape.
—
Reply to this email directly, view it on GitHub
<#19 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AKPIIRH4DQFOCCVXPJM3X5LVUGWCDANCNFSM4YT3IOPQ>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
check your target shape it can be anywhere according to your implementation. for the code demo check this, |
Y_train =
Y_train.reshape((Y_train.shape[0],Y_train.shape[1],Y_train.shape[2],1))
Y_test = Y_test.reshape((Y_test.shape[0],Y_test.shape[1],Y_test.shape[2],1))
if i change number 1 to number 3. i get error : cannot reshape array of
size 2752512 into shape (56,192,256.3)
Pada tanggal Sab, 16 Jul 2022 pukul 02.58 Hendri Ramdhan <
***@***.***> menulis:
… if i print Y_train.shape it will show (56, 192, 256, 1).
is my method is correct.
I beg your help sir. because I'm still a beginner.
Pada tanggal Sab, 16 Jul 2022 pukul 02.53 Abbas Khan <
***@***.***> menulis:
> check your target shape it can be anywhere according to your
> implementation. for the code demo check this,
> print(Y_train.shape)
>
> —
> Reply to this email directly, view it on GitHub
> <#19 (comment)>,
> or unsubscribe
> <https://github.com/notifications/unsubscribe-auth/AKPIIRCF4OEM7TPHLBP36X3VUGXQ5ANCNFSM4YT3IOPQ>
> .
> You are receiving this because you commented.Message ID:
> ***@***.***>
>
|
There is some problem with your ground truth data, then, check it before feeding it to the model. |
arrange your ground truth like this, I hope it will help. |
I apologize. because in my case, there will divide in 1 image by 3 classes. |
if i print Y_train.shape it will show (56, 192, 256, 1).
is my method is correct.
I beg your help sir. because I'm still a beginner.
Pada tanggal Sab, 16 Jul 2022 pukul 02.53 Abbas Khan <
***@***.***> menulis:
… check your target shape it can be anywhere according to your
implementation. for the code demo check this,
print(Y_train.shape)
—
Reply to this email directly, view it on GitHub
<#19 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AKPIIRCF4OEM7TPHLBP36X3VUGXQ5ANCNFSM4YT3IOPQ>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
Hi Hendri, if you want to generate 3 class label, I would suggest you to make the Y_train.shape (56,192,256,3) (or (56,192,256,4) if you wish to have background) |
Hello,
I want to implement your model in a cell segmentation task. Since I have to segment my images into 4 classes (background, healthy cells, cancer cells and leucocytes) I wanted to ask if your model can be easily modified to support multiclass segmenation.
I have little experience in deep learning and python so help would be much appreciated!
The text was updated successfully, but these errors were encountered: