https://github.com/brainlesion/panoptica
panoptica -- instance-wise evaluation of 3D semantic and instance segmentation maps
Science Score: 36.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
○CITATION.cff file
-
✓codemeta.json file
Found codemeta.json file -
✓.zenodo.json file
Found .zenodo.json file -
○DOI references
-
✓Academic publication links
Links to: arxiv.org -
○Academic email domains
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (15.2%) to scientific vocabulary
Keywords
Repository
panoptica -- instance-wise evaluation of 3D semantic and instance segmentation maps
Basic Info
- Host: GitHub
- Owner: BrainLesion
- License: apache-2.0
- Language: Python
- Default Branch: main
- Homepage: https://arxiv.org/abs/2312.02608
- Size: 6.73 MB
Statistics
- Stars: 26
- Watchers: 1
- Forks: 7
- Open Issues: 27
- Releases: 59
Topics
Metadata Files
README.md
panoptica
Computing instance-wise segmentation quality metrics for 2D and 3D semantic- and instance segmentation maps.
Use Cases & Tutorials | Documentation
Features
The package provides three core modules:
- Instance Approximator: instance approximation algorithms to extract instances from semantic segmentation maps/model outputs.
- Instance Matcher: matches predicted instances with reference instances.
- Instance Evaluator: computes segmentation and detection quality metrics for pairs of predicted - and reference segmentation maps.

Installation
With a Python 3.10+ environment, you can install panoptica from pypi.org
sh
pip install panoptica
Or, alternatively, from conda:
sh
conda install -c conda-forge panoptica
Available Metrics
[!NOTE] Panoptica supports a large range of metrics.
An overview of the supported metrics and their formulas can be found here: panoptica/metrics.md
Use Cases & Tutorials
Minimal example
A minimal example of using panoptica could look e.g. like this (here with Matched Instances as Input): ```python from panoptica import InputType, Panoptica_Evaluator from panoptica.metrics import Metric
from auxiliary.io import read_image # feel free to use any other way to read nifti files
refmasks = readimage("reference.nii.gz") predmasks = readimage("prediction.nii.gz")
evaluator = PanopticaEvaluator( expectedinput=InputType.MATCHEDINSTANCE, decisionmetric=Metric.IOU, decision_threshold=0.5, )
result = evaluator.evaluate(predmasks, refmasks)["ungrouped"] ```
[!TIP] We provide Jupyter Notebook tutorials showcasing various use cases.
You can explore them here: BrainLesion/tutorials/panoptica
Semantic Segmentation Input

Although an instance-wise evaluation is highly relevant and desirable for many biomedical segmentation problems, they are still addressed as semantic segmentation problems due to the lack of appropriate instance labels.
This tutorial leverages all three modules of panoptica: instance approximation, -matching and -evaluation.
Unmatched Instances Input

It is a common issue that instance segmentation outputs feature good outlines but mismatched instance labels. For this case, the matcher module can be utilized to match instances and the evaluator to report metrics.
Matched Instances Input

If your predicted instances already match the reference instances, you can directly compute metrics using the evaluator module.
Matching Algorithm Example
Using Configs (saving and loading)
You can construct Panoptica_Evaluator (among many others) objects and save their arguments, so you can save project-specific configurations and use them later. It uses ruamel.yaml in a readable way.
Using Panoptica Aggregator
Using our Panoptica Aggregator, you can evaluate your data while the Aggregator takes care of writing the results into a .tsv file (threading-safe). This allows you to focus only on the important part, that is loading and iterating over your data. From the aggregator, you can immediately get a Panoptica Statistics object that yield you the statistics over your metrics as well as create nice figures for you.
Tutorial: TBD
Documentation
We provide a readthedocs documentation of our codebase here
Citation
[!IMPORTANT] If you use panoptica in your research, please cite it to support the development!
Kofler, F., Möller, H., Buchner, J. A., de la Rosa, E., Ezhov, I., Rosier, M., Mekki, I., Shit, S., Negwer, M., Al-Maskari, R., Ertürk, A., Vinayahalingam, S., Isensee, F., Pati, S., Rueckert, D., Kirschke, J. S., Ehrlich, S. K., Reinke, A., Menze, B., Wiestler, B., & Piraud, M. (2023). Panoptica -- instance-wise evaluation of 3D semantic and instance segmentation maps. arXiv preprint arXiv:2312.02608.
@misc{kofler2023panoptica,
title={Panoptica -- instance-wise evaluation of 3D semantic and instance segmentation maps},
author={Florian Kofler and Hendrik Möller and Josef A. Buchner and Ezequiel de la Rosa and Ivan Ezhov and Marcel Rosier and Isra Mekki and Suprosanna Shit and Moritz Negwer and Rami Al-Maskari and Ali Ertürk and Shankeeth Vinayahalingam and Fabian Isensee and Sarthak Pati and Daniel Rueckert and Jan S. Kirschke and Stefan K. Ehrlich and Annika Reinke and Bjoern Menze and Benedikt Wiestler and Marie Piraud},
year={2023},
eprint={2312.02608},
archivePrefix={arXiv},
primaryClass={cs.CV}
}
Contributing
We welcome all kinds of contributions from the community!
Some guides on extending panoptica can be found in panoptica/extending_panoptica.md
Reporting Bugs, Feature Requests and Questions
Please open a new issue here.
Owner
- Name: BrainLesion
- Login: BrainLesion
- Kind: organization
- Repositories: 1
- Profile: https://github.com/BrainLesion
GitHub Events
Total
- Create event: 32
- Release event: 9
- Issues event: 62
- Watch event: 4
- Delete event: 18
- Member event: 1
- Issue comment event: 193
- Push event: 80
- Pull request review comment event: 139
- Pull request review event: 145
- Pull request event: 50
- Fork event: 2
Last Year
- Create event: 32
- Release event: 9
- Issues event: 62
- Watch event: 4
- Delete event: 18
- Member event: 1
- Issue comment event: 193
- Push event: 80
- Pull request review comment event: 139
- Pull request review event: 145
- Pull request event: 50
- Fork event: 2
Issues and Pull Requests
Last synced: 6 months ago
All Time
- Total issues: 30
- Total pull requests: 20
- Average time to close issues: 20 days
- Average time to close pull requests: 2 days
- Total issue authors: 9
- Total pull request authors: 3
- Average comments per issue: 0.87
- Average comments per pull request: 4.0
- Merged pull requests: 15
- Bot issues: 0
- Bot pull requests: 0
Past Year
- Issues: 30
- Pull requests: 20
- Average time to close issues: 20 days
- Average time to close pull requests: 2 days
- Issue authors: 9
- Pull request authors: 3
- Average comments per issue: 0.87
- Average comments per pull request: 4.0
- Merged pull requests: 15
- Bot issues: 0
- Bot pull requests: 0
Top Authors
Issue Authors
- Hendrik-code (21)
- neuronflow (18)
- aymuos15 (12)
- MarcelRosier (5)
- sarthakpati (4)
- ogencoglu (3)
- JosefBuchner (3)
- evamariie (1)
- ai-idt (1)
- scap3yvt (1)
Pull Request Authors
- Hendrik-code (37)
- MarcelRosier (9)
- neuronflow (6)
- sarthakpati (5)
- aymuos15 (3)
- robert-graf (1)
Top Labels
Issue Labels
Pull Request Labels
Packages
- Total packages: 1
-
Total downloads:
- pypi 7,575 last-month
- Total dependent packages: 0
- Total dependent repositories: 1
- Total versions: 76
- Total maintainers: 2
pypi.org: panoptica
Panoptic Quality (PQ) computation for binary masks.
- Homepage: https://github.com/BrainLesion/panoptica
- Documentation: https://panoptica.readthedocs.io/
- License: apache-2.0
-
Latest release: 1.5.1
published 6 months ago
Rankings
Maintainers (2)
Dependencies
- pytest ^6.2.5 develop
- pytest-cov ^3.0.0 develop
- pytest-mock ^3.6.0 develop
- connected-components-3d ^3.12.3
- numpy ^1.20.0
- python ^3.8
- scipy ^1.7.0
- actions/checkout v3 composite
- actions/setup-python v4 composite
- actions/checkout v3 composite
- actions/setup-python v3 composite