コード例 #1
0
ファイル: default_runner.py プロジェクト: ananthsub/d2go
    def get_default_cfg():
        """
        Override `get_default_cfg` for adding non common config.
        """
        from detectron2.config import get_cfg as get_d2_cfg

        cfg = get_d2_cfg()
        cfg = CN(cfg)  # upgrade from D2's CfgNode to D2Go's CfgNode
        cfg.SOLVER.AUTO_SCALING_METHODS = ["default_scale_d2_configs"]
        return cfg
コード例 #2
0
def get_infer_topk_cfg():
    cfg = get_d2_cfg()
    cfg.TEST.TOPK_CAT = CfgNode()
    cfg.TEST.TOPK_CAT.ENABLED = True
    cfg.TEST.TOPK_CAT.K = 10000
    cfg.TEST.TOPK_CAT.MIN_SCORE = 1.0e-7
    # Images used to estimate initial score threshold, with mask branch off.
    # Set to be greater than LVIS validation set, so we do a full pass with the
    # mask branch off.
    cfg.TEST.TOPK_CAT.NUM_ESTIMATE = 30000
    return cfg
コード例 #3
0
ファイル: default_runner.py プロジェクト: iooops/d2go
    def get_default_cfg():
        """
        Override `get_default_cfg` for adding non common config.
        """
        from detectron2.config import get_cfg as get_d2_cfg

        cfg = get_d2_cfg()
        cfg = CfgNode.cast_from_other_class(
            cfg)  # upgrade from D2's CfgNode to D2Go's CfgNode

        try:
            from d2go.runner import get_unintentional_added_configs_during_runner_import
            for key in get_unintentional_added_configs_during_runner_import():
                cfg.register_deprecated_key(key)
        except ImportError:
            pass

        cfg.SOLVER.AUTO_SCALING_METHODS = ["default_scale_d2_configs"]
        return cfg