3d-mri-brain-tumor-segmentation-using-autoencoder-regularization
3d-mri-brain-tumor-segmentation-using-autoencoder-regularization copied to clipboard
dice score zero
I have splited data set into train and test but still getting accuracy zero ,dice score zero and can't perform confusion matrix too. Can anybody help me please
import numpy as np import pandas as pd from sklearn.model_selection import train_test_split xTrain,xTest,yTrain,yTest=train_test_split(data,labels,test_size = 0.25,random_state=10) (this is code that i have splitted)
model.fit(xTrain,yTrain, batch_size=1, epochs=5)
Epoch 1/5 3/3 [==============================] - 25s 8s/step - loss: 0.2007 - dice_coefficient: 0.0000e+00 Epoch 2/5 3/3 [==============================] - 4s 1s/step - loss: 0.1996 - dice_coefficient: 0.0000e+00 Epoch 3/5 3/3 [==============================] - 4s 1s/step - loss: 0.1960 - dice_coefficient: 0.0000e+00 Epoch 4/5 3/3 [==============================] - 4s 1s/step - loss: 0.2002 - dice_coefficient: 0.0000e+00 Epoch 5/5 3/3 [==============================] - 4s 1s/step - loss: 0.1948 - dice_coefficient: 0.0000e+00
<keras.callbacks.History at 0x7f68441bbbe0>
Please help me.I am doing my project for final year and my last review on march 2.
my dice score is 0.35-0.37
my dice score is 0.35-0.37
how did you do that ? can you help me on finding predicted value for it because I am very new to deep learning
my dice score is 0.35-0.37
how did you do that ? can you help me on finding predicted value for it because I am very new to deep learning we can talk aobout this question
my dice score is 0.35-0.37
how did you do that ? can you help me on finding predicted value for it because I am very new to deep learning we can talk aobout this question
would you mind to help me ?
my dice score is 0.35-0.37
how did you do that ? can you help me on finding predicted value for it because I am very new to deep learning we can talk aobout this question
would you mind to help me ?
Never mind. we can help each other. I also have some issues
my dice score is 0.35-0.37
how did you do that ? can you help me on finding predicted value for it because I am very new to deep learning we can talk aobout this question
How many images and epoch you have used?
my dice score is 0.35-0.37
Can you please help me out in getting the improvement in score, Even I am getting a score of 0 and if I am increasing epochs, its getting even worse. But VAE's coefficient is around 90+ but GT's coefficient is 0. Trying from many days but unable to crack this. Please help me.
I have splited data set into train and test but still getting accuracy zero ,dice score zero and can't perform confusion matrix too. Can anybody help me please
import numpy as np import pandas as pd from sklearn.model_selection import train_test_split xTrain,xTest,yTrain,yTest=train_test_split(data,labels,test_size = 0.25,random_state=10) (this is code that i have splitted)
model.fit(xTrain,yTrain, batch_size=1, epochs=5)
Epoch 1/5 3/3 [==============================] - 25s 8s/step - loss: 0.2007 - dice_coefficient: 0.0000e+00 Epoch 2/5 3/3 [==============================] - 4s 1s/step - loss: 0.1996 - dice_coefficient: 0.0000e+00 Epoch 3/5 3/3 [==============================] - 4s 1s/step - loss: 0.1960 - dice_coefficient: 0.0000e+00 Epoch 4/5 3/3 [==============================] - 4s 1s/step - loss: 0.2002 - dice_coefficient: 0.0000e+00 Epoch 5/5 3/3 [==============================] - 4s 1s/step - loss: 0.1948 - dice_coefficient: 0.0000e+00
<keras.callbacks.History at 0x7f68441bbbe0>
Does your issue got resolved? If so please help me in moving forward from that Zero dice's coefficient.Even I am doing it as my final year project.
It seems that the Dice loss have been wrongly implemented. It has been defined as -dice instead of 1-dice, therefore, it will try to minimize the Dice coefficient, when it should be doing the opposite. By using the implemented loss function it makes sense that Dice is decreasing the longer you train.
More specifically, you should change line 143 of model.py, from:
return - K.mean(2 * intersection / dn, axis=[0,1])
to
return 1 - K.mean(2 * intersection / dn, axis=[0,1])
I am not sure if there are more mistakes in this implementation.
1-dice_coefficient or -dice_coeffficient makes no difference for convergence 1-dice_coef just more familiar for monitoring as its value belong to [0, 1], not [-1, 0]
On Tue, Feb 25, 2020 at 7:15 PM Juan-Miguel Valverde < [email protected]> wrote:
It seems that the Dice loss have been wrong implemented. It has been defined as -dice instead of 1-dice, therefore, it will try to minimize the Dice coefficient, when it should be doing the opposite. By using the implemented loss function it makes sense that Dice is decreasing the longer you train.
More specifically, you should change line 143 of model.py, from: return - K.mean(2 * intersection / dn, axis=[0,1]) to return 1 - K.mean(2 * intersection / dn, axis=[0,1])
I am not sure if there are more mistakes in this implementation.
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/IAmSuyogJadhav/3d-mri-brain-tumor-segmentation-using-autoencoder-regularization/issues/38?email_source=notifications&email_token=AN2N6VRCU45EXTOADWEY24DREUOJDA5CNFSM4KXWD6GKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEM4ANIY#issuecomment-590874275, or unsubscribe https://github.com/notifications/unsubscribe-auth/AN2N6VQKIQI6WJKXEALEQJLREUOJDANCNFSM4KXWD6GA .
I have try from 5-200 epoch even though dice score range from 0.00-0.2 not more than that
On Tue, 25 Feb 2020, 12:29 sneh-debug, [email protected] wrote:
my dice score is 0.35-0.37
how did you do that ? can you help me on finding predicted value for it because I am very new to deep learning we can talk aobout this question
How many images and epoch you have used?
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/IAmSuyogJadhav/3d-mri-brain-tumor-segmentation-using-autoencoder-regularization/issues/38?email_source=notifications&email_token=AOLQVR2Q7VYSJKPAO7DU4FDRES6TVA5CNFSM4KXWD6GKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEM2ZMTA#issuecomment-590714444, or unsubscribe https://github.com/notifications/unsubscribe-auth/AOLQVR4E6HEPEW2274K5RVLRES6TVANCNFSM4KXWD6GA .
1-dice_coefficient or -dice_coeffficient makes no difference for convergence 1-dice_coef just more familiar for monitoring as its value belong to [0, 1], not [-1, 0]
True, although it is a bit unappealing to see a loss function that goes negative.
At the end I am going to try to implement this in Pytorch from scratch. I have seen that this implementation does not follow 100% the paper. Also, unfortunately, the original paper does not describe every single detail so one has to guess :(
I have try from 5-200 epoch even though dice score range from 0.00-0.2 not more than that … On Tue, 25 Feb 2020, 12:29 sneh-debug, @.***> wrote: my dice score is 0.35-0.37 how did you do that ? can you help me on finding predicted value for it because I am very new to deep learning we can talk aobout this question How many images and epoch you have used? — You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub <#38?email_source=notifications&email_token=AOLQVR2Q7VYSJKPAO7DU4FDRES6TVA5CNFSM4KXWD6GKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEM2ZMTA#issuecomment-590714444>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AOLQVR4E6HEPEW2274K5RVLRES6TVANCNFSM4KXWD6GA .
I have try from 5-200 epoch even though dice score range from 0.00-0.2 not more than that … On Tue, 25 Feb 2020, 12:29 sneh-debug, @.***> wrote: my dice score is 0.35-0.37 how did you do that ? can you help me on finding predicted value for it because I am very new to deep learning we can talk aobout this question How many images and epoch you have used? — You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub <#38?email_source=notifications&email_token=AOLQVR2Q7VYSJKPAO7DU4FDRES6TVA5CNFSM4KXWD6GKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEM2ZMTA#issuecomment-590714444>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AOLQVR4E6HEPEW2274K5RVLRES6TVANCNFSM4KXWD6GA .
for how many samples?
I have try from 5-200 epoch even though dice score range from 0.00-0.2 not more than that … On Tue, 25 Feb 2020, 12:29 sneh-debug, @.***> wrote: my dice score is 0.35-0.37 how did you do that ? can you help me on finding predicted value for it because I am very new to deep learning we can talk aobout this question How many images and epoch you have used? — You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub <#38?email_source=notifications&email_token=AOLQVR2Q7VYSJKPAO7DU4FDRES6TVA5CNFSM4KXWD6GKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEM2ZMTA#issuecomment-590714444>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AOLQVR4E6HEPEW2274K5RVLRES6TVANCNFSM4KXWD6GA .
I have try from 5-200 epoch even though dice score range from 0.00-0.2 not more than that … On Tue, 25 Feb 2020, 12:29 sneh-debug, @.***> wrote: my dice score is 0.35-0.37 how did you do that ? can you help me on finding predicted value for it because I am very new to deep learning we can talk aobout this question How many images and epoch you have used? — You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub <#38?email_source=notifications&email_token=AOLQVR2Q7VYSJKPAO7DU4FDRES6TVA5CNFSM4KXWD6GKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEM2ZMTA#issuecomment-590714444>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AOLQVR4E6HEPEW2274K5RVLRES6TVANCNFSM4KXWD6GA .
for how many samples?
100-200 sample i have taken and have try in range of 100-250 epochs but no use.
ok.. maybe there is something missing in the code. I am also working on it!
On Fri, Feb 28, 2020 at 8:56 PM bhagi369 [email protected] wrote:
I have try from 5-200 epoch even though dice score range from 0.00-0.2 not more than that … <#m_971442069090238746_> On Tue, 25 Feb 2020, 12:29 sneh-debug, @.***> wrote: my dice score is 0.35-0.37 how did you do that ? can you help me on finding predicted value for it because I am very new to deep learning we can talk aobout this question How many images and epoch you have used? — You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub <#38 https://github.com/IAmSuyogJadhav/3d-mri-brain-tumor-segmentation-using-autoencoder-regularization/issues/38?email_source=notifications&email_token=AOLQVR2Q7VYSJKPAO7DU4FDRES6TVA5CNFSM4KXWD6GKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEM2ZMTA#issuecomment-590714444>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AOLQVR4E6HEPEW2274K5RVLRES6TVANCNFSM4KXWD6GA .
I have try from 5-200 epoch even though dice score range from 0.00-0.2 not more than that … <#m_971442069090238746_> On Tue, 25 Feb 2020, 12:29 sneh-debug, @.***> wrote: my dice score is 0.35-0.37 how did you do that ? can you help me on finding predicted value for it because I am very new to deep learning we can talk aobout this question How many images and epoch you have used? — You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub <#38 https://github.com/IAmSuyogJadhav/3d-mri-brain-tumor-segmentation-using-autoencoder-regularization/issues/38?email_source=notifications&email_token=AOLQVR2Q7VYSJKPAO7DU4FDRES6TVA5CNFSM4KXWD6GKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEM2ZMTA#issuecomment-590714444>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AOLQVR4E6HEPEW2274K5RVLRES6TVANCNFSM4KXWD6GA .
for how many samples?
100-200 sample i have taken and have try in range of 100-250 epochs but no use.
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/IAmSuyogJadhav/3d-mri-brain-tumor-segmentation-using-autoencoder-regularization/issues/38?email_source=notifications&email_token=AN2N6VXBBRBHJHXWLGTPIQ3RFEULPA5CNFSM4KXWD6GKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOENI4SJA#issuecomment-592562468, or unsubscribe https://github.com/notifications/unsubscribe-auth/AN2N6VRVAZF2JZ62VC6EKVLRFEULPANCNFSM4KXWD6GA .
ok.. maybe there is something missing in the code. I am also working on it! … On Fri, Feb 28, 2020 at 8:56 PM bhagi369 @.> wrote: I have try from 5-200 epoch even though dice score range from 0.00-0.2 not more than that … <#m_971442069090238746_> On Tue, 25 Feb 2020, 12:29 sneh-debug, @.> wrote: my dice score is 0.35-0.37 how did you do that ? can you help me on finding predicted value for it because I am very new to deep learning we can talk aobout this question How many images and epoch you have used? — You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub <#38 <#38>?email_source=notifications&email_token=AOLQVR2Q7VYSJKPAO7DU4FDRES6TVA5CNFSM4KXWD6GKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEM2ZMTA#issuecomment-590714444>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AOLQVR4E6HEPEW2274K5RVLRES6TVANCNFSM4KXWD6GA . I have try from 5-200 epoch even though dice score range from 0.00-0.2 not more than that … <#m_971442069090238746_> On Tue, 25 Feb 2020, 12:29 sneh-debug, @.***> wrote: my dice score is 0.35-0.37 how did you do that ? can you help me on finding predicted value for it because I am very new to deep learning we can talk aobout this question How many images and epoch you have used? — You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub <#38 <#38>?email_source=notifications&email_token=AOLQVR2Q7VYSJKPAO7DU4FDRES6TVA5CNFSM4KXWD6GKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEM2ZMTA#issuecomment-590714444>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AOLQVR4E6HEPEW2274K5RVLRES6TVANCNFSM4KXWD6GA . for how many samples? 100-200 sample i have taken and have try in range of 100-250 epochs but no use. — You are receiving this because you commented. Reply to this email directly, view it on GitHub <#38?email_source=notifications&email_token=AN2N6VXBBRBHJHXWLGTPIQ3RFEULPA5CNFSM4KXWD6GKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOENI4SJA#issuecomment-592562468>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AN2N6VRVAZF2JZ62VC6EKVLRFEULPANCNFSM4KXWD6GA .
but i have change nothing except splitting data into training and testing
ok.. maybe there is something missing in the code. I am also working on it! … On Fri, Feb 28, 2020 at 8:56 PM bhagi369 @.**> wrote: I have try from 5-200 epoch even though dice score range from 0.00-0.2 not more than that … <#m_971442069090238746> On Tue, 25 Feb 2020, 12:29 sneh-debug, @.> wrote: my dice score is 0.35-0.37 how did you do that ? can you help me on finding predicted value for it because I am very new to deep learning we can talk aobout this question How many images and epoch you have used? — You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub <#38 <#38>?email_source=notifications&email_token=AOLQVR2Q7VYSJKPAO7DU4FDRES6TVA5CNFSM4KXWD6GKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEM2ZMTA#issuecomment-590714444>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AOLQVR4E6HEPEW2274K5RVLRES6TVANCNFSM4KXWD6GA . I have try from 5-200 epoch even though dice score range from 0.00-0.2 not more than that … <#m_971442069090238746> On Tue, 25 Feb 2020, 12:29 sneh-debug, @.*> wrote: my dice score is 0.35-0.37 how did you do that ? can you help me on finding predicted value for it because I am very new to deep learning we can talk aobout this question How many images and epoch you have used? — You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub <#38 <#38>?email_source=notifications&email_token=AOLQVR2Q7VYSJKPAO7DU4FDRES6TVA5CNFSM4KXWD6GKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEM2ZMTA#issuecomment-590714444>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AOLQVR4E6HEPEW2274K5RVLRES6TVANCNFSM4KXWD6GA . for how many samples? 100-200 sample i have taken and have try in range of 100-250 epochs but no use. — You are receiving this because you commented. Reply to this email directly, view it on GitHub <#38?email_source=notifications&email_token=AN2N6VXBBRBHJHXWLGTPIQ3RFEULPA5CNFSM4KXWD6GKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOENI4SJA#issuecomment-592562468>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AN2N6VRVAZF2JZ62VC6EKVLRFEULPANCNFSM4KXWD6GA .
but i have change nothing except splitting data into training and testing
@bhagi369 try for bigger patch size
@bhagi369 have you tried bigger patch size?
does anyone solve this problem?
Has anyone tried this (https://github.com/IAmSuyogJadhav/3d-mri-brain-tumor-segmentation-using-autoencoder-regularization/issues/4#issuecomment-618719803)? It was posted only recently. Any suggestions, @srivathsapv ?