rezazad68 / BCDU-Net

BCDU-Net : Medical Image Segmentation
719 stars 265 forks source link

training #1

Closed xihuanliuliu closed 5 years ago

xihuanliuliu commented 5 years ago

i use the DRIVE dataset ,but why my training result value is the same。 ################################################# Epoch 1/50 160000/160000 [==============================] - 10087s 63ms/step - loss: 0.3565 - acc: 0.8929 - val_loss: 0.3562 - val_acc: 0.8855 Epoch 2/50 160000/160000 [==============================] - 11281s 71ms/step - loss: 0.3405 - acc: 0.8929 - val_loss: 0.3562 - val_acc: 0.8855 Epoch 3/50 160000/160000 [==============================] - 12124s 76ms/step - loss: 0.3405 - acc: 0.8929 - val_loss: 0.3561 - val_acc: 0.8855 Epoch 4/50 160000/160000 [==============================] - 15388s 96ms/step - loss: 0.3405 - acc: 0.8929 - val_loss: 0.3562 - val_acc: 0.8855 Epoch 5/50 160000/160000 [==============================] - 19182s 120ms/step - loss: 0.3405 - acc: 0.8929 - val_loss: 0.3563 - val_acc: 0.8855

######################

xihuanliuliu commented 5 years ago

How much time did you train the DRIVE datasets?

rezazad68 commented 5 years ago

Dear Xihuanliuliu,

Did you change any part of the code? It looks like your model does not train at all.

I trained this model several times. There is no problem with the training process. Let me know, so I can help you

rezazad68 commented 5 years ago

image

I just downloaded the code from this GitHub page and executed the training process. It works well without any problem and as you can see it decreases the loss value during the training process. Please download the original code again and run it. If you got any problem write to me here.

Best

xihuanliuliu commented 5 years ago

Dear rezazad68, Thank you very much for your contribution. i do not change any part of the code , now I use the lung dataset.(the code show that the model only ues 3d images) .This test result is very good, but it does not reach the metric of your paper? I just want to ask if this is my training problem or the code of you provided does not reach the metric of the paper. (I don't doubt your contribution, just ask for advice).

rezazad68 commented 5 years ago

Hi,

First of all, try to train the model on Drive dataset to make sure your loss value decreases in each iteration since your initial experiment showed that your model does not train at all. The model works well on any dataset such as lung or skin and should produce the paper results. My suggestion for you: 1- Train the model on Drive dataset for 2 epochs and check the loss value 2- if the loss value does not decrease, there should be a logical problem 3- if you are using Python version 2, you need to add from future import division to the top of each code to make sure mask or data normalization does not change all the value to zero. 4- in "train_retina.py" before the training check the mask and train samples to make sure they are not an all-zero file (because of the normalization process). you can simply add the print(np.sum(np.sum(np.sum(patches_masks_train[0:15])))) inline 31 to check it. if the result is zero then you should add from future import division in top of each code or check the reason.

Let me know Best

xihuanliuliu commented 5 years ago

Dear rezazad68, The model works well. Thank you very much for your contribution.

rezazad68 commented 5 years ago

Thanks for the update. If you solved the problem with adding "from future import division" let me know, so I can update the code. Thanks

xihuanliuliu commented 5 years ago

I am using Python version 3.5,so I do not add future model.

rezazad68 commented 5 years ago

Thanks. I am closing this issue since the problem solved.