Using TochMetrics for code simplification
See original GitHub issue🛠️ Proposed Refactor
We have been developing TorchMetrics to be a general-purpose metric and some domain-specific use-cases. In many cases, we have an exact mapping to scikit-learn with verification/testing to the reference metric for its correctness. The TM includes functional as well as nn.Module
versions and for the most/standard metrics, the only dependency is PyTorch (for the domain-specific metrics you need to install related extras).
Suggest a potential alternative/fix
WIth using TM metrics you may rely on the widely tested correctness (testing against good standard pycocotools
in multiple OS environments and all PyTorch versions above v1.4), and later you can use nn.Module
to leverage update and compute.
Moreover, the recent release v0.8 allows re-using/sharing common compete similar as you leverage confusion matrix.
Overall if you are fine with it, we are happy to draft a PR with a suggested change to verify in place the impact. If you have any questions, happy to follow up with me or @aniketmaurya
What I have quickly checked, all this segmentation_models_pytorch.metrics can be replaced by TM
Issue Analytics
- State:
- Created a year ago
- Reactions:7
- Comments:8 (1 by maintainers)
Hi @aniketmaurya Let’s try to intargate it, it could be a great feature!
Mind have look @@aniketmaurya ^^