Skip to content
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

Open
pjl54 opened this issue Jun 7, 2018 · 5 comments
Open

Add option to perform analysis only within annotated region #115

pjl54 opened this issue Jun 7, 2018 · 5 comments
Assignees
Labels
enhancement New feature or request Priority: High

Comments

@pjl54
Copy link
Contributor

pjl54 commented Jun 7, 2018

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.

@choosehappy
Copy link
Owner

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?

@choosehappy choosehappy added the enhancement New feature or request label Jun 8, 2018
@pjl54
Copy link
Contributor Author

pjl54 commented Jun 8, 2018

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.

@choosehappy choosehappy self-assigned this Jun 8, 2018
@choosehappy
Copy link
Owner

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

@pjl54
Copy link
Contributor Author

pjl54 commented Jun 8, 2018

Yeah sure, sounds educational.

@choosehappy
Copy link
Owner

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 :)

@choosehappy choosehappy reopened this Jul 18, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request Priority: High
Projects
None yet
Development

No branches or pull requests

2 participants