本文整理匯總了Python中object_detection.core.preprocessor._flip_masks_up_down方法的典型用法代碼示例。如果您正苦於以下問題:Python preprocessor._flip_masks_up_down方法的具體用法?Python preprocessor._flip_masks_up_down怎麽用?Python preprocessor._flip_masks_up_down使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類object_detection.core.preprocessor
的用法示例。
在下文中一共展示了preprocessor._flip_masks_up_down方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: testFlipMasksUpDown
# 需要導入模塊: from object_detection.core import preprocessor [as 別名]
# 或者: from object_detection.core.preprocessor import _flip_masks_up_down [as 別名]
def testFlipMasksUpDown(self):
test_mask = self.createTestMasks()
flipped_mask = preprocessor._flip_masks_up_down(test_mask)
expected_mask = self.expectedMasksAfterUpDownFlip()
with self.test_session() as sess:
flipped_mask, expected_mask = sess.run([flipped_mask, expected_mask])
self.assertAllEqual(flipped_mask.flatten(), expected_mask.flatten())
示例2: testFlipMasksUpDown
# 需要導入模塊: from object_detection.core import preprocessor [as 別名]
# 或者: from object_detection.core.preprocessor import _flip_masks_up_down [as 別名]
def testFlipMasksUpDown(self):
def graph_fn():
test_mask = self.createTestMasks()
flipped_mask = preprocessor._flip_masks_up_down(test_mask)
expected_mask = self.expectedMasksAfterUpDownFlip()
return flipped_mask, expected_mask
flipped_mask, expected_mask = self.execute_cpu(graph_fn, [])
self.assertAllEqual(flipped_mask.flatten(), expected_mask.flatten())