def __init__(self, anchor_num=5, feature_in=256, feature_out=256): super(UP, self).__init__() self.anchor_num = anchor_num self.feature_in = feature_in self.feature_out = feature_out self.cls_output = 2 * self.anchor_num self.loc_output = 4 * self.anchor_num self.cls = DepthCorr(feature_in, feature_out, self.cls_output) self.loc = DepthCorr(feature_in, feature_out, self.loc_output)
def __init__(self, anchor_num=5, feature_in=256, feature_out=256): super(UP, self).__init__() self.anchor_num = anchor_num self.feature_in = feature_in self.feature_out = feature_out #分类输出,正类还是负类,故*2;定位anchor需要两对坐标四个输出,故*3 self.cls_output = 2 * self.anchor_num self.loc_output = 4 * self.anchor_num self.cls = DepthCorr(feature_in, feature_out, self.cls_output) self.loc = DepthCorr(feature_in, feature_out, self.loc_output)
def __init__(self, anchor_num=5, feature_in=256, feature_out=256): super(UP, self).__init__() self.anchor_num = anchor_num self.feature_in = feature_in self.feature_out = feature_out self.cls_output = 2 * self.anchor_num self.loc_output = 4 * self.anchor_num # 下面两行本质上是实例化了“两个”分支,分别是rpn的分类分支和回归分支 self.cls = DepthCorr( feature_in, feature_out, self.cls_output ) # 这里的feature_in, feature_out, self.cls_output是指输入输出的通道数 self.loc = DepthCorr(feature_in, feature_out, self.loc_output)
def __init__(self): super(KpCorr, self).__init__() self.kp = DepthCorr(256, 512, 1024)
def __init__(self, oSz=63): super(MaskCorr, self).__init__() self.oSz = oSz self.mask = DepthCorr(256, 256, self.oSz**2 * 17)
def __init__(self, oSz=63): super(MaskCorr, self).__init__() self.oSz = oSz self.kp_direct_reg = DepthCorr(256, 256, 17*2) self.kp_heatmap = DepthCorr(256, 256, oSz**2)
def __init__(self, oSz=63): # 为什么是63*63? super(MaskCorr, self).__init__() self.oSz = oSz self.mask = DepthCorr( 256, 256, self.oSz** 2) # DepthCorr类包含了从调整层adjust到depth-wise-corr再到头部结构hΦ/bσ/sφ
def __init__(self): super(PoseCorr, self).__init__() self.kp = DepthCorr(256, 512, 512)