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

incorrect object count #2

Open
SonjaAits opened this issue Dec 21, 2022 · 0 comments
Open

incorrect object count #2

SonjaAits opened this issue Dec 21, 2022 · 0 comments

Comments

@SonjaAits
Copy link
Contributor

The evaluation script (originally from 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant