Prints non-zero classes

Signed-off-by: Jim Martens <github@2martens.de>
This commit is contained in:
2019-06-03 10:32:26 +02:00
parent 225d0307eb
commit 9c3e436579

View File

@ -272,8 +272,7 @@ def _get_observations(detections: Sequence[Sequence[np.ndarray]]) -> List[List[n
detections_image = np.asarray(detections[i]) detections_image = np.asarray(detections[i])
class_ids = np.argmax(detections_image[:, :-12], class_ids = np.argmax(detections_image[:, :-12],
axis=-1) axis=-1)
class_preds = detections_image[:, 0] print(np.nonzero(class_ids[:]))
print(class_preds)
detections_image = detections_image[np.nonzero(class_ids[:])] detections_image = detections_image[np.nonzero(class_ids[:])]
print(detections_image.shape) print(detections_image.shape)
overlaps = bounding_box_utils.iou(detections_image[:, -12:-8], overlaps = bounding_box_utils.iou(detections_image[:, -12:-8],