Save Precision graph of a model #1627
-
Hello, I'm using Anomalib for a school project and would like to use a precision curve of a patchcore model in a report, is there a way to save it? Thanks in advance. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Hello. Plotting is not immediately implemented for all metrics in Anomalib, but I believe you can implement precision plotting without much trouble. As you can see inside MetricVisulizerCallback for plot to be generated, metric needs |
Beta Was this translation helpful? Give feedback.
Hello. Plotting is not immediately implemented for all metrics in Anomalib, but I believe you can implement precision plotting without much trouble. As you can see inside MetricVisulizerCallback for plot to be generated, metric needs
generate_figure
method. So you could implement a wrapper for Torchmetrics PrecisionRecallCurve and put it inside/src/anomalib/utils/metrics
. For implementation, you can refer to aupr implemntation. You will most likely need PrecisionRecallCurve from torchemtrics to get precision for all thresholds.