コード例 #1
0
def intersection(box_mask_list1, box_mask_list2):
  """Compute pairwise intersection areas between masks.

  Args:
    box_mask_list1: BoxMaskList holding N boxes and masks
    box_mask_list2: BoxMaskList holding M boxes and masks

  Returns:
    a numpy array with shape [N*M] representing pairwise intersection area
  """
  return np_mask_ops.intersection(box_mask_list1.get_masks(),
                                  box_mask_list2.get_masks())
コード例 #2
0
ファイル: np_mask_ops_test.py プロジェクト: Clark0/MDPImage
 def testIntersection(self):
     intersection = np_mask_ops.intersection(self.masks1, self.masks2)
     expected_intersection = np.array([[8.0, 0.0, 8.0], [0.0, 9.0, 7.0]],
                                      dtype=np.float32)
     self.assertAllClose(intersection, expected_intersection)
コード例 #3
0
ファイル: np_mask_ops_test.py プロジェクト: ALISCIFP/models
 def testIntersection(self):
   intersection = np_mask_ops.intersection(self.masks1, self.masks2)
   expected_intersection = np.array(
       [[8.0, 0.0, 8.0], [0.0, 9.0, 7.0]], dtype=np.float32)
   self.assertAllClose(intersection, expected_intersection)