metrics for evaluating lesion segmentations
Project description
lesion-metrics
Various metrics for evaluating lesion segmentations [1]
Free software: Apache Software License 2.0
Documentation: https://lesion-metrics.readthedocs.io.
Install
The easiest way to install the package is with:
pip install lesion-metrics
To install the dependencies of the CLI, install with:
pip install "lesion-metrics[cli]"
To install the dependencies for total lesion burden/volume computation (see lesion_metrics.volume), install with:
pip install "lesion-metrics[volume]"
You can also download the source and run:
python setup.py install
Basic Usage
You can generate a report of lesion metrics for a directory of predicted labels and truth labels with the CLI:
lesion-metrics -p predictions/ -t truth/ -o output.csv
Or you can import the metrics and run them on label images:
import nibabel as nib
from lesion_metrics.metrics import dice
pred = nib.load('pred_label.nii.gz').get_fdata()
truth = nib.load('truth_label.nii.gz').get_fdata()
dice_score = dice(pred, truth)
References
[1] Carass, Aaron, et al. “Longitudinal multiple sclerosis lesion segmentation: resource and challenge.” NeuroImage 148 (2017): 77-102.
History
0.1.10 (2021-12-09)
Add lesion count to report
Add helper metric calculator class
0.1.9 (2021-12-07)
Add per lesion metric report CLI for a prediction/truth segmentation pair
0.1.8 (2021-10-28)
Add more summary statistics to report
0.1.7 (2021-10-27)
Add segmentation volume to report and fix minor bugs
0.1.6 (2021-08-16)
Fix minor bug in IoU per lesion computation
0.1.5 (2021-08-16)
Make package compliant with mypy
Add lesion volume calculation
Add support for IoU threshold for LTPR and LFPR
0.1.4 (2021-07-14)
Fix type hints in volume correlation
Correct name of LFPR (lesion false positive rate) to LFDR (lesion false discovery rate)
0.1.3 (2021-06-07)
Fix correlation computation in CLI and other minor typos.
0.1.2 (2021-05-26)
Update code style to black and improve docs.
0.1.1 (2021-05-14)
Fix repo name.
0.1.0 (2021-05-14)
First release on PyPI.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for lesion_metrics-0.1.10-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6d75163e48f0a24f8f22e156dfb73ed3c7d944b221d81e31c97ddc23c9ab2810 |
|
MD5 | 7916773f84ddb60373b2e483b4a12c62 |
|
BLAKE2b-256 | b48f8030c61f9980491fbcc4cfbd6bd5fce1e2038a50fc1d0043696588145293 |