Skip to content

Instantly share code, notes, and snippets.

View escuccim's full-sized avatar

Eric A. Scuccimarra escuccim

View GitHub Profile
@escuccim
escuccim / tf_bbox_overlap_iou.py
Created September 13, 2018 10:24
Calculate Intersection over Union on two sets of bounding boxes using Tensorflow
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.