metrics for evaluating lesion segmentations
Project description
lesion-metrics
metrics for evaluating lesion segmentations
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
Alternatively, you can 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 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.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
lesion_metrics-0.1.0.tar.gz
(14.7 kB
view hashes)
Built Distribution
Close
Hashes for lesion_metrics-0.1.0-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6193d412baf0cb93226bcea11c36507abc4cbd2cf2eae9eddd9c024f1fb45d84 |
|
MD5 | ce5e37c7abae29c6b3a3997723ae9921 |
|
BLAKE2b-256 | c97448068ab6200d607bd6f66afb4d7b7bbac0d37cb9f80490adcd77358a9554 |