Input: Anchor Set: ; Image Batch; Total number of anchors: ; The number
of classes ; FPN network ; RPN network; ROIHead network. |
Output: Class prior; |
1 for Image do |
2 Compute FPN features |
3 Compute the probabilities predicted by RPN |
4 # Filter proposals with a fixed threshold (0.05 in detectron2)
for the probabilities. |
5 Select proposals |
6 # Compute the probabilities and bounding boxes predicted by
ROIHead. |
7 ; |
8 # Filter the predicted boxes based on a configured confidence
threshold . |
9 |
10 Determine the index of positive anchors with and according to
Equation (12). |
11 Collect the set of as |
12 Compute the class prior of one image |
13 |
14 end |
Return |