maskrcnn_benchmark理解记录——modeling\roi_heads\roi_heads.py

本文档详细记录了maskrcnn_benchmark中modeling/roi_heads/roi_heads.py模块的理解,该模块包含检测和分割两个关键分支。通过对build_roi_keypoint_head的分析,深入探讨关键点检测头的实现细节。
摘要由CSDN通过智能技术生成

占坑

由两分支组成:检测分支和分割分支组成;

1)    roi_heads.append(("keypoint", build_roi_keypoint_head(cfg, in_channels)))
2)    roi_heads = CombinedROIHeads(cfg, roi_heads)

1)build_roi_keypoint_head可查看modeling\roi_heads\keypoint_head\keypoint_head.py

# Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.
import torch

from .box_head.box_head import build_roi_box_head
from .mask_head.mask_head import build_roi_mask_head
from .keypoint_head.keypoint_head import build_roi_keypoint_head


class CombinedROIHeads(torch.nn.ModuleDict):
    """
    Combines a set of individual heads (for box prediction or masks) into a single
    head.
    """

    def __init__(self, cfg, heads):
        super(CombinedROIHeads, self).__init__(heads)
        self.cfg = cfg.clone()
        if cfg.MO
评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值