def draw_batch_proposals(pred_dict, display_anchor=True):
print("Batch proposals (background or foreground) (score is classification, blue = foreground, red = background, green = GT)")
print("This only displays the images on the batch (256). The number displayed is the classification score (green is > 0.5, red <= 0.5)")
print("{} are displayed".format("Anchors" if display_anchor else "Final proposals"))
scores = pred_dict["rpn_prediction"]["rpn_cls_prob"]
scores = scores[:, 1]
bbox_pred = pred_dict["rpn_prediction"]["rpn_bbox_pred"]