Code Monkey home page Code Monkey logo

Comments (6)

jakeret avatar jakeret commented on July 17, 2024

Not sure if my thought were correct back then, so any feedback is welcome.
The dice coefficient reaches 1 as best value (full aggreement). Hence, we want to reduce the difference between the current score and the best achiveable value:
lossFunction = 1 - currentScore

from tf_unet.

sagarhukkire avatar sagarhukkire commented on July 17, 2024

I agree with your point, I am convinced till dice coefficient calculation , but when batch contains two volumes one is label and one is image then what I should do ? Take mean or sum then subtract from 1.
currently I am getting following plot so i am little bit confused
loss_crossing1

from tf_unet.

jakeret avatar jakeret commented on July 17, 2024

This looks indeed a bit odd. (btw, you could use the Tensorboard so that you don't have to plot the metrics by yourself).

when batch contains two volumes one is label and one is image

not quite sure what you mean. Could you clarify a bit? What do you mean exaclty with batch and volume?

from tf_unet.

sagarhukkire avatar sagarhukkire commented on July 17, 2024

Ohh sorry for confusion I am using caffe and in caffe you pass data into batch ,volume is just what is size of your layer for ex (124 x 64 x 64) . But I am using dice loss layer, the code I am referring they are using

loss =np.sum(2*intersection/(union))

where as in your case its

loss = 1 - tf.reduce_mean(2 * intersection/ (union))

here is conflict, because the loss function is same but different approach to get loss value but with sum I am not getting desired results. Hope you got me now

from tf_unet.

jakeret avatar jakeret commented on July 17, 2024

I just pushed a new branch where I changed the computation of the dice coefficient.
I'm also using the predictions instead of the logits as suggested in #15 . I tested it with the toy example of tf_unet.

from tf_unet.

jakeret avatar jakeret commented on July 17, 2024

I merged the branch into master. Hope this resolves the issue

from tf_unet.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.