Open AI-Passionner opened 1 year ago
In all the scripts inside the demo
folder, just insert a line (cfg.set_new_allowed(True)
) into the function setup_cfg
. It will look something like:
def setup_cfg(args):
# load config from file and command-line arguments
cfg = get_cfg()
cfg.set_new_allowed(True)
cfg.merge_from_file(args.config_file)
cfg.merge_from_list(args.opts)
# Set model
cfg.MODEL.WEIGHTS = args.weights
# Set score_threshold for builtin models
cfg.MODEL.RETINANET.SCORE_THRESH_TEST = args.confidence_threshold
cfg.MODEL.ROI_HEADS.SCORE_THRESH_TEST = args.confidence_threshold
cfg.MODEL.PANOPTIC_FPN.COMBINE.INSTANCES_CONFIDENCE_THRESH = args.confidence_threshold
cfg.freeze()
return cfg
@ying09 I am using TextFuseNet to detect the scent text in an image. When I had detectron2 installed (MacPro + M1 chip) and tried to run the demo, it shows the error as 'keyError: non-existent config key: TEXTFUSENET_MUTIL_PATH_FUSE_ON'
I searched this issue around and it seems I am the first one in the TextFuseNet. Any suggestions?
A similar issue was found but I don't have an idea.
Thanks.