Input: is a set of all anchor boxes, is a set of ground-truth boxes,is a set of classification predictions, is a set of regression predictions Output: is a set of positive samples, is a set of negative samples 1: for each do 2: ← compute IoU between g and , and select top Q anchors with the highest IoU as candidate samples ; 3: , ← select the classification and regression predictions corresponding to the candidate sample ; 4: for each do 5: ← compute IoU between and ; 6: end for 7: Create an empty set to save alignment degree: ; 8: for each do 9: ← compute the between and g; 10: ; 11: end for 12: ← select top V candidate samples as alignment samples ; 13: ← transform and to the Gaussian distribution ; 14: ← compute the Gaussian similarity between and , and define samples higher than the threshold as positive samples; 15: end for 16: ; 17: return ; |