def build_feature_extractor(cfg, input_shape=None):
    """
    Build a backbone from `cfg.FE.BUILDER`

    Returns:
        an instance of :class:`Backbone`
    """
    if input_shape is None:
        input_shape = ShapeSpec(channels=len(cfg.MODEL.PIXEL_MEAN))

    builder_name = cfg.FE.BUILDER
    feature_extractor = BACKBONE_REGISTRY.get(builder_name)(cfg, input_shape)
    assert isinstance(feature_extractor, Backbone)
    return feature_extractor

    Build a backbone from `cfg.FE.BUILDER`

    Returns:
        an instance of :class:`Backbone`
    
tridet/modeling/feature_extractor/__init__.py