Output Details of Exported Model #2312
-
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
I believe that the model exported by Engine is what's contained inside anomalib/src/anomalib/models/image/patchcore/torch_model.py Lines 104 to 106 in f473df8 So your assumption about returned values is correct, one is anomaly map, the other is anomaly score. Some models like padim only return anomaly map, in which case the anomaly score is calculated as Since you want to determine whether the score indicates normal or anomalous image, you'll need to threshold the anomaly score somehow. Anomalib calculates the threshold which yields the best F1 score on val set (MaxF1) so you can use that threshold which should be saved inside the Also check out the OpenVino inferene python script (that also covers onnx inference), and the OpenVino inferencer class. |
Beta Was this translation helpful? Give feedback.
I believe that the model exported by Engine is what's contained inside
torch_model
of specific architecture. So for PatchCore you can see the forward code insidetorch_model
here:anomalib/src/anomalib/models/image/patchcore/torch_model.py
Lines 104 to 106 in f473df8
So your assumption about returned values is correct, one is anomaly map, the other is anomaly score. Some models like padim only return anomaly map, in which case the anomaly score is calculated as
max(anomaly_map)
.Since you want to determine whether the score indicates normal or anomalous image, you'll need to threshold…