docstr: Check that our cython implementation of bounding box IoU overlap
  matches the COCO API implementation.
docstr_tok: ["Check","that","our","cython","implementation","of","bounding","box","IoU","overlap","matches","the","COCO","API","implementation","."]
code: def test_cython_bbox_iou_against_coco_api_bbox_iou(self):
      """Check that our cython implementation of bounding box IoU overlap
      matches the COCO API implementation.
      """
  
      def _do_test(b1, b2):
          # Compute IoU overlap with the cython implementation
          cython_iou = box_utils.bbox_overlaps(b1, b2)
          # Compute IoU overlap with the COCO API implementation
          # (requires converting boxes from xyxy to xywh format)
          xywh_b1 = box_utils.xyxy_to_xywh(b1)
          xywh_b2 = box_utils.xyxy_to_xywh(b2)
          not_crowd = [int(False)] * b2.shape[0]
          coco_ious = COCOmask.iou(xywh_b1, xywh_b2, not_crowd)
          # IoUs should be similar
          np.testing.assert_array_almost_equal(
              cython_iou, coco_ious, decimal=5
          )
  
      # Test small boxes
      b1 = random_boxes([10, 10, 20, 20], 5, 10)
      b2 = random_boxes([10, 10, 20, 20], 5, 10)
      _do_test(b1, b2)
  
      # Test bigger boxes
      b1 = random_boxes([10, 10, 110, 20], 20, 10)
      b2 = random_boxes([10, 10, 110, 20], 20, 10)
      _do_test(b1, b2)
  
file_path: dense-pose/detectron/tests/test_bbox_transform.py
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  from __future__ import unicode_literals
  import numpy
  import unittest
  from pycocotools import mask
  import detectron.utils.boxes
label_desc: Use image node_id 3 for calling the TestBboxTransform obj's underlying member method code with example usage: obj.test_cython_bbox_iou_against_coco_api_bbox_iou() without return types