Closed yyyash8 closed 4 years ago
@yyyash8 please checkout common_str.py
,and the option is on the bottom of this file.
@yyyash8 please checkout
common_str.py
,and the option is on the bottom of this file.
but it is already reading keys from utils/common_str.py and I checked it with replacing keys in config.json file i.e. keys="qwertyuiopasdfghjklzxcvbnmQWERTYUIOPASDFGHJKLZXCVBNM" but it was still throwing error.
sorry for my wrong rely,you just need to modify the config.json
,the key
option is on the bottom of this file. @yyyash8
@yyyash8 specify your own key
where common_str.py
have defined.
@novioleo I add config['model']['scale'] = 512 tmp = {} tmp['img_h'] = 16 tmp['hidden'] = 1024 config['model']['crnn'] = tmp config['model']['keys'] = 'number_and_dot' config['need_grad_backbone']=True before model = FOTSModel(config) in load_model,but it still has problem below KeyError Traceback (most recent call last)
@sunzhuojun you didn't save the state dict in specific format.you can post the screenshot of your loaded sd
.
I'm getting this error: @novioleo yash@yashpc:~/fots/FOTS$ python3 eval.py -m retrained_model.pth.tar -i images/ -o output/ make: Entering directory '/home/lincode/fots/FOTS/utils/lanms' make: 'adaptor.so' is up to date. make: Leaving directory '/home/lincode/fots/FOTS/utils/lanms' Loading checkpoint: retrained_model.pth.tar ... Traceback (most recent call last): File "eval.py", line 126, in
main(args)
File "eval.py", line 70, in main
model = load_model(model_path, with_gpu)
File "eval.py", line 27, in load_model
model = FOTSModel(config)
File "/home/lincode/fots/FOTS/model/model.py", line 21, in init
keys = getattr(common_str, config['model']['keys'])
KeyError: 'keys'