Fixed elimination of background boxes

Signed-off-by: Jim Martens <github@2martens.de>
This commit is contained in:
2019-05-30 14:46:18 +02:00
parent 9544d5d3df
commit a838dd6a1b

View File

@ -272,7 +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)
detections_image = detections_image[class_ids != 0] 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],
detections_image[:, -12:-8], detections_image[:, -12:-8],