ying09 / TextFuseNet

A PyTorch implementation of "TextFuseNet: Scene Text Detection with Richer Fused Features".
MIT License
476 stars 123 forks source link

KeyError: 'Non-existent config key: MODEL.TEXTFUSENET_MUTIL_PATH_FUSE_ON' #50

Open Hiteshsaai opened 3 years ago

Hiteshsaai commented 3 years ago

Facing this issue when running the icdar2015_detection.py file.

Note: I have changed the path for the respective weights, input, output, and config directories.

Couldn't resolve it, need help.

skeka commented 3 years ago

same issue anyone solved?

ying09 commented 3 years ago

Please check the KEY: TEXTFUSENET_MUTIL_PATH_FUSE_ON: True in file https://github.com/ying09/TextFuseNet/blob/master/configs/ocr/icdar2015_101_FPN.yaml

skeka commented 3 years ago

It is true but issue happened to me. I upgraded torchvision it doesn't happen to me now, don't know why. But another issue happens. _C.cpython-37m-x86_64-linux-gnu.so: undefined symbol: THPVariableClass

skeka commented 3 years ago

I think it solved, maybe it comes from pytorch version or torchvision, or other librarities install version conflicts, I deleted my conda virtual and remade it, and solved.

Real-YeJ commented 3 years ago

@Hiteshsaai Yes. This probelm is due to wrong compilation.

aihiangng commented 3 years ago

Hi @skeka @Real-YeJ , I am facing the same issue. Can you share what pytorch, torchvision and detectron2 version youre using? Thank you (:

h-summit commented 3 years ago

it doesn't matter with package version. In file demo/icdar2013_detection.py, inser a line into function setup_cfg, and then it is like this.

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

python demo/icdar2013_detection.py. it works

rigvedsah000 commented 3 years ago

Adding cfg.set_new_allowed(True) solved the issue.