Skip to content

feat: Runtime optimizations for MultiLabelConfusionMatrix#175

Merged
nikos-livathinos merged 4 commits intomainfrom
nli/pixel_eval_optimisations
Dec 2, 2025
Merged

feat: Runtime optimizations for MultiLabelConfusionMatrix#175
nikos-livathinos merged 4 commits intomainfrom
nli/pixel_eval_optimisations

Conversation

@nikos-livathinos
Copy link
Member

Improve the runtime execution of the pixel-wise layout evaluations by compressing the binary representations given in the input of the MultiLabelConfusionMatrix.compute_confusion_matrix().

The idea is:

  1. Get element-wise pairs from the binary representations of gt and preds.
  2. Find the unique pairs and the counts of each pair.
  3. Compute the contributions of each unique binary pair to the final confusion matrix (no change to the prior implementation).
  4. Multiply 3 by the weight (count) of the pair.

This compression technique significantly reduces the computational load, since most GT–prediction pairs repeat.

…ing the binary representation

given in the input of the compute_confusion_matrix().

Signed-off-by: Nikos Livathinos <nli@zurich.ibm.com>
@nikos-livathinos nikos-livathinos self-assigned this Nov 26, 2025
@nikos-livathinos nikos-livathinos marked this pull request as draft November 26, 2025 15:59
@github-actions
Copy link
Contributor

github-actions bot commented Nov 26, 2025

DCO Check Passed

Thanks @nikos-livathinos, all your commits are properly signed off. 🎉

@mergify
Copy link

mergify bot commented Nov 26, 2025

Merge Protections

Your pull request matches the following merge protections and will not be merged until they are valid.

🟢 Enforce conventional commit

Wonderful, this rule succeeded.

Make sure that we follow https://www.conventionalcommits.org/en/v1.0.0/

  • title ~= ^(fix|feat|docs|style|refactor|perf|test|build|ci|chore|revert)(?:\(.+\))?(!)?:

Signed-off-by: Nikos Livathinos <nli@zurich.ibm.com>
@nikos-livathinos nikos-livathinos marked this pull request as ready for review November 28, 2025 10:44
@nikos-livathinos nikos-livathinos merged commit 5084a4d into main Dec 2, 2025
10 checks passed
@nikos-livathinos nikos-livathinos deleted the nli/pixel_eval_optimisations branch December 2, 2025 09:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants