目标检测复习之Faster RCNN系列
目标检测之faster rcnn系列
-
code: mmdetection
Faster rcnn总结:
- 网络结构图1

- paper的图

Faster rcnn笔记总结:
- 笔记1:


ROI Aligin理解
import torch
from torchvision.ops import RoIAlign
output_size = (3, 3)
spatial_scale = 1 / 4
sampling_ratio = 2
x = torch.FloatTensor([[
[[1, 2, 3, 4, 5, 6 ],
[7, 8, 9, 10, 11, 12],
[13, 14, 15, 16, 17, 18],
[19, 20, 21, 22, 23, 24],
[25, 26, 27, 28, 29, 30],
[31, 32, 33, 34, 35, 36]]
]])
rois = torch.tensor([
[0, -2.0, -2.0, 22.0, 22.0],
])
a = RoIAlign(output_size, spatial_scale=spatial_scale, sampling_ratio=sampling_ratio)
ya = a(x, rois)
print(ya)
# 结果
tensor([[[[ 6.8333, 8.5000, 10.1667],
[16.8333, 18.5000, 20.1667],
[26.8333, 28.5000, 30.1667]]]])

浙公网安备 33010602011771号