예제 #1
0
def area(box_mask_list):
  """Computes area of masks.

  Args:
    box_mask_list: np_box_mask_list.BoxMaskList holding N boxes and masks

  Returns:
    a numpy array with shape [N*1] representing mask areas
  """
  return np_mask_ops.area(box_mask_list.get_masks())
예제 #2
0
 def testArea(self):
     areas = np_mask_ops.area(self.masks1)
     expected_areas = np.array([8.0, 10.0], dtype=np.float32)
     self.assertAllClose(expected_areas, areas)
예제 #3
0
 def testArea(self):
   areas = np_mask_ops.area(self.masks1)
   expected_areas = np.array([8.0, 10.0], dtype=np.float32)
   self.assertAllClose(expected_areas, areas)