本文整理汇总了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)