diff --git a/src/twomartens/masterthesis/ssd.py b/src/twomartens/masterthesis/ssd.py index 566ec3e..8bc7ac2 100644 --- a/src/twomartens/masterthesis/ssd.py +++ b/src/twomartens/masterthesis/ssd.py @@ -272,7 +272,7 @@ def _get_observations(detections: Sequence[Sequence[np.ndarray]]) -> List[List[n detections_image = np.asarray(detections[i]) class_ids = np.argmax(detections_image[:, :-12], axis=-1) - detections_image = detections_image[class_ids != 0] + detections_image = detections_image[np.nonzero(class_ids[:])] print(detections_image.shape) overlaps = bounding_box_utils.iou(detections_image[:, -12:-8], detections_image[:, -12:-8],