标签:OLE features cnn sam ali ima 输入 == for
暂时不纠结 faster rcnn 最后一步是不是全连接层(gluoncv里面是rcnn层);
说一下feature map 和 anchor (Proposal) 作为输入,怎么计算ROIPooing ,怎么对应的。
例:
anchor [0,0,0,20,20] 缩放后是 3*3,ROIPooing 2*2,feature map 4*4;
from mxnet import nd X = nd.arange(16).reshape((1,1,4,4)) print(X) rois = nd.array([[0,0,0,20,20],[0,0,10,30,30]]) print(nd.ROIPooling(X,rois,pooled_size=(2,2),spatial_scale=0.1))
这在gluoncv里面是同样的写法:默认_roi_size = (14,14)
# ROI features if self._roi_mode == ‘pool‘: pooled_feat = F.ROIPooling(feat, rpn_roi, self._roi_size, 1. / self._stride) elif self._roi_mode == ‘align‘: pooled_feat = F.contrib.ROIAlign(feat, rpn_roi, self._roi_size, 1. / self._stride, sample_ratio=2)
之后可以来一个完整的gluoncv 的 faster rcnn 的 forward 计算的分析 ^_^
标签:OLE features cnn sam ali ima 输入 == for
原文地址:https://www.cnblogs.com/TreeDream/p/10298072.html