Giter Site home page Giter Site logo

lesion-metrics's Introduction

lesion-metrics

Documentation Status

Various metrics for evaluating lesion segmentations [1]

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]"

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.

lesion-metrics's People

Contributors

jcreinhold avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

Forkers

pubec

lesion-metrics's Issues

Update pymedio imports

v0.2.0 of pymedio changed the name of the import to pymedio from medio; update this package.

Improve contributing information

๐Ÿ“š Documentation

The contributing information is out-of-date and generally lacking. It needs to be updated so it's easier to contribute to this project.

Add lesion count to metrics

๐Ÿš€ Feature

Add number of lesions as a column in the lesion-metrics report

Motivation

Lesion count is an important metric to understand the global structure of lesions in the segmentation mask.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.