ultrasound-nerve-segmentation icon indicating copy to clipboard operation
ultrasound-nerve-segmentation copied to clipboard

accuracy exceed 1.8000

Open AloshkaD opened this issue 8 years ago • 8 comments
trafficstars

@jocicmarko Thank you for sharing your implementation.

I'm using the model for training on 10000+ rgb images and the dice-coef exceeds 1.8000 (loss is obviously negative of that number). Shouldn't 1 be considered as the maximum value can be achieved for the accuracy? Appreciate your thoughts on that.

AloshkaD avatar Aug 11 '17 14:08 AloshkaD

Same issue, my dice coefficient seems to exceed 1 from time to time. Seems to be related to the batch size

luckustus avatar Aug 16 '17 14:08 luckustus

Before I investigate this further, can you provide me some details?

  • Do you still use sigmoid as an activation function?
  • Did you make any changes to outputs? I.e. more output classes instead of binary
  • Did you make sure you scaled your ground truth values to [0,1]

jocicmarko avatar Aug 16 '17 23:08 jocicmarko

Yes, sigmoid. Output is binary and the ground truth values are 0 and 1. THe only thing that I am doing differently is feeding the data. I am using a data generator that produces arrays of shape (batch_size,height, width,channels) and I am using TF backend:

model.fit_generator(DataGenerator(img_list,,batch_size) ,steps_per_epoch = 570,epochs = 50)

luckustus avatar Aug 17 '17 07:08 luckustus

Did anyone solve this problem? When I apply this model for different dataset, same issue happened. In my case, I don't use data generator for implementing.

AK-mocha avatar Sep 27 '17 02:09 AK-mocha

Most likely something is wrong with your input that you provide. I don't remember exactly what the issue was but I fixed it by fixing the input.

luckustus avatar Sep 27 '17 10:09 luckustus

@luckustus I found easy careless mistakes which made mask input [0-255]. Now it works well. Thanks.

AK-mocha avatar Sep 29 '17 03:09 AK-mocha

@akirakitamura19 is that a normalization layer that you are talking about?

AloshkaD avatar Oct 24 '17 18:10 AloshkaD

@AloshkaD Yes, it is. Just make sure that values of train and train_make are [0 - 1].

AK-mocha avatar Oct 24 '17 21:10 AK-mocha