-
Notifications
You must be signed in to change notification settings - Fork 1k
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 pin_labels
attribute for image_diff
comparison method
#17866
Add pin_labels
attribute for image_diff
comparison method
#17866
Conversation
Before, objects could correspond to objects listed in `pin_labels` even if the label was different. Now, objects listed in `pin_labels` are prevented from being the corresponding objects of objects with different labels. This is overly more consistent and intuitive.
lib/galaxy/tool_util/parser/util.py
Outdated
@@ -5,6 +5,7 @@ | |||
|
|||
DEFAULT_METRIC = "mae" | |||
DEFAULT_EPS = 0.01 | |||
DEFAULT_PIN_LABELS = "" |
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.
An empty string as the default value seems odd, is there a problem with making that None ?
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.
Right. Fixed that in 8515eed.
This PR was merged without a "kind/" label, please correct. |
…f_iou/upstream Add `pin_labels` attribute for `image_diff` comparison method
In #17556 we had introduced the
image_diff
comparison method for output verification, which supports different metrics for quantification of the image differences.The
iou
metric is designated for verification of label maps (images where the values correspond to labels of image regions). Usually the particular label values are interchangeable and only required to be distinct in order to be able to distinguish the differently labeled image regions. This fact is taken into account by theiou
metric, which performs a pairwise comparison of uniquely labeled image regions, where pairs of corresponding regions are determined by maximizing the IoU.However, there also often are cases where specific label values are not interchangeable. The most prominent example are segmentation masks, where the image background is canonically labeled by 0 or -1, but the label values of the individual objects still are interchangeable. To also take such use cases into account, this PR adds the
pin_labels
attribute:The
pin_labels
attribute can be used to specify one or more labels, which are not interchangeable. For image regions labeled with those label values, the correspondences are established not by maximization of the IoU, but according to the label value itself.How to test the changes?
(Select all options that apply)
License