https://yq.aliyun.com/articles/558181
Mask R-CNN與Faster R-CNN相似,Faster R-CNN是two-stage的,其中第一個stage是RPN。添加一個預測分割mask的並行分支——這是一個FCN。
ROIlign Layer而不是ROIPool。這就不會像ROIPool那樣將(x / spatial_scale)分數舍入為整數,相反,它執行雙線性插值來找出那些浮點值處的像素。
它的主干是ResNet-FPN
例如:想象一下,ROI的高度和寬度分別為54,167。空間尺度基本上是圖像大學/ FMap大學(H / h),在這種情況下它也被稱為步幅(stride)。通常224/14 = 16(H = 224,h = 14)。
◦ ROIPool: 54/16, 167/16 = 3,10
◦ ROIAlign: 54/16, 167/16 = 3.375, 10.4375
◦ 現在我們可以使用雙線性插值來進行上采樣。
keras實現:
https://github.com/matterport/Mask_RCNN/
http://blog.leanote.com/post/afanti.deng@gmail.com/b5f4f526490b ROI Align\
ROI Align在VOC2007數據集上的提升效果並不如在COCO上明顯。經過分析,造成這種區別的原因是COCO上小目標的數量更多,而小目標受misalignment問題的影響更大(比如,同樣是0.5個像素點的偏差,對於較大的目標而言顯得微不足道,但是對於小目標,誤差的影響就要高很多)。
https://blog.csdn.net/yiyouxian/article/details/79221830 caffe實現ROI Align
https://blog.csdn.net/u013010889/article/details/79232740 c++
https://ptorch.com/news/103.html pytorch
---->
https://github.com/ppwwyyxx/tensorpack/blob/6d5ba6a970710eaaa14b89d24aace179eb8ee1af/examples/FasterRCNN/model.py#L301
中的
301行def crop_and_resize(image, boxes, box_ind, crop_size):
357行def roi_align(featuremap, boxes, output_shape):
RoIAlign是crop_and_resize
使用非標准化(x1, y1, x2, y2
)框作為輸入(而crop_and_resize
使用規范化(y1, x1, y2, x2
)為輸入)。想知道RoIAlign
和crop_and_resize
差異的細節可以查看tensorpack。