Removed background detections before iou for observations

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

View File

@ -270,6 +270,9 @@ def _get_observations(detections: Sequence[Sequence[np.ndarray]]) -> List[List[n
for i in range(batch_size):
print(f"{i}th batch element")
detections_image = np.asarray(detections[i])
class_ids = np.argmax(detections_image[:, :-12],
axis=-1)
detections_image = detections_image[class_ids != 0]
print(detections_image.shape)
overlaps = bounding_box_utils.iou(detections_image[:, -12:-8],
detections_image[:, -12:-8],