histocartography.metrics.metrics module¶
Summary¶
Classes:
Mean class IoU |
|
Mean class IoU |
|
Functions:
Faster computation of confusion matrix according to https://stackoverflow.com/a/59089379 |
- fast_confusion_matrix(y_true: Union[numpy.ndarray, torch.Tensor], y_pred: Union[numpy.ndarray, torch.Tensor], nr_classes: int)[source]¶
Faster computation of confusion matrix according to https://stackoverflow.com/a/59089379
- Parameters
y_true (Union[np.ndarray, torch.Tensor]) – Ground truth (1D)
y_pred (Union[np.ndarray, torch.Tensor]) – Prediction (1D)
nr_classes (int) – Number of classes
- Returns
Confusion matrix of shape nr_classes x nr_classes
- Return type
np.ndarray
- class Dice(**kwargs)[source]¶
Bases:
histocartography.metrics.metrics.ConfusionMatrixMetric
- property logs_model¶
- property is_per_class¶
- class IoU(nr_classes: int, background_label: int, **kwargs)[source]¶
Bases:
histocartography.metrics.metrics.ConfusionMatrixMetric
- property logs_model¶
- property is_per_class¶
- class MeanIoU(nr_classes: int, background_label: int, **kwargs)[source]¶
Bases:
histocartography.metrics.metrics.IoU
Mean class IoU
- property is_per_class¶
- class MeanDice(**kwargs)[source]¶
Bases:
histocartography.metrics.metrics.Dice
Mean class IoU
- property is_per_class¶
Reference¶
If you use histocartography in your projects, please cite the following:
@inproceedings{pati2021,
title = {Hierarchical Graph Representations for Digital Pathology},
author = {Pushpak Pati, Guillaume Jaume, Antonio Foncubierta, Florinda Feroce, Anna Maria Anniciello, Giosuè Scognamiglio, Nadia Brancati, Maryse Fiche, Estelle Dubruc, Daniel Riccio, Maurizio Di Bonito, Giuseppe De Pietro, Gerardo Botti, Jean-Philippe Thiran, Maria Frucci, Orcun Goksel, Maria Gabrani},
booktitle = {https://arxiv.org/pdf/2102.11057},
year = {2021}
}