Computing Dice Similarity Coefficient for a Volume?

6 views (last 30 days)
Hello,
I'm writing a paper outlining a pipeline for a whole-volume brain segmentation technique. I'm validating it against ground truth data using the DSC (among other metrics). The journal requires that the DSC be computed on a volume basis, and not slice-by-slice.
I was just wondering if anyone could elaborate on this? The only feedback that I have received is "add all 2D intersects together" and "divide by the summation of the union of all 2D images".
I'm just not clear on what this means. Thanks in advance!

Answers (1)

Hamoon
Hamoon on 17 Sep 2015
If your segmented output image and your reference image are 3 dimensional logical matrices do this:
common = (refSegment & outSegment);
a = sum(common(:));
b = sum(refSegment (:));
c = sum(outSegment(:));
Dice = 2*a/(b+c);
if you have different slices of 2 dimensional matrices, you can make 3 dimensional matrices with them and then do what I said before. If you don't want to do that, you can compute a , b , c for each slice using what I wrote above, and then let A be the sum of all "a" , B be the sum of all "b", and "C" be sum of all "c" for all slices. then dice metric will be:
Dice = 2*A/(B+C);
  2 Comments
Sabina Simonakova
Sabina Simonakova on 27 Apr 2020
Hi, Could you write a code for 2D images please? Thanks
Tangi
Tangi on 17 May 2022
dice_coef = dice(im1,im2);
*You need to have binary image for that

Sign in to comment.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!