本文整理匯總了Python中object_detection.meta_architectures.rfcn_meta_arch.RFCNMetaArch方法的典型用法代碼示例。如果您正苦於以下問題:Python rfcn_meta_arch.RFCNMetaArch方法的具體用法?Python rfcn_meta_arch.RFCNMetaArch怎麽用?Python rfcn_meta_arch.RFCNMetaArch使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類object_detection.meta_architectures.rfcn_meta_arch
的用法示例。
在下文中一共展示了rfcn_meta_arch.RFCNMetaArch方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: _get_model
# 需要導入模塊: from object_detection.meta_architectures import rfcn_meta_arch [as 別名]
# 或者: from object_detection.meta_architectures.rfcn_meta_arch import RFCNMetaArch [as 別名]
def _get_model(self, box_predictor, **common_kwargs):
return rfcn_meta_arch.RFCNMetaArch(
second_stage_rfcn_box_predictor=box_predictor, **common_kwargs)
示例2: test_create_rfcn_model_from_config
# 需要導入模塊: from object_detection.meta_architectures import rfcn_meta_arch [as 別名]
# 或者: from object_detection.meta_architectures.rfcn_meta_arch import RFCNMetaArch [as 別名]
def test_create_rfcn_model_from_config(self):
model_proto = self.create_default_faster_rcnn_model_proto()
rfcn_predictor_config = (
model_proto.faster_rcnn.second_stage_box_predictor.rfcn_box_predictor)
rfcn_predictor_config.conv_hyperparams.op = hyperparams_pb2.Hyperparams.CONV
for extractor_type, extractor_class in (
model_builder.FASTER_RCNN_FEATURE_EXTRACTOR_CLASS_MAP.items()):
model_proto.faster_rcnn.feature_extractor.type = extractor_type
model = model_builder.build(model_proto, is_training=True)
self.assertIsInstance(model, rfcn_meta_arch.RFCNMetaArch)
self.assertIsInstance(model._feature_extractor, extractor_class)
開發者ID:ShivangShekhar,項目名稱:Live-feed-object-device-identification-using-Tensorflow-and-OpenCV,代碼行數:13,代碼來源:model_builder_test.py
示例3: test_create_rfcn_model_from_config
# 需要導入模塊: from object_detection.meta_architectures import rfcn_meta_arch [as 別名]
# 或者: from object_detection.meta_architectures.rfcn_meta_arch import RFCNMetaArch [as 別名]
def test_create_rfcn_model_from_config(self):
model_proto = self.create_default_faster_rcnn_model_proto()
rfcn_predictor_config = (
model_proto.faster_rcnn.second_stage_box_predictor.rfcn_box_predictor)
rfcn_predictor_config.conv_hyperparams.op = hyperparams_pb2.Hyperparams.CONV
for extractor_type, extractor_class in (
self.faster_rcnn_feature_extractors().items()):
model_proto.faster_rcnn.feature_extractor.type = extractor_type
model = model_builder.build(model_proto, is_training=True)
self.assertIsInstance(model, rfcn_meta_arch.RFCNMetaArch)
self.assertIsInstance(model._feature_extractor, extractor_class)