class_docstr: Tests for bbox_overlap
  bbox_overlap has a TensorFlow and a Numpy implementation.
  
  We test both at the same time by getting both values and making sure they
  are both equal before doing any assertions.
docstr: Get IoU for two sets of bounding boxes.
  
  It also checks that both implementations return the same before
  returning.
  
  Args:
      bbox1_val: Array of shape (total_bbox1, 4).
      bbox2_val: Array of shape (total_bbox2, 4).
  
  Returns:
      iou: Array of shape (total_bbox1, total_bbox2)
docstr_tok: ["Get","IoU","for","two","sets","of","bounding","boxes",".","It","also","checks","that","both","implementations","return","the","same","before","returning",".","Args",":","bbox1_val",":","Array","of","shape","(","total_bbox1",",","4",")",".","bbox2_val",":","Array","of","shape","(","total_bbox2",",","4",")",".","Returns",":","iou",":","Array","of","shape","(","total_bbox1",",","total_bbox2",")"]
code: def _get_iou(self, bbox1_val, bbox2_val):
      """Get IoU for two sets of bounding boxes.
  
      It also checks that both implementations return the same before
      returning.
  
      Args:
          bbox1_val: Array of shape (total_bbox1, 4).
          bbox2_val: Array of shape (total_bbox2, 4).
  
      Returns:
          iou: Array of shape (total_bbox1, total_bbox2)
      """
      bbox1 = tf.placeholder(tf.float32, (None, 4))
      bbox2 = tf.placeholder(tf.float32, (None, 4))
      iou = bbox_overlap_tf(bbox1, bbox2)
  
      with self.test_session() as sess:
          iou_val_tf = sess.run(
              iou,
              feed_dict={
                  bbox1: np.array(bbox1_val),
                  bbox2: np.array(bbox2_val),
              },
          )
  
      iou_val_np = bbox_overlap(
          np.array(bbox1_val), np.array(bbox2_val)
      )
      self.assertAllClose(iou_val_np, iou_val_tf)
      return iou_val_tf
  
file_path: luminoth/luminoth/utils/bbox_overlap_test.py
imports: import numpy
  import tensorflow
  from luminoth.utils.bbox_overlap import bbox_overlap_tf, bbox_overlap
label_desc: Use image node_id 2 for calling the BBoxOverlapTest obj's underlying member method code with example usage: obj._get_iou(bbox1_val, bbox2_val) and returns: iou_val_tf