-
Notifications
You must be signed in to change notification settings - Fork 106
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add option to perform analysis only within annotated region #115
Comments
the metrics are a bit wonky, i think you've made a good case for at least adding the option of reporting relative difference between input and output masks of a process, versus as a fraction of the whole image. essentially the "limit_to_mask", makes sure the computation is performed only on the currently "artifact free" regions, yet i'm pretty sure the % reported are based on total # of pixels, and not total # of pixels in the mask. if one uses the flag, i think they'd likely expect both the computation and the result to be limited... for the annotation, i think if the aforementioned were implemented, and we had a new module called "limit mask to annotation" which loads the annotation as the first step in the pipeline, and all downstream metrics were reported as relative values to the current mask, it'd come pretty close to addressing your needs without any additional code. maybe? what do you think? |
I think it's more useful to always have statistics reported as relative difference of input/output mask, less useful to have statistics reported as a percentage of total pixels in the image. It seems like the exact same numbers should be returned for image X and image X with white padding on the edges. Especially if you wanted to do something like a comparison across scanners where one scanner chooses to scan slightly more white space around the tissue. I think the most intuitive number to report is the percentage of the tissue area removed by a mask, since the relative difference of the input/output masks will change depending on the order the pipeline is run in. But that'd require running every detector on every tissue pixel which would have a speed penalty. A "limit mask to annotation" option would be exactly what I'm looking for, as long as all statistics were reported as a percentage of that mask. |
i'm okay with modifying the results such that the percent reported is relative to the current mask. i'll take this task. do you want to take a stab at writing the "limit to annotation" module". i'd be surprised if its more tahn 10 lines. i can guide you through it if you have any problems |
Yeah sure, sounds educational. |
mask statistics can now be computed either at the absolute level (pixels), relative to image (pixels_removed/image_size, or relative to previous mask (currentmask & !previous_mask/ currentmask), the latter of which is likely the most useful. mask_statistics in [BaseImage] is a global parameter, but each additional module can be over written with a local version. @pjl54, all ready for your annotation module :) |
For my use case, I only care about image quality within an annotated region. It would be useful for me if all statistics were reported as percentage of the annotated region. If 20% of the total image area is blurry, that doesn't tell me whether the part of the image I'm interested in is blurry.
The text was updated successfully, but these errors were encountered: