feat: Add Error Analysis tab for semantic segmentation#550
Conversation
|
Hi @dpascualhe and @SakhinetiPraveena , I have raised this pull request for the Error Analysis module. Looking forward to your thoughts. Thank you! |
|
Hi @YUVAN0907 , thanks for raising your PR! First of all, I'll clarify that we won't merge this PR as it overlaps with our intended GSoC project. Nonetheless, if you want feedback, I'd say that the main issue with this proposal is that you are not using our metrics factory at all. Even if your implementation is independent from our usual evaluation workflow, you can still use SegmentationMetricsFactory to get some stats. |
Thank you for reviewing my PR and for the clarification. I understand the concern regarding the overlap with the planned GSoC project and the decision not to merge it. I also appreciate your feedback about not utilizing the existing metrics pipeline. You’re right, I didn’t integrate the implementation with the "SegmentationMetricsFactory", as I initially approached it as a standalone evaluation workflow. However, I see now that aligning with the existing metrics factory would make the implementation more consistent with the project’s architecture and reusable within the framework. I’ll take this into account and explore how I can adapt my approach to leverage "SegmentationMetricsFactory" for computing the required metrics. Thanks again for your guidance😄. Best regards, |
|
Hi @dpascualhe, I have updated the Error Analysis feature based on your feedback by integrating the existing SegmentationMetrics from the codebase, aligning it with the current evaluation pipeline. Could you please take a look and share your suggestions?🙌🏻 Thanks😄. Best regards, |
4342534 to
faba9e1
Compare
|
Hi @dpascualhe @SakhinetiPraveena I’ve updated the implementation based on your feedback by integrating the existing SegmentationMetrics and aligning it with the current evaluation pipeline. I also resolved several CI and pytest-related issues (dependency sync and test compatibility), and all checks are now passing. No new PR is needed , the updates are pushed to the same branch. I would appreciate any further feedback or suggestions. Thanks. Best regards, |




Summary
This PR introduces a new "Error Analysis" tab to the PerceptionMetrics GUI.
It provides an interactive way to compare ground-truth and predicted segmentation masks at a pixel level — without requiring model inference to be re-run.
The implementation is modular:
tabs/error_analysis.py,utils/error_utils.py)app.py(3 lines)No existing tabs, sidebar logic, or session state are modified.
Motivation
The current GUI supports dataset exploration, inference, and evaluation metrics, but lacks a way to visually inspect where a model fails on a specific image.
In practical segmentation workflows, it is important to:
This feature addresses that gap by enabling direct pixel-level inspection using saved prediction masks.
Changes
New files
utils/error_utils.pytabs/error_analysis.pyModified files
app.pyFeature overview
Inputs
All inputs are placed in the main panel to avoid interfering with existing sidebar functionality.
Outputs
Summary metrics
Visual comparison
Overlay view
Class-wise accuracy
Screenshots
Visual Comparison (GT vs Prediction vs Error Map)
Class-wise Accuracy
Demo
Demo video: https://youtu.be/L0MEw628Kko?si=mUzkr9NYOWuEMR8t
Design decisions
No deep learning dependencies
This module operates on already-generated mask files and uses only NumPy + Pillow.
Keeping it independent of PyTorch/TensorFlow:
Future work
This module is designed to be easily extendable. Possible future improvements include:
I would appreciate any feedback, and I’m happy to make further improvements based on your suggestions. 🙌