def get_all_anchors_fpn(strides=None, sizes=None):
    """
    Returns:
        [anchors]: each anchors is a SxSx NUM_ANCHOR_RATIOS x4 array.
    """
    if strides is None:
        strides = cfg.FPN.ANCHOR_STRIDES
    if sizes is None:
        sizes = cfg.RPN.ANCHOR_SIZES
    assert len(strides) == len(sizes)
    foas = []
    for stride, size in zip(strides, sizes):
        foa = get_all_anchors(stride=stride, sizes=(size,))
        foas.append(foa)
    return foas
def get_all_anchors_fpn ( strides = None , sizes = None ) : if strides is None : strides = cfg . FPN . ANCHOR_STRIDES if sizes is None : sizes = cfg . RPN . ANCHOR_SIZES assert len ( strides ) == len ( sizes ) foas = [ ] for stride , size in zip ( strides , sizes ) : foa = get_all_anchors ( stride = stride , sizes = ( size , ) ) foas . append ( foa ) return foas
Returns:
        [anchors]: each anchors is a SxSx NUM_ANCHOR_RATIOS x4 array.