otx.api.utils.anomaly_utils#
Detection Utils.
Functions
Create box annotation from the soft predictions. |
- otx.api.utils.anomaly_utils.create_detection_annotation_from_anomaly_heatmap(hard_prediction: ndarray, soft_prediction: ndarray, label_map: Dict[int, LabelEntity]) List[Annotation] [source]#
Create box annotation from the soft predictions.
- Parameters:
hard_prediction – hard prediction containing the final label index per pixel.
soft_prediction – soft prediction with shape
label_map – dictionary mapping labels to an index. It is assumed that the first item in the dictionary corresponds to the background label and will therefore be ignored.
- Returns:
List of annotations.