-
-
Notifications
You must be signed in to change notification settings - Fork 149
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
Fix long evaluation time on microscopy images #1081
Conversation
Pull Request Test Coverage Report for Build 2783521423Warning: This coverage report may be inaccurate.This pull request's base commit is no longer the HEAD commit of its target branch. This means it includes changes from outside the original pull request, including, potentially, unrelated coverage changes.
Details
💛 - Coveralls |
This PR is now ready for review. Expected behavior: With
With
Without any evaluation parameters:
|
metric_fns = [dice_score, | ||
multi_class_dice_score, | ||
precision_score, | ||
recall_score, | ||
specificity_score, | ||
intersection_over_union, | ||
accuracy_score] | ||
if task == "segmentation": | ||
if eval_params: | ||
object_detection_metrics = eval_params['object_detection_metrics'] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should use dict.get()
pattern to avoid invalid key error as upstream JSON is never fully validated.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
since the key 'object_detection_metrics' has already defined in 'config_default.json' file, so it wouldn't be invalid key error show up here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code has been reviewed, and test runed, should be 'good to merge'.
But have one concern about skipping the metrics of true positive and false detection rates. I feel TP and FN rates are the important for evaluate the image segmentation result. Maybe we should let the user has a choice of skipping only the Hausdorff score and skipping the TP FN as well. This can be addressed in a separate issue if need.
Checklist
GitHub
PR contents
Description
This PR aims to fix long evaluation time on large microscopy images with the axons and myelin segmentation task.
object_detection_metrics
param in theevaluation_parameters
of the config file.True
.True
, it computes lesions true positive and false detection rates + Hausdorff score at evaluation time.False
, those metrics are skipped (they are not appropriate for axon+myelin segmentation and would create the bottleneck when running evaluation on large images).False
, the "painted" predictions in thepred_masks
are also skipped since they are based on lesions true positive and false detection rates.Linked issues
Fixes #975