How do I get the class name of a prediction during inference? #1951
-
The below code is straigh-forward in determining the score and label (True or False, i.e Normal or Abnormal), but how do I determine what class that image is? Example, if the image was a class "bottle" or a "hazelnut", and if it was indeed abnormal, if the abnormality was "broken" or "cut", etc...
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
You train a model for every class separately (unless it is zero-shot WinCLIP), so it can be done only manually by using the
As far as I know, existing anomaly detection models don't have such ability, they calculate just a score, which shows how normal/abnormal the image is. |
Beta Was this translation helpful? Give feedback.
You train a model for every class separately (unless it is zero-shot WinCLIP), so it can be done only manually by using the
path
variable in theOpenVINOInferencer
in your code, or in the config file. Hopefully that makes sense.As far as I know, existing anomaly detection models don't have such ability, they calculate just a score, which shows how normal/abnormal the image is.