def __init__(self, num_anchors, config, seed=None, name='anchor_target'):
super(RPNTarget, self).__init__(name=name)
self._num_anchors = num_anchors
self._allowed_border = config.allowed_border
# We set clobber positive to False to make sure that there is always at
# least one positive anchor per GT box.
self._clobber_positives = config.clobber_positives
# We set anchors as positive when the IoU is greater than
# `positive_overlap`.
self._positive_overlap = config.foreground_threshold
# We set anchors as negative when the IoU is less than
# `negative_overlap`.
self._negative_overlap = config.background_threshold_high
# Fraction of the batch to be foreground labeled anchors.
self._foreground_fraction = config.foreground_fraction
self._minibatch_size = config.minibatch_size
# When choosing random targets use `seed` to replicate behaviour.
self._seed = seed
评论列表
文章目录