Coder Social home page Coder Social logo

Comments (6)

ShuyueG avatar ShuyueG commented on May 21, 2024

Hi! How did you use the function, and what errors have you got? Please carefully read the annotations in the code. Note: the arrays AreaR and Dice should have the same length. For i-th case, AreaR(i) is the area ratio (see code comments for its computation) of objects in the image of i-th segmented ground truth (the binary label), Dice(i) is the Dice coefficient computed by using the i-th predicted segmentation result and its ground truth. bin_width depends on the distribution of AreaR.

To your second question, yes, the x-axis means the relative size = # of pixels of polyp / # of total pixels of the image.

from caranet.

hybdxxw avatar hybdxxw commented on May 21, 2024

Thanks for the reply.
I add these code into main.m , there are no errors, but the generated pic is just one straight line
[AreaR]=deal(zeros(1,imgNUM));
[r,c] = size(resmap);
AreaR(i) = sum(resmap(:))/(r*c);
dice_average(AreaR,threshold_Dic,0.05)

I also input just AreaR,threshold_Dic in the function for a test ,but the results is the same.

from caranet.

AngeLouCN avatar AngeLouCN commented on May 21, 2024

Hi, you don't need to add those code into main.m, because they are for different purposes. The matlab codes in fold eval are used to evaluate the segmentation results by 6 different measurement metrics. The dice_average are used to analyze the relationship between object size and dice accuracy.

from caranet.

hybdxxw avatar hybdxxw commented on May 21, 2024

Thanks for the reply.
But how can I input data and run dice_average ? For example, if I want to analyze the relationship between object size and dice accuracy in CVC-ClinicDB, does it means I need to get the dice for every picture in test dataset ,area ratio of objects in images one by one and Width of bins for taking average(bin_width depends on the distribution of AreaR, what does this means?Do I need compute or just input 0.05) ,and put them in arrays, then run dice_average in command window?
Thank you very much for giving me your valuable time for these questions!

from caranet.

ShuyueG avatar ShuyueG commented on May 21, 2024

Thanks for the reply. But how can I input data and run dice_average ? For example, if I want to analyze the relationship between object size and dice accuracy in CVC-ClinicDB, does it means I need to get the dice for every picture in test dataset ,area ratio of objects in images one by one and Width of bins for taking average --Yes, you're right.

(bin_width depends on the distribution of AreaR, what does this means?Do I need compute or just input 0.05)
-- no need to compute, just try 0.05 or other values. It depends on the range or density of the AreaRatio. The bin_width plays a role like the bin width when you draw a Histogram of the AreaRatio. It groups similar area ratios together and calculates their means.

,and put them in arrays, then run dice_average in command window? -- Yes, or put it in your codes; just like other Matlab functions.

from caranet.

MELSunny avatar MELSunny commented on May 21, 2024

dice average (mDice), please refer to the code from segmentation.
it sums the area of intersect and union, prediction (input), label(target) in all test images.
and then calculate (2 * total_intersection ) / (total_input + total_target)

https://github.com/open-mmlab/mmsegmentation/blob/master/mmseg/core/evaluation/metrics.py

#1

from caranet.

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.