-
Notifications
You must be signed in to change notification settings - Fork 11
feat: Introduce the PixelLayoutEvaluator to produce confusion matrices for the multi-label layout analysis #173
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
nikos-livathinos
wants to merge
16
commits into
main
Choose a base branch
from
nli/pixel_layout_evaluation
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+1,768
−1
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Signed-off-by: Nikos Livathinos <nli@zurich.ibm.com>
Signed-off-by: Nikos Livathinos <nli@zurich.ibm.com>
Contributor
|
✅ DCO Check Passed Thanks @nikos-livathinos, all your commits are properly signed off. 🎉 |
Merge ProtectionsYour pull request matches the following merge protections and will not be merged until they are valid. 🔴 Require two reviewer for test updatesThis rule is failing.When test data is updated, we require two reviewers
🟢 Enforce conventional commitWonderful, this rule succeeded.Make sure that we follow https://www.conventionalcommits.org/en/v1.0.0/
|
…it test Signed-off-by: Nikos Livathinos <nli@zurich.ibm.com>
…cts between the PixelLayoutEvaluator and MultiLabelConfusionMatrix. Stabilize the outputs. Still need to work on save/export. Signed-off-by: Nikos Livathinos <nli@zurich.ibm.com>
Allow the pydantic types to serialize numpy arrays as lists. Integrate with main. Signed-off-by: Nikos Livathinos <nli@zurich.ibm.com>
…pixel_types.py Signed-off-by: Nikos Livathinos <nli@zurich.ibm.com>
…erated and excel export works. Additional testing of the API and CLI is needed Signed-off-by: Nikos Livathinos <nli@zurich.ibm.com>
Signed-off-by: Nikos Livathinos <nli@zurich.ibm.com>
Signed-off-by: Nikos Livathinos <nli@zurich.ibm.com>
…ns in the `predictor_info` field, not only the default ones. Signed-off-by: Nikos Livathinos <nli@zurich.ibm.com>
…del and add it in the reports Signed-off-by: Nikos Livathinos <nli@zurich.ibm.com>
… for the f1 scores of the pages with the full classes and the colapsed classes. Then use these fields in the visualisations to make histograms. Signed-off-by: Nikos Livathinos <nli@zurich.ibm.com>
PeterStaar-IBM
requested changes
Nov 14, 2025
Signed-off-by: Nikos Livathinos <nli@zurich.ibm.com>
Signed-off-by: Nikos Livathinos <nli@zurich.ibm.com>
Signed-off-by: Nikos Livathinos <nli@zurich.ibm.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
TL;DR
Detailed description
The
PixelLayoutEvaluatorcomputes confusion matrices for the multi-label layout analysis task at the pixel level.The produced confusion matrices contain fractional counts of pixels, where values on the main diagonal are correct predictions (gains) and values outside of the main diagonal are mis-predictions (penalties). An additional class for the background has been added. Precision, recall and F1 matrices can be easily computed out of the confusion matrix and finally we can extract vectors with precision, recall, f1 values per class. Such matrices/vectors can be computed at each level (page, document, benchmark).
The generated matrices are visualized as colorized excel reports that allow to easily investigate the performance of the layout model and answer questions like:
Given that the method applies at a pixel level it is important to have a fast implementation. This is a fully vectorized implementation on top of numpy.
The method is inspired by the paper: https://csitcp.org/paper/10/108csit01.pdf