本文整理汇总了Python中maskrcnn_benchmark.modeling.rpn.rpn.RPNHeadConvRegressor方法的典型用法代码示例。如果您正苦于以下问题:Python rpn.RPNHeadConvRegressor方法的具体用法?Python rpn.RPNHeadConvRegressor怎么用?Python rpn.RPNHeadConvRegressor使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类maskrcnn_benchmark.modeling.rpn.rpn
的用法示例。
在下文中一共展示了rpn.RPNHeadConvRegressor方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: add_rpn_head
# 需要导入模块: from maskrcnn_benchmark.modeling.rpn import rpn [as 别名]
# 或者: from maskrcnn_benchmark.modeling.rpn.rpn import RPNHeadConvRegressor [as 别名]
def add_rpn_head(cfg, in_channels, num_anchors):
builder, model_arch = create_builder(cfg)
builder.last_depth = in_channels
assert in_channels == builder.last_depth
# builder.name_prefix = "[rpn]"
rpn_feature = FBNetRPNHead(cfg, in_channels, builder, model_arch)
rpn_regressor = rpn.RPNHeadConvRegressor(
cfg, rpn_feature.out_channels, num_anchors)
return nn.Sequential(rpn_feature, rpn_regressor)