WenmuZhou / PytorchOCR

基于Pytorch的OCR工具库,支持常用的文字检测和识别算法

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

使用提供的预训练模型进行文本检测出错

LinXin04 opened this issue · comments

commented

File "tools/det_train.py", line 349, in

main()
File "tools/det_train.py", line 307, in main
net = build_model(cfg['model'])
File "/workspace/bin/torchocr/networks/architectures/init.py", line 20, in build_model
arch_model = eval(arch_type)(Dict(copy_config))
File "/workspace/bin/torchocr/networks/architectures/DetModel.py", line 29, in init
self.backbone = backbone_dict[backbone_type](config.in_channels, **config.backbone)
File "/workspace/bin/torchocr/networks/backbones/DetMobilenetV3.py", line 156, in init
self.load_state_dict(filtered_dict)
File "/root/miniconda3/lib/python3.7/site-packages/torch/nn/modules/module.py", line 1483, in load_state_dict
self.class.name, "\n\t".join(error_msgs)))
RuntimeError: Error(s) in loading state_dict for MobileNetV3:
Missing key(s) in state_dict: "stages.3.3.conv.weight", "stages.3.3.bn.weight", "stages.3.3.bn.bias", "stages.3.3.bn.running_mean", "stages.3.3.bn.running_var".
Unexpected key(s) in state_dict: "conv2.conv.weight", "conv2.bn.weight", "conv2.bn.bias", "conv2.bn.running_mean", "conv2.bn.running_var", "conv2.bn.num_batches_tracked".
main process return code: 0