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 lesion-wise metrics #50

Closed
wants to merge 2 commits into from
Closed

Conversation

valosekj
Copy link
Member

@valosekj valosekj commented May 31, 2024

This PR adds the lesion-wise metrics (lesion_ppv, lesion_sensitivity, and lesion_f1_score) proposed in ivadomed/MetricsReloaded#3 to our our compute_metrics/compute_metrics_reloaded.py script.

To test the branch, please follow our installation instructions here and then you can run our compute_metrics/compute_metrics_reloaded.py script on your images, for example:

python compute_metrics_reloaded.py
-reference sub-001_T2w_gt.nii.gz 
-prediction sub-001_T2w_prediction.nii.gz 
-metrics lesion_ppv lesion_sensitivity lesion_f1_score

Please also review unit tests in tests/test_compute_metrics_reloaded.py for different scenarios (empty gt and non-empty pred, non-empty gt and non-empty pred with partial overlap, etc.).

Tagging @naga-karthik, @plbenveniste, and @Nilser3, who work with lesions and thus this PR is super relevant to them.

Resolves: #49

…diction

Context: the lesion PPV computation for this case was fixed in ivadomed/MetricsReloaded@ce172b5
@valosekj
Copy link
Member Author

valosekj commented Jun 4, 2024

@naga-karthik I fixed lesion PPV to 0.0 in case of non-empty reference and empty prediction in ad23622. The unit tests are now passing!

@valosekj
Copy link
Member Author

valosekj commented Jun 6, 2024

The compute_metrics_reloaded.py script has been moved to https://github.com/ivadomed/MetricsReloaded in ivadomed/MetricsReloaded#5 --> not merging

@valosekj valosekj closed this Jun 6, 2024
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

Successfully merging this pull request may close these issues.

Add lesion-wise metrics to compute_metrics_reloaded.py
1 participant