Exportable Code#
Exportable code for Anomaly tasks.
- class otx.algorithms.anomaly.adapters.anomalib.exportable_code.AnomalyBase(model_adapter, configuration=None, preload=False)#
Wrapper for anomaly tasks.
- classmethod parameters()#
Dictionary containing model parameters.
- class otx.algorithms.anomaly.adapters.anomalib.exportable_code.AnomalyClassification(model_adapter, configuration=None, preload=False)#
Wrapper for anomaly classification task.
- postprocess(outputs: Dict[str, ndarray], meta: Dict[str, Any]) float #
Resize the outputs of the model to original image size.
- Args:
outputs (Dict[str, np.ndarray]): Raw outputs of the model after
infer_sync
is called. meta (Dict[str, Any]): Metadata which contains values such as threshold, original image size.- Returns:
float: Normalized anomaly score
- class otx.algorithms.anomaly.adapters.anomalib.exportable_code.AnomalyDetection(model_adapter, configuration=None, preload=False)#
Wrapper for anomaly detection task.
- postprocess(outputs: Dict[str, ndarray], meta: Dict[str, Any]) ndarray #
Resize the outputs of the model to original image size.
- Args:
outputs (Dict[str, np.ndarray]): Raw outputs of the model after
infer_sync
is called. meta (Dict[str, Any]): Metadata which contains values such as threshold, original image size.- Returns:
np.ndarray: Detection Mask
- class otx.algorithms.anomaly.adapters.anomalib.exportable_code.AnomalySegmentation(model_adapter, configuration=None, preload=False)#
Wrapper for anomaly segmentation task.
- postprocess(outputs: Dict[str, ndarray], meta: Dict[str, Any]) ndarray #
Resize the outputs of the model to original image size.
- Args:
outputs (Dict[str, np.ndarray]): Raw outputs of the model after
infer_sync
is called. meta (Dict[str, Any]): Metadata which contains values such as threshold, original image size.- Returns:
np.ndarray: Segmentation Mask