def getVisualModel(cfgFile): cfg = get_cfg() add_attribute_config(cfg) cfg.merge_from_file(cfgFile) cfg.MODEL.RESNETS.RES5_DILATION = 1 cfg.freeze() model = build_model(cfg) DetectionCheckpointer(model, save_dir="./test").resume_or_load(cfg.MODEL.WEIGHTS, resume=True) return model
def setup(args): """ Create configs and perform basic setups. """ cfg = get_cfg() add_attribute_config(cfg) cfg.merge_from_file(args.config_file) cfg.merge_from_list(args.opts) cfg.freeze() default_setup(cfg, args) return cfg
def setup(args): """ Create configs and perform basic setups. """ cfg = get_cfg() add_attribute_config(cfg) cfg.merge_from_file(args.config_file) cfg.merge_from_list(args.opts) # force the final residual block to have dilations 1 cfg.MODEL.RESNETS.RES5_DILATION = 1 cfg.freeze() default_setup(cfg, args) return cfg
def resetup(args): """ Create configs and perform basic setups. """ cfg = get_cfg() add_attribute_config(cfg) cfg.merge_from_file(args.config_file) cfg.merge_from_list(args.opts) # force the final residual block to have dilations 1 # cfg.MODEL.RESNETS.RES5_DILATION = 1 cfg.MODEL.WEIGHTS = 'output_X101/X-101.pth' cfg.MODEL.ROI_HEADS.SCORE_THRESH_TEST = 0 # I do thresh filter in my code cfg.freeze() default_setup(cfg, args) return cfg