Skip to content

small error in object number calculation in IoU part of evaluation.py #1

@SonjaAits

Description

@SonjaAits

The evaluation script (https://github.com/carpenterlab/2019_caicedo_cytometryA/blob/master/unet4nuclei/utils/evaluation.py) contains a step to calculate the number of objects:

# Count objects

true_objects = len(np.unique(ground_truth))

pred_objects = len(np.unique(prediction))

However, this will also include the background in the object count (it has the unique value 0).

To fix this change the lines to:

# Count objects

true_objects = len(np.unique(ground_truth)) - 1

pred_objects = len(np.unique(prediction)) - 1

Or is the background included here on purpose as it is removed from the analysis at a later step?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions