Skip to content

Instantly share code, notes, and snippets.

Eric A. Scuccimarra escuccim

View GitHub Profile
@escuccim
escuccim / tf_bbox_overlap_iou.py
Created Sep 13, 2018
Calculate Intersection over Union on two sets of bounding boxes using Tensorflow
View tf_bbox_overlap_iou.py
import tensorflow as tf
def bbox_overlap_iou(bboxes1, bboxes2):
"""
Args:
bboxes1: shape (total_bboxes1, 4)
with x1, y1, x2, y2 point order.
bboxes2: shape (total_bboxes2, 4)
with x1, y1, x2, y2 point order.
You can’t perform that action at this time.