本文整理匯總了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)