Ejemplo n.º 1
0
def build_rpn(cfg, in_channels):
    """
    This gives the gist of it. Not super important because it doesn't change as much
    """
    if cfg.MODEL.FCOS_ON:
        return build_fcos(cfg, in_channels)
    if cfg.MODEL.RETINANET_ON:
        return build_retinanet(cfg, in_channels)

    return RPNModule(cfg, in_channels)
Ejemplo n.º 2
0
def build_rpn(cfg, in_channels):  #cfg  in_channels=256*4
    """
    This gives the gist of it. Not super important because it doesn't change as much
    """
    if cfg.MODEL.FCOS_ON:  #True
        return build_fcos(cfg, in_channels)
        print("FCOS_ON is True ")
    if cfg.MODEL.RETINANET_ON:  #False
        return build_retinanet(cfg, in_channels)
        print("RETINANET_ON is True ")
    print("RPNModule")
    return RPNModule(cfg, in_channels)
Ejemplo n.º 3
0
def build_rpn(cfg, in_channels, extra=False):
    """
    This gives the gist of it. Not super important because it doesn't change as much
    """
    if cfg.MODEL.ATSS_ON:
        if extra == False: return build_atss(cfg, in_channels)
        if extra == True:  return build_atss(cfg, in_channels), build_atss_reg(cfg, in_channels)
    if cfg.MODEL.FCOS_ON:
        if extra == False: return build_fcos(cfg, in_channels)
        if extra == True:  return build_fcos(cfg, in_channels), build_fcos_reg(cfg, in_channels)
        #if extra == True: return build_fcos(cfg, in_channels), build_retinanet_reg(cfg, in_channels)
    if cfg.MODEL.RETINANET_ON:
        return build_retinanet(cfg, in_channels)

    return RPNModule(cfg, in_channels)