frotms / paddleocr2pytorch Goto Github PK
View Code? Open in Web Editor NEWPaddleOCR inference in PyTorch. Converted from [PaddleOCR](https://github.com/PaddlePaddle/PaddleOCR)
License: Apache License 2.0
PaddleOCR inference in PyTorch. Converted from [PaddleOCR](https://github.com/PaddlePaddle/PaddleOCR)
License: Apache License 2.0
字符识别infer时,出现错误 ,det 和 cls是正常的
RuntimeError: Error(s) in loading state_dict for BaseModel:
Missing key(s) in state_dict: "backbone.blocks.0.mid_se.conv1.weight", "backbone.blocks.0.mid_se.conv1.bias", "backbone.blocks.0.mid_se.conv2.weight", "backbone.blocks.0.mid_se.conv2.bias", "backbone.blocks.6.mid_se.conv1.weigh
这个是我们的team, 致力 于做基于PaddleOCR的生态。 目前解决的是推理问题。 需要你的训练代码加入,诚邀加入我们的Team ,发挥团队的努力 ,做成**最好的开源ocr
可微信我:364479
比PaddleOCR慢太多了,一张图片CPU推理十几秒呀。
按照测试的方法来,报错
python3 ./tools/infer/predict_rec.py --image_dir ./doc/imgs_words --model_path your_rec_pth_path.pth
报错:系统错误找不到指定模块
使用SRN模型识别时,在rec_postprocess.py文件报错:
看起来是字典不对?我用的是ppocr_keys_v1.txt这个字典。
附rec参数:
parser.add_argument("--rec_algorithm", type=str, default='SRN')
parser.add_argument("--rec_model_path", type=str, default='./weights/rec_r50_vd_srn_infer.pth')
parser.add_argument("--rec_image_shape", type=str, default="1, 64, 256")
parser.add_argument("--rec_char_type", type=str, default='en')
parser.add_argument("--rec_batch_num", type=int, default=6)
parser.add_argument("--max_text_length", type=int, default=25)
parser.add_argument("--use_space_char", type=str2bool, default=True)
parser.add_argument("--drop_score", type=float, default=0.5)
parser.add_argument("--limited_max_width", type=int, default=1280)
parser.add_argument("--limited_min_width", type=int, default=16)
parser.add_argument(
"--vis_font_path", type=str,
default=os.path.join(os.path.dirname(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))), 'doc/fonts/simfang.ttf'))
parser.add_argument(
"--rec_char_dict_path",
type=str,
default=os.path.join(os.path.dirname(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))),
'pytorchocr/utils/ppocr_keys_v1.txt'))
parser.add_argument("--det_yaml_path", type=str, default=None)
parser.add_argument("--rec_yaml_path", type=str, default="./configs/rec/rec_r50_fpn_srn.yml")
parser.add_argument("--cls_yaml_path", type=str, default=None)
parser.add_argument("--e2e_yaml_path", type=str, default=None)
raceback (most recent call last):
File "./converter/det_converter.py", line 95, in <module>
converter = DetV20DetConverter(cfg, paddle_pretrained_model_path, **kwargs)
File "./converter/det_converter.py", line 12, in __init__
self.load_paddle_weights(paddle_pretrained_model_path)
File "./converter/det_converter.py", line 57, in load_paddle_weights
self.net.state_dict()[k].copy_(torch.Tensor(para_state_dict[ppname]))
KeyError: 'backbone.conv1_1._conv.weight'
请问这个模型能训练自己的数据集吗?
作者好, 我尝试用 ./tools/infer/predict_system.py
来串联识别英文, 检测模型用的是en_ptocr_v3_det_infer.pth
, 识别模型分别试用了en_ptocr_v3_rec_infer.pth
和 en_number_mobile_v2.0_rec_infer.pth
, 但是返回的结果都是中文~
dt_boxes num : 2, elapse : 0.0470426082611084
rec_res num : 2, elapse : 0.06331539154052734
Predict time of ../tess_train/data/1.jpg: 0.112s
房韵, 0.996
rec_res num : 2, elapse : 0.06833672523498535
Predict time of ../tess_train/data/1.jpg: 0.127s
房韵, 0.755
求助~
大佬,表格识别近期会更新吗
按照提示都改成--rec_image_shape='3,32,100' and --rec_char_type='en' 还会报下面的错误,
Please read the FAQ:https://github.com/PaddlePaddle/PaddleOCR#faq
If your model has tps module: TPS does not support variable shape.
Please set --rec_image_shape='3,32,100' and --rec_char_type='en'
list index out of range
使用的模型结构是 ./configs/det/det_r50_vd_db.yml ,使用的paddle参数文件下载自 https://paddleocr.bj.bcebos.com/pretrained/ResNet50_vd_ssld_pretrained.pdparams
但是在尝试模型转换时出现了如下报错
Traceback (most recent call last):
File "../converter/det_converter.py", line 94, in
converter = DetV20DetConverter(cfg, paddle_pretrained_model_path, **kwargs)
File "../converter/det_converter.py", line 12, in init
self.load_paddle_weights(paddle_pretrained_model_path)
File "../converter/det_converter.py", line 56, in load_paddle_weights
self.net.state_dict()[k].copy_(torch.Tensor(para_state_dict[ppname]))
KeyError: 'neck.in2_conv.weight'
原本猜测是模型不对,想要从给的百度网盘中找合适的模型参数文件,但是本项目中提到的网盘链接(https://pan.baidu.com/s/1getAprT2l_JqwhjwML0g9g 提取码:lmv7)已经失效。
这个还不能工作
自己训练了个ppocrv3 rec
模型,使用ch_PP-OCRv3_rec.yml
配置文件,训练完成后使用paddleOCR推理精度很高。
KeyError: Student.backbone.conv1._conv.weight
Pytorch
python3 ./tools/infer/predict_system.py --image_dir ./test.jpeg --det_model_path ch_ptocr_v2_det_infer.pth --rec_model_path ch_ptocr_v2_rec_infer.pth --use_angle_cls true --cls_model_path ch_ptocr_mobile_v2.0_cls_infer.pth
Paddle
python3 tools/infer/predict_system.py --image_dir="./test.jpeg" --det_model_dir="./model/ch_PP-OCRv2_det_infer" --cls_model_dir="./model/ch_ppocr_mobile_v2.0_cls_infer" --rec_model_dir="./model/ch_PP-OCRv2_rec_infer" --use_angle_cls=true
除了输入和参数路径,其他均是默认。对比过代码默认配置两边基本是相同的。从结果看Pytorch要好一些,感觉很奇怪,麻烦懂的大大解答一下
请问实现了ppocr的弯曲文字块的识别了吗
PPOCR v3.0更新啦,催大佬来转模型了。
请问表格识别有吗,谢谢
大佬有想写训练部分的代码吗
想把 paddle 的rec模型转化为pytorch. 遇到点问题
python3 ch_ppocr_v3_rec_converter.py --src_model_path ...../libs/paddle/paddle_ocr_module/ch_PP-OCRv3_rec_infer
Traceback (most recent call last):
File "ch_ppocr_v3_rec_converter.py", line 93, in <module>
converter = PPOCRv3RecConverter(cfg, paddle_pretrained_model_path)
File "ch_ppocr_v3_rec_converter.py", line 14, in __init__
out_channels = list(para_state_dict.values())[-1].shape[0]
IndexError: list index out of range
看起来像是模型不对,解压后模型文件inference.info, inference.pdiparams, inference.pdmodel 都放在 ch_PP-OCRv3_rec_infer目录下。我这是哪里不对?
Can you share the dataloader (simple_dataset as well as lmdb_dataset) implemented in pytorch in data module and the loss function as well. I was able to reimplemented but can't reproduce the result
可以直接训练迁移后的模型吗?
Hello, thank you for your work.
I trained SRN mudule in PaddleOCR on my dataset. i convert the trained model into inference and onnxt format. How can i convert trained model to pytorch pth file.
Thank you
1、转换的pp模型链接:
https://paddleocr.bj.bcebos.com/PP-OCRv3/chinese/ch_PP-OCRv3_rec_train.tar
2、运行脚本:
python ./converter/ch_ppocr_v3_rec_converter.py
3、报错:
Traceback (most recent call last):
File "./converter/ch_ppocr_v3_rec_converter.py", line 60, in load_paddle_weights
self.net.state_dict()[k].copy_(torch.Tensor(para_state_dict[ppname]))
KeyError: 'Student.backbone.conv1._conv.weight'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "./converter/ch_ppocr_v3_rec_converter.py", line 94, in
converter = PPOCRv3RecConverter(cfg, paddle_pretrained_model_path)
File "./converter/ch_ppocr_v3_rec_converter.py", line 22, in init
self.load_paddle_weights([para_state_dict, opti_state_dict])
File "./converter/ch_ppocr_v3_rec_converter.py", line 64, in load_paddle_weights
print('paddle: {}, {}'.format(ppname, para_state_dict[ppname].shape))
KeyError: 'Student.backbone.conv1._conv.weight'
运行ch_ppocr_v2_rec_converter.py 出现
Traceback (most recent call last):
File "/home/user/paddle/PaddleOCR2Pytorch/converter/ch_ppocr_v2_rec_converter.py", line 56, in load_paddle_weights
self.net.state_dict()[k].copy_(torch.Tensor(para_state_dict[ppname]))
KeyError: 'Student.backbone.conv1._conv.weight'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/user/paddle/PaddleOCR2Pytorch/converter/ch_ppocr_v2_rec_converter.py", line 80, in <module>
converter = PPOCRv2RecConverter(cfg, paddle_pretrained_model_path)
File "/home/user/paddle/PaddleOCR2Pytorch/converter/ch_ppocr_v2_rec_converter.py", line 19, in __init__
self.load_paddle_weights([para_state_dict, opti_state_dict])
File "/home/user/paddle/PaddleOCR2Pytorch/converter/ch_ppocr_v2_rec_converter.py", line 60, in load_paddle_weights
print('paddle: {}, {}'.format(ppname, para_state_dict[ppname].shape))
KeyError: 'Student.backbone.conv1._conv.weight'
paddle 模型:ch_ppocr_server_v2.0_rec_pre
tps.py 中 GridGenerator类中的build_C_paddle和build_P_paddle两个函数生成的张量未添加GPU支持。在模型使用GPU运行时,会导致182与183行出现RuntimeError: Expected object of backend CUDA but got backend CPU for argument #2 'mat2'
大佬,V2大概多久能搞出来
请问检测到的弯曲文字(如圆形徽章),怎么进行水平纠正?相关的纠正代码在哪个文件
python tools/infer/predict_e2e.py --e2e_model_path ./en_server_pgnetA_infer.pth --image_dir D:\workspace\python\demo-test\test\OCR\img\20220413114341.jpg --e2e_a
lgorithm PGNet --e2e_pgnet_polygon True --e2e_char_dict_path .\pytorchocr\utils\dict\chinese_cht_dict.txt --vis_font_path doc\fonts\chinese_cht.ttf --e2e_yaml_path ./configs/e2e/e2
e_r50_vd_pg.yml
执行上面的命令
效果很差
执行 :
python ./tools/infer/predict_system.py --image_dir ./doc/imgs --det_model_path .\models\det_r50_vd_east_v2.0_infer.pth --rec_model_path .\models\rec_r50_vd_srn_i
nfer.pth
报错:
{'model_name': 'large', 'in_channels': 128}
model is loaded: .\models\det_r50_vd_east_v2.0_infer.pth
{'fc_decay': 4e-05, 'in_channels': 96}
Traceback (most recent call last):
File "./tools/infer/predict_system.py", line 171, in
main(utility.parse_args())
File "./tools/infer/predict_system.py", line 128, in main
text_sys = TextSystem(args)
File "./tools/infer/predict_system.py", line 25, in init
self.text_recognizer = predict_rec.TextRecognizer(args, **kwargs)
File "D:\workspace\python\torch11\PaddleOCR2Pytorch-main\tools\infer\predict_rec.py", line 63, in init
self.load_state_dict(weights)
File "D:\workspace\python\torch11\PaddleOCR2Pytorch-main\pytorchocr\base_ocr_v20.py", line 70, in load_state_dict
self.net.load_state_dict(weights)
File "C:\Users\conf.conda\envs\pytorch-gpu-11\lib\site-packages\torch\nn\modules\module.py", line 1497, in load_state_dict
raise RuntimeError('Error(s) in loading state_dict for {}:\n\t{}'.format(
RuntimeError: Error(s) in loading state_dict for BaseModel:
Missing key(s) in state_dict: "backbone.conv1.conv.weight", "backbone.conv1.bn.weight", "backbone.conv1.bn.bias", "backbone.conv1.bn.running_mean", "backbone.conv1.bn.runnin
g_var", "backbone.blocks.0.expand_conv.conv.weight", "backbone.blocks.0.expand_conv.bn.weight", "backbone.blocks.0.expand_conv.bn.bias", "backbone.blocks.0.expand_conv.bn.running_me
an", "backbone.blocks.0.expand_conv.bn.running_var", "backbone.blocks.0.bottleneck_conv.conv.weight", "backbone.blocks.0.bottleneck_conv.bn.weight", "backbone.blocks.0.bottleneck_co
nv.bn.bias", "backbone.blocks.0.bottleneck_conv.bn.running_mean", "backbone.blocks.0.bottleneck_conv.bn.running_var", "backbone.blocks.0.mid_se.conv1.weight", "backbone.blocks.0.mid
se.conv1.bias", "backbone.blocks.0.mid_se.conv2.weight", "backbone.blocks.0.mid_se.conv2.bias", "backbone.blocks.0.linear_conv.conv.weight", "backbone.blocks.0.linear_conv.bn.weigh
t", "backbone.blocks.0.linear_conv.bn.bias", "backbone.blocks.0.linear_conv.bn.running_mean", "backbone.blocks.0.linear_conv.bn.running_var", "backbone.blocks.1.expand_conv.conv.wei
ght", "backbone.blocks.1.expand_conv.bn.weight", "backbone.blocks.1.expand_conv.bn.bias", "backbone.blocks.1.expand_conv.bn.running_mean", "backbone.blocks.1.expand_conv.bn.running
var", "backbone.blocks.1.bottleneck_conv.conv.weight", "backbone.blocks.1.bottleneck_conv.bn.weight", "backbone.blocks.1.bottleneck_conv.bn.bias", "backbone.blocks.1.bottleneck_conv
.bn.running_mean", "backbone.blocks.1.bottleneck_conv.bn.running_var", "backbone.blocks.1.linear_conv.conv.weight", "backbone.blocks.1.linear_conv.bn.weight", "backbone.blocks.1.lin
ear_conv.bn.bias", "backbone.blocks.1.linear_conv.bn.running_mean", "backbone.blocks.1.linear_conv.bn.running_var", "backbone.blocks.2.expand_conv.conv.weight", "backbone.blocks.2.e
xpand_conv.bn.weight", "backbone.blocks.2.expand_conv.bn.bias", "backbone.blocks.2.expand_conv.bn.running_mean", "backbone.blocks.2.expand_conv.bn.running_var", "backbone.blocks.2.b
ottleneck_conv.conv.weight", "backbone.blocks.2.bottleneck_conv.bn.weight", "backbone.blocks.2.bottleneck_conv.bn.bias", "backbone.blocks.2.bottleneck_conv.bn.running_mean", "backbo
ne.blocks.2.bottleneck_conv.bn.running_var", "backbone.blocks.2.linear_conv.conv.weight", "backbone.blocks.2.linear_conv.bn.weight", "backbone.blocks.2.linear_conv.bn.bias", "backbo
ne.blocks.2.linear_conv.bn.running_mean", "backbone.blocks.2.linear_conv.bn.running_var", "backbone.blocks.3.expand_conv.conv.weight", "backbone.blocks.3.expand_conv.bn.weight", "ba
ckbone.blocks.3.expand_conv.bn.bias", "backbone.blocks.3.expand_conv.bn.running_mean", "backbone.blocks.3.expand_conv.bn.running_var", "backbone.blocks.3.bottleneck_conv.conv.weight
", "backbone.blocks.3.bottleneck_conv.bn.weight", "backbone.blocks.3.bottleneck_conv.bn.bias", "backbone.blocks.3.bottleneck_conv.bn.running_mean", "backbone.blocks.3.bottleneck_con
v.bn.running_var", "backbone.blocks.3.mid_se.conv1.weight", "backbone.blocks.3.mid_se.conv1.bias", "backbone.blocks.3.mid_se.conv2.weight", "backbone.blocks.3.mid_se.conv2.bias", "b
ackbone.blocks.3.linear_conv.conv.weight", "backbone.blocks.3.linear_conv.bn.weight", "backbone.blocks.3.linear_conv.bn.bias", "backbone.blocks.3.linear_conv.bn.running_mean", "back
bone.blocks.3.linear_conv.bn.running_var", "backbone.blocks.4.expand_conv.conv.weight", "backbone.blocks.4.expand_conv.bn.weight", "backbone.blocks.4.expand_conv.bn.bias", "backbone
.blocks.4.expand_conv.bn.running_mean", "backbone.blocks.4.expand_conv.bn.running_var", "backbone.blocks.4.bottleneck_conv.conv.weight", "backbone.blocks.4.bottleneck_conv.bn.weight
", "backbone.blocks.4.bottleneck_conv.bn.bias", "backbone.blocks.4.bottleneck_conv.bn.running_mean", "backbone.blocks.4.bottleneck_conv.bn.running_var", "backbone.blocks.4.mid_se.co
nv1.weight", "backbone.blocks.4.mid_se.conv1.bias", "backbone.blocks.4.mid_se.conv2.weight", "backbone.blocks.4.mid_se.conv2.bias", "backbone.blocks.4.linear_conv.conv.weight", "bac
kbone.blocks.4.linear_conv.bn.weight", "backbone.blocks.4.linear_conv.bn.bias", "backbone.blocks.4.linear_conv.bn.running_mean", "backbone.blocks.4.linear_conv.bn.running_var", "bac
kbone.blocks.5.expand_conv.conv.weight", "backbone.blocks.5.expand_conv.bn.weight", "backbone.blocks.5.expand_conv.bn.bias", "backbone.blocks.5.expand_conv.bn.running_mean", "backbo
ne.blocks.5.expand_conv.bn.running_var", "backbone.blocks.5.bottleneck_conv.conv.weight", "backbone.blocks.5.bottleneck_conv.bn.weight", "backbone.blocks.5.bottleneck_conv.bn.bias",
"backbone.blocks.5.bottleneck_conv.bn.running_mean", "backbone.blocks.5.bottleneck_conv.bn.running_var", "backbone.blocks.5.mid_se.conv1.weight", "backbone.blocks.5.mid_se.conv1.bi
as", "backbone.blocks.5.mid_se.conv2.weight", "backbone.blocks.5.mid_se.conv2.bias", "backbone.blocks.5.linear_conv.conv.weight", "backbone.blocks.5.linear_conv.bn.weight", "backbon
e.blocks.5.linear_conv.bn.bias", "backbone.blocks.5.linear_conv.bn.running_mean", "backbone.blocks.5.linear_conv.bn.running_var", "backbone.blocks.6.expand_conv.conv.weight", "backb
one.blocks.6.expand_conv.bn.weight", "backbone.blocks.6.expand_conv.bn.bias", "backbone.blocks.6.expand_conv.bn.running_mean", "backbone.blocks.6.expand_conv.bn.running_var", "backb
one.blocks.6.bottleneck_conv.conv.weight", "backbone.blocks.6.bottleneck_conv.bn.weight", "backbone.blocks.6.bottleneck_conv.bn.bias", "backbone.blocks.6.bottleneck_conv.bn.running_
mean", "backbone.blocks.6.bottleneck_conv.bn.running_var", "backbone.blocks.6.mid_se.conv1.weight", "backbone.blocks.6.mid_se.conv1.bias", "backbone.blocks.6.mid_se.conv2.weight", "
backbone.blocks.6.mid_se.conv2.bias", "backbone.blocks.6.linear_conv.conv.weight", "backbone.blocks.6.linear_conv.bn.weight", "backbone.blocks.6.linear_conv.bn.bias", "backbone.bloc
ks.6.linear_conv.bn.running_mean", "backbone.blocks.6.linear_conv.bn.running_var", "backbone.blocks.7.expand_conv.conv.weight", "backbone.blocks.7.expand_conv.bn.weight", "backbone.
blocks.7.expand_conv.bn.bias", "backbone.blocks.7.expand_conv.bn.running_mean", "backbone.blocks.7.expand_conv.bn.running_var", "backbone.blocks.7.bottleneck_conv.conv.weight", "bac
kbone.blocks.7.bottleneck_conv.bn.weight", "backbone.blocks.7.bottleneck_conv.bn.bias", "backbone.blocks.7.bottleneck_conv.bn.running_mean", "backbone.blocks.7.bottleneck_conv.bn.ru
nning_var", "backbone.blocks.7.mid_se.conv1.weight", "backbone.blocks.7.mid_se.conv1.bias", "backbone.blocks.7.mid_se.conv2.weight", "backbone.blocks.7.mid_se.conv2.bias", "backbone
.blocks.7.linear_conv.conv.weight", "backbone.blocks.7.linear_conv.bn.weight", "backbone.blocks.7.linear_conv.bn.bias", "backbone.blocks.7.linear_conv.bn.running_mean", "backbone.bl
ocks.7.linear_conv.bn.running_var", "backbone.blocks.8.expand_conv.conv.weight", "backbone.blocks.8.expand_conv.bn.weight", "backbone.blocks.8.expand_conv.bn.bias", "backbone.blocks
.8.expand_conv.bn.running_mean", "backbone.blocks.8.expand_conv.bn.running_var", "backbone.blocks.8.bottleneck_conv.conv.weight", "backbone.blocks.8.bottleneck_conv.bn.weight", "bac
kbone.blocks.8.bottleneck_conv.bn.bias", "backbone.blocks.8.bottleneck_conv.bn.running_mean", "backbone.blocks.8.bottleneck_conv.bn.running_var", "backbone.blocks.8.mid_se.conv1.wei
ght", "backbone.blocks.8.mid_se.conv1.bias", "backbone.blocks.8.mid_se.conv2.weight", "backbone.blocks.8.mid_se.conv2.bias", "backbone.blocks.8.linear_conv.conv.weight", "backbone.b
locks.8.linear_conv.bn.weight", "backbone.blocks.8.linear_conv.bn.bias", "backbone.blocks.8.linear_conv.bn.running_mean", "backbone.blocks.8.linear_conv.bn.running_var", "backbone.b
locks.9.expand_conv.conv.weight", "backbone.blocks.9.expand_conv.bn.weight", "backbone.blocks.9.expand_conv.bn.bias", "backbone.blocks.9.expand_conv.bn.running_mean", "backbone.bloc
ks.9.expand_conv.bn.running_var", "backbone.blocks.9.bottleneck_conv.conv.weight", "backbone.blocks.9.bottleneck_conv.bn.weight", "backbone.blocks.9.bottleneck_conv.bn.bias", "backb
one.blocks.9.bottleneck_conv.bn.running_mean", "backbone.blocks.9.bottleneck_conv.bn.running_var", "backbone.blocks.9.mid_se.conv1.weight", "backbone.blocks.9.mid_se.conv1.bias", "b
ackbone.blocks.9.mid_se.conv2.weight", "backbone.blocks.9.mid_se.conv2.bias", "backbone.blocks.9.linear_conv.conv.weight", "backbone.blocks.9.linear_conv.bn.weight", "backbone.block
s.9.linear_conv.bn.bias", "backbone.blocks.9.linear_conv.bn.running_mean", "backbone.blocks.9.linear_conv.bn.running_var", "backbone.blocks.10.expand_conv.conv.weight", "backbone.bl
ocks.10.expand_conv.bn.weight", "backbone.blocks.10.expand_conv.bn.bias", "backbone.blocks.10.expand_conv.bn.running_mean", "backbone.blocks.10.expand_conv.bn.running_var", "backbon
e.blocks.10.bottleneck_conv.conv.weight", "backbone.blocks.10.bottleneck_conv.bn.weight", "backbone.blocks.10.bottleneck_conv.bn.bias", "backbone.blocks.10.bottleneck_conv.bn.runnin
g_mean", "backbone.blocks.10.bottleneck_conv.bn.running_var", "backbone.blocks.10.mid_se.conv1.weight", "backbone.blocks.10.mid_se.conv1.bias", "backbone.blocks.10.mid_se.conv2.weig
ht", "backbone.blocks.10.mid_se.conv2.bias", "backbone.blocks.10.linear_conv.conv.weight", "backbone.blocks.10.linear_conv.bn.weight", "backbone.blocks.10.linear_conv.bn.bias", "bac
kbone.blocks.10.linear_conv.bn.running_mean", "backbone.blocks.10.linear_conv.bn.running_var", "backbone.conv2.conv.weight", "backbone.conv2.bn.weight", "backbone.conv2.bn.bias", "b
ackbone.conv2.bn.running_mean", "backbone.conv2.bn.running_var", "neck.encoder.lstm.weight_ih_l0", "neck.encoder.lstm.weight_hh_l0", "neck.encoder.lstm.bias_ih_l0", "neck.encoder.ls
tm.bias_hh_l0", "neck.encoder.lstm.weight_ih_l0_reverse", "neck.encoder.lstm.weight_hh_l0_reverse", "neck.encoder.lstm.bias_ih_l0_reverse", "neck.encoder.lstm.bias_hh_l0_reverse", "
neck.encoder.lstm.weight_ih_l1", "neck.encoder.lstm.weight_hh_l1", "neck.encoder.lstm.bias_ih_l1", "neck.encoder.lstm.bias_hh_l1", "neck.encoder.lstm.weight_ih_l1_reverse", "neck.en
coder.lstm.weight_hh_l1_reverse", "neck.encoder.lstm.bias_ih_l1_reverse", "neck.encoder.lstm.bias_hh_l1_reverse", "head.fc.weight", "head.fc.bias".
Unexpected key(s) in state_dict: "backbone.conv.conv.weight", "backbone.conv.bn.weight", "backbone.conv.bn.bias", "backbone.conv.bn.running_mean", "backbone.conv.bn.running_
var", "backbone.conv.bn.num_batches_tracked", "backbone.block_list.bottleneckBlock_0_0.conv0.conv.weight", "backbone.block_list.bottleneckBlock_0_0.conv0.bn.weight", "backbone.block
list.bottleneckBlock_0_0.conv0.bn.bias", "backbone.block_list.bottleneckBlock_0_0.conv0.bn.running_mean", "backbone.block_list.bottleneckBlock_0_0.conv0.bn.running_var", "backbone.
block_list.bottleneckBlock_0_0.conv0.bn.num_batches_tracked", "backbone.block_list.bottleneckBlock_0_0.conv1.conv.weight", "backbone.block_list.bottleneckBlock_0_0.conv1.bn.weight",
"backbone.block_list.bottleneckBlock_0_0.conv1.bn.bias", "backbone.block_list.bottleneckBlock_0_0.conv1.bn.running_mean", "backbone.block_list.bottleneckBlock_0_0.conv1.bn.running
var", "backbone.block_list.bottleneckBlock_0_0.conv1.bn.num_batches_tracked", "backbone.block_list.bottleneckBlock_0_0.conv2.conv.weight", "backbone.block_list.bottleneckBlock_0_0.c
onv2.bn.weight", "backbone.block_list.bottleneckBlock_0_0.conv2.bn.bias", "backbone.block_list.bottleneckBlock_0_0.conv2.bn.running_mean", "backbone.block_list.bottleneckBlock_0_0.c
onv2.bn.running_var", "backbone.block_list.bottleneckBlock_0_0.conv2.bn.num_batches_tracked", "backbone.block_list.bottleneckBlock_0_0.short.conv.conv.weight", "backbone.block_list.
bottleneckBlock_0_0.short.conv.bn.weight", "backbone.block_list.bottleneckBlock_0_0.short.conv.bn.bias", "backbone.block_list.bottleneckBlock_0_0.short.conv.bn.running_mean", "backb
one.block_list.bottleneckBlock_0_0.short.conv.bn.running_var", "backbone.block_list.bottleneckBlock_0_0.short.conv.bn.num_batches_tracked", "backbone.block_list.bottleneckBlock_0_1.
conv0.conv.weight", "backbone.block_list.bottleneckBlock_0_1.conv0.bn.weight", "backbone.block_list.bottleneckBlock_0_1.conv0.bn.bias", "backbone.block_list.bottleneckBlock_0_1.conv
0.bn.running_mean", "backbone.block_list.bottleneckBlock_0_1.conv0.bn.running_var", "backbone.block_list.bottleneckBlock_0_1.conv0.bn.num_batches_tracked", "backbone.block_list.bott
leneckBlock_0_1.conv1.conv.weight", "backbone.block_list.bottleneckBlock_0_1.conv1.bn.weight", "backbone.block_list.bottleneckBlock_0_1.conv1.bn.bias", "backbone.block_list.bottlene
ckBlock_0_1.conv1.bn.running_mean", "backbone.block_list.bottleneckBlock_0_1.conv1.bn.running_var", "backbone.block_list.bottleneckBlock_0_1.conv1.bn.num_batches_tracked", "backbone
.block_list.bottleneckBlock_0_1.conv2.conv.weight", "backbone.block_list.bottleneckBlock_0_1.conv2.bn.weight", "backbone.block_list.bottleneckBlock_0_1.conv2.bn.bias", "backbone.blo
ck_list.bottleneckBlock_0_1.conv2.bn.running_mean", "backbone.block_list.bottleneckBlock_0_1.conv2.bn.running_var", "backbone.block_list.bottleneckBlock_0_1.conv2.bn.num_batches_tra
cked", "backbone.block_list.bottleneckBlock_0_2.conv0.conv.weight", "backbone.block_list.bottleneckBlock_0_2.conv0.bn.weight", "backbone.block_list.bottleneckBlock_0_2.conv0.bn.bias
", "backbone.block_list.bottleneckBlock_0_2.conv0.bn.running_mean", "backbone.block_list.bottleneckBlock_0_2.conv0.bn.running_var", "backbone.block_list.bottleneckBlock_0_2.conv0.bn
.num_batches_tracked", "backbone.block_list.bottleneckBlock_0_2.conv1.conv.weight", "backbone.block_list.bottleneckBlock_0_2.conv1.bn.weight", "backbone.block_list.bottleneckBlock_0
2.conv1.bn.bias", "backbone.block_list.bottleneckBlock_0_2.conv1.bn.running_mean", "backbone.block_list.bottleneckBlock_0_2.conv1.bn.running_var", "backbone.block_list.bottleneckBl
ock_0_2.conv1.bn.num_batches_tracked", "backbone.block_list.bottleneckBlock_0_2.conv2.conv.weight", "backbone.block_list.bottleneckBlock_0_2.conv2.bn.weight", "backbone.block_list.b
ottleneckBlock_0_2.conv2.bn.bias", "backbone.block_list.bottleneckBlock_0_2.conv2.bn.running_mean", "backbone.block_list.bottleneckBlock_0_2.conv2.bn.running_var", "backbone.block_l
ist.bottleneckBlock_0_2.conv2.bn.num_batches_tracked", "backbone.block_list.bottleneckBlock_1_0.conv0.conv.weight", "backbone.block_list.bottleneckBlock_1_0.conv0.bn.weight", "backb
one.block_list.bottleneckBlock_1_0.conv0.bn.bias", "backbone.block_list.bottleneckBlock_1_0.conv0.bn.running_mean", "backbone.block_list.bottleneckBlock_1_0.conv0.bn.running_var", "
backbone.block_list.bottleneckBlock_1_0.conv0.bn.num_batches_tracked", "backbone.block_list.bottleneckBlock_1_0.conv1.conv.weight", "backbone.block_list.bottleneckBlock_1_0.conv1.bn
.weight", "backbone.block_list.bottleneckBlock_1_0.conv1.bn.bias", "backbone.block_list.bottleneckBlock_1_0.conv1.bn.running_mean", "backbone.block_list.bottleneckBlock_1_0.conv1.bn
.running_var", "backbone.block_list.bottleneckBlock_1_0.conv1.bn.num_batches_tracked", "backbone.block_list.bottleneckBlock_1_0.conv2.conv.weight", "backbone.block_list.bottleneckBl
ock_1_0.conv2.bn.weight", "backbone.block_list.bottleneckBlock_1_0.conv2.bn.bias", "backbone.block_list.bottleneckBlock_1_0.conv2.bn.running_mean", "backbone.block_list.bottleneckBl
ock_1_0.conv2.bn.running_var", "backbone.block_list.bottleneckBlock_1_0.conv2.bn.num_batches_tracked", "backbone.block_list.bottleneckBlock_1_0.short.conv.conv.weight", "backbone.bl
ock_list.bottleneckBlock_1_0.short.conv.bn.weight", "backbone.block_list.bottleneckBlock_1_0.short.conv.bn.bias", "backbone.block_list.bottleneckBlock_1_0.short.conv.bn.running_mean
", "backbone.block_list.bottleneckBlock_1_0.short.conv.bn.running_var", "backbone.block_list.bottleneckBlock_1_0.short.conv.bn.num_batches_tracked", "backbone.block_list.bottleneckB
lock_1_1.conv0.conv.weight", "backbone.block_list.bottleneckBlock_1_1.conv0.bn.weight", "backbone.block_list.bottleneckBlock_1_1.conv0.bn.bias", "backbone.block_list.bottleneckBlock
1_1.conv0.bn.running_mean", "backbone.block_list.bottleneckBlock_1_1.conv0.bn.running_var", "backbone.block_list.bottleneckBlock_1_1.conv0.bn.num_batches_tracked", "backbone.block
list.bottleneckBlock_1_1.conv1.conv.weight", "backbone.block_list.bottleneckBlock_1_1.conv1.bn.weight", "backbone.block_list.bottleneckBlock_1_1.conv1.bn.bias", "backbone.block_list
.bottleneckBlock_1_1.conv1.bn.running_mean", "backbone.block_list.bottleneckBlock_1_1.conv1.bn.running_var", "backbone.block_list.bottleneckBlock_1_1.conv1.bn.num_batches_tracked",
"backbone.block_list.bottleneckBlock_1_1.conv2.conv.weight", "backbone.block_list.bottleneckBlock_1_1.conv2.bn.weight", "backbone.block_list.bottleneckBlock_1_1.conv2.bn.bias", "bac
kbone.block_list.bottleneckBlock_1_1.conv2.bn.running_mean", "backbone.block_list.bottleneckBlock_1_1.conv2.bn.running_var", "backbone.block_list.bottleneckBlock_1_1.conv2.bn.num_ba
tches_tracked", "backbone.block_list.bottleneckBlock_1_2.conv0.conv.weight", "backbone.block_list.bottleneckBlock_1_2.conv0.bn.weight", "backbone.block_list.bottleneckBlock_1_2.conv
0.bn.bias", "backbone.block_list.bottleneckBlock_1_2.conv0.bn.running_mean", "backbone.block_list.bottleneckBlock_1_2.conv0.bn.running_var", "backbone.block_list.bottleneckBlock_1_2
.conv0.bn.num_batches_tracked", "backbone.block_list.bottleneckBlock_1_2.conv1.conv.weight", "backbone.block_list.bottleneckBlock_1_2.conv1.bn.weight", "backbone.block_list.bottlene
ckBlock_1_2.conv1.bn.bias", "backbone.block_list.bottleneckBlock_1_2.conv1.bn.running_mean", "backbone.block_list.bottleneckBlock_1_2.conv1.bn.running_var", "backbone.block_list.bot
tleneckBlock_1_2.conv1.bn.num_batches_tracked", "backbone.block_list.bottleneckBlock_1_2.conv2.conv.weight", "backbone.block_list.bottleneckBlock_1_2.conv2.bn.weight", "backbone.blo
ck_list.bottleneckBlock_1_2.conv2.bn.bias", "backbone.block_list.bottleneckBlock_1_2.conv2.bn.running_mean", "backbone.block_list.bottleneckBlock_1_2.conv2.bn.running_var", "backbon
e.block_list.bottleneckBlock_1_2.conv2.bn.num_batches_tracked", "backbone.block_list.bottleneckBlock_1_3.conv0.conv.weight", "backbone.block_list.bottleneckBlock_1_3.conv0.bn.weight
", "backbone.block_list.bottleneckBlock_1_3.conv0.bn.bias", "backbone.block_list.bottleneckBlock_1_3.conv0.bn.running_mean", "backbone.block_list.bottleneckBlock_1_3.conv0.bn.runnin
g_var", "backbone.block_list.bottleneckBlock_1_3.conv0.bn.num_batches_tracked", "backbone.block_list.bottleneckBlock_1_3.conv1.conv.weight", "backbone.block_list.bottleneckBlock_1_3
.conv1.bn.weight", "backbone.block_list.bottleneckBlock_1_3.conv1.bn.bias", "backbone.block_list.bottleneckBlock_1_3.conv1.bn.running_mean", "backbone.block_list.bottleneckBlock_1_3
.conv1.bn.running_var", "backbone.block_list.bottleneckBlock_1_3.conv1.bn.num_batches_tracked", "backbone.block_list.bottleneckBlock_1_3.conv2.conv.weight", "backbone.block_list.bot
tleneckBlock_1_3.conv2.bn.weight", "backbone.block_list.bottleneckBlock_1_3.conv2.bn.bias", "backbone.block_list.bottleneckBlock_1_3.conv2.bn.running_mean", "backbone.block_list.bot
tleneckBlock_1_3.conv2.bn.running_var", "backbone.block_list.bottleneckBlock_1_3.conv2.bn.num_batches_tracked", "backbone.block_list.bottleneckBlock_2_0.conv0.conv.weight", "backbon
e.block_list.bottleneckBlock_2_0.conv0.bn.weight", "backbone.block_list.bottleneckBlock_2_0.conv0.bn.bias", "backbone.block_list.bottleneckBlock_2_0.conv0.bn.running_mean", "backbon
e.block_list.bottleneckBlock_2_0.conv0.bn.running_var", "backbone.block_list.bottleneckBlock_2_0.conv0.bn.num_batches_tracked", "backbone.block_list.bottleneckBlock_2_0.conv1.conv.w
eight", "backbone.block_list.bottleneckBlock_2_0.conv1.bn.weight", "backbone.block_list.bottleneckBlock_2_0.conv1.bn.bias", "backbone.block_list.bottleneckBlock_2_0.conv1.bn.running
mean", "backbone.block_list.bottleneckBlock_2_0.conv1.bn.running_var", "backbone.block_list.bottleneckBlock_2_0.conv1.bn.num_batches_tracked", "backbone.block_list.bottleneckBlock
2_0.conv2.conv.weight", "backbone.block_list.bottleneckBlock_2_0.conv2.bn.weight", "backbone.block_list.bottleneckBlock_2_0.conv2.bn.bias", "backbone.block_list.bottleneckBlock_2_0.
conv2.bn.running_mean", "backbone.block_list.bottleneckBlock_2_0.conv2.bn.running_var", "backbone.block_list.bottleneckBlock_2_0.conv2.bn.num_batches_tracked", "backbone.block_list.
bottleneckBlock_2_0.short.conv.conv.weight", "backbone.block_list.bottleneckBlock_2_0.short.conv.bn.weight", "backbone.block_list.bottleneckBlock_2_0.short.conv.bn.bias", "backbone.
block_list.bottleneckBlock_2_0.short.conv.bn.running_mean", "backbone.block_list.bottleneckBlock_2_0.short.conv.bn.running_var", "backbone.block_list.bottleneckBlock_2_0.short.conv.
bn.num_batches_tracked", "backbone.block_list.bottleneckBlock_2_1.conv0.conv.weight", "backbone.block_list.bottleneckBlock_2_1.conv0.bn.weight", "backbone.block_list.bottleneckBlock
2_1.conv0.bn.bias", "backbone.block_list.bottleneckBlock_2_1.conv0.bn.running_mean", "backbone.block_list.bottleneckBlock_2_1.conv0.bn.running_var", "backbone.block_list.bottleneck
Block_2_1.conv0.bn.num_batches_tracked", "backbone.block_list.bottleneckBlock_2_1.conv1.conv.weight", "backbone.block_list.bottleneckBlock_2_1.conv1.bn.weight", "backbone.block_list
.bottleneckBlock_2_1.conv1.bn.bias", "backbone.block_list.bottleneckBlock_2_1.conv1.bn.running_mean", "backbone.block_list.bottleneckBlock_2_1.conv1.bn.running_var", "backbone.block
list.bottleneckBlock_2_1.conv1.bn.num_batches_tracked", "backbone.block_list.bottleneckBlock_2_1.conv2.conv.weight", "backbone.block_list.bottleneckBlock_2_1.conv2.bn.weight", "bac
kbone.block_list.bottleneckBlock_2_1.conv2.bn.bias", "backbone.block_list.bottleneckBlock_2_1.conv2.bn.running_mean", "backbone.block_list.bottleneckBlock_2_1.conv2.bn.running_var",
"backbone.block_list.bottleneckBlock_2_1.conv2.bn.num_batches_tracked", "backbone.block_list.bottleneckBlock_2_2.conv0.conv.weight", "backbone.block_list.bottleneckBlock_2_2.conv0.
bn.weight", "backbone.block_list.bottleneckBlock_2_2.conv0.bn.bias", "backbone.block_list.bottleneckBlock_2_2.conv0.bn.running_mean", "backbone.block_list.bottleneckBlock_2_2.conv0.
bn.running_var", "backbone.block_list.bottleneckBlock_2_2.conv0.bn.num_batches_tracked", "backbone.block_list.bottleneckBlock_2_2.conv1.conv.weight", "backbone.block_list.bottleneck
Block_2_2.conv1.bn.weight", "backbone.block_list.bottleneckBlock_2_2.conv1.bn.bias", "backbone.block_list.bottleneckBlock_2_2.conv1.bn.running_mean", "backbone.block_list.bottleneck
Block_2_2.conv1.bn.running_var", "backbone.block_list.bottleneckBlock_2_2.conv1.bn.num_batches_tracked", "backbone.block_list.bottleneckBlock_2_2.conv2.conv.weight", "backbone.block
list.bottleneckBlock_2_2.conv2.bn.weight", "backbone.block_list.bottleneckBlock_2_2.conv2.bn.bias", "backbone.block_list.bottleneckBlock_2_2.conv2.bn.running_mean", "backbone.block
list.bottleneckBlock_2_2.conv2.bn.running_var", "backbone.block_list.bottleneckBlock_2_2.conv2.bn.num_batches_tracked", "backbone.block_list.bottleneckBlock_2_3.conv0.conv.weight",
"backbone.block_list.bottleneckBlock_2_3.conv0.bn.weight", "backbone.block_list.bottleneckBlock_2_3.conv0.bn.bias", "backbone.block_list.bottleneckBlock_2_3.conv0.bn.running_mean",
"backbone.block_list.bottleneckBlock_2_3.conv0.bn.running_var", "backbone.block_list.bottleneckBlock_2_3.conv0.bn.num_batches_tracked", "backbone.block_list.bottleneckBlock_2_3.con
v1.conv.weight", "backbone.block_list.bottleneckBlock_2_3.conv1.bn.weight", "backbone.block_list.bottleneckBlock_2_3.conv1.bn.bias", "backbone.block_list.bottleneckBlock_2_3.conv1.b
n.running_mean", "backbone.block_list.bottleneckBlock_2_3.conv1.bn.running_var", "backbone.block_list.bottleneckBlock_2_3.conv1.bn.num_batches_tracked", "backbone.block_list.bottlen
eckBlock_2_3.conv2.conv.weight", "backbone.block_list.bottleneckBlock_2_3.conv2.bn.weight", "backbone.block_list.bottleneckBlock_2_3.conv2.bn.bias", "backbone.block_list.bottleneckB
lock_2_3.conv2.bn.running_mean", "backbone.block_list.bottleneckBlock_2_3.conv2.bn.running_var", "backbone.block_list.bottleneckBlock_2_3.conv2.bn.num_batches_tracked", "backbone.bl
ock_list.bottleneckBlock_2_4.conv0.conv.weight", "backbone.block_list.bottleneckBlock_2_4.conv0.bn.weight", "backbone.block_list.bottleneckBlock_2_4.conv0.bn.bias", "backbone.block
list.bottleneckBlock_2_4.conv0.bn.running_mean", "backbone.block_list.bottleneckBlock_2_4.conv0.bn.running_var", "backbone.block_list.bottleneckBlock_2_4.conv0.bn.num_batches_tracke
d", "backbone.block_list.bottleneckBlock_2_4.conv1.conv.weight", "backbone.block_list.bottleneckBlock_2_4.conv1.bn.weight", "backbone.block_list.bottleneckBlock_2_4.conv1.bn.bias",
"backbone.block_list.bottleneckBlock_2_4.conv1.bn.running_mean", "backbone.block_list.bottleneckBlock_2_4.conv1.bn.running_var", "backbone.block_list.bottleneckBlock_2_4.conv1.bn.nu
m_batches_tracked", "backbone.block_list.bottleneckBlock_2_4.conv2.conv.weight", "backbone.block_list.bottleneckBlock_2_4.conv2.bn.weight", "backbone.block_list.bottleneckBlock_2_4.
conv2.bn.bias", "backbone.block_list.bottleneckBlock_2_4.conv2.bn.running_mean", "backbone.block_list.bottleneckBlock_2_4.conv2.bn.running_var", "backbone.block_list.bottleneckBlock
2_4.conv2.bn.num_batches_tracked", "backbone.block_list.bottleneckBlock_2_5.conv0.conv.weight", "backbone.block_list.bottleneckBlock_2_5.conv0.bn.weight", "backbone.block_list.bott
leneckBlock_2_5.conv0.bn.bias", "backbone.block_list.bottleneckBlock_2_5.conv0.bn.running_mean", "backbone.block_list.bottleneckBlock_2_5.conv0.bn.running_var", "backbone.block_list
.bottleneckBlock_2_5.conv0.bn.num_batches_tracked", "backbone.block_list.bottleneckBlock_2_5.conv1.conv.weight", "backbone.block_list.bottleneckBlock_2_5.conv1.bn.weight", "backbone
.block_list.bottleneckBlock_2_5.conv1.bn.bias", "backbone.block_list.bottleneckBlock_2_5.conv1.bn.running_mean", "backbone.block_list.bottleneckBlock_2_5.conv1.bn.running_var", "bac
kbone.block_list.bottleneckBlock_2_5.conv1.bn.num_batches_tracked", "backbone.block_list.bottleneckBlock_2_5.conv2.conv.weight", "backbone.block_list.bottleneckBlock_2_5.conv2.bn.we
ight", "backbone.block_list.bottleneckBlock_2_5.conv2.bn.bias", "backbone.block_list.bottleneckBlock_2_5.conv2.bn.running_mean", "backbone.block_list.bottleneckBlock_2_5.conv2.bn.ru
nning_var", "backbone.block_list.bottleneckBlock_2_5.conv2.bn.num_batches_tracked", "backbone.block_list.bottleneckBlock_3_0.conv0.conv.weight", "backbone.block_list.bottleneckBlock
3_0.conv0.bn.weight", "backbone.block_list.bottleneckBlock_3_0.conv0.bn.bias", "backbone.block_list.bottleneckBlock_3_0.conv0.bn.running_mean", "backbone.block_list.bottleneckBlock
3_0.conv0.bn.running_var", "backbone.block_list.bottleneckBlock_3_0.conv0.bn.num_batches_tracked", "backbone.block_list.bottleneckBlock_3_0.conv1.conv.weight", "backbone.block_list
.bottleneckBlock_3_0.conv1.bn.weight", "backbone.block_list.bottleneckBlock_3_0.conv1.bn.bias", "backbone.block_list.bottleneckBlock_3_0.conv1.bn.running_mean", "backbone.block_list
.bottleneckBlock_3_0.conv1.bn.running_var", "backbone.block_list.bottleneckBlock_3_0.conv1.bn.num_batches_tracked", "backbone.block_list.bottleneckBlock_3_0.conv2.conv.weight", "bac
kbone.block_list.bottleneckBlock_3_0.conv2.bn.weight", "backbone.block_list.bottleneckBlock_3_0.conv2.bn.bias", "backbone.block_list.bottleneckBlock_3_0.conv2.bn.running_mean", "bac
kbone.block_list.bottleneckBlock_3_0.conv2.bn.running_var", "backbone.block_list.bottleneckBlock_3_0.conv2.bn.num_batches_tracked", "backbone.block_list.bottleneckBlock_3_0.short.co
nv.conv.weight", "backbone.block_list.bottleneckBlock_3_0.short.conv.bn.weight", "backbone.block_list.bottleneckBlock_3_0.short.conv.bn.bias", "backbone.block_list.bottleneckBlock_3
0.short.conv.bn.running_mean", "backbone.block_list.bottleneckBlock_3_0.short.conv.bn.running_var", "backbone.block_list.bottleneckBlock_3_0.short.conv.bn.num_batches_tracked", "ba
ckbone.block_list.bottleneckBlock_3_1.conv0.conv.weight", "backbone.block_list.bottleneckBlock_3_1.conv0.bn.weight", "backbone.block_list.bottleneckBlock_3_1.conv0.bn.bias", "backbo
ne.block_list.bottleneckBlock_3_1.conv0.bn.running_mean", "backbone.block_list.bottleneckBlock_3_1.conv0.bn.running_var", "backbone.block_list.bottleneckBlock_3_1.conv0.bn.num_batch
es_tracked", "backbone.block_list.bottleneckBlock_3_1.conv1.conv.weight", "backbone.block_list.bottleneckBlock_3_1.conv1.bn.weight", "backbone.block_list.bottleneckBlock_3_1.conv1.b
n.bias", "backbone.block_list.bottleneckBlock_3_1.conv1.bn.running_mean", "backbone.block_list.bottleneckBlock_3_1.conv1.bn.running_var", "backbone.block_list.bottleneckBlock_3_1.co
nv1.bn.num_batches_tracked", "backbone.block_list.bottleneckBlock_3_1.conv2.conv.weight", "backbone.block_list.bottleneckBlock_3_1.conv2.bn.weight", "backbone.block_list.bottleneckB
lock_3_1.conv2.bn.bias", "backbone.block_list.bottleneckBlock_3_1.conv2.bn.running_mean", "backbone.block_list.bottleneckBlock_3_1.conv2.bn.running_var", "backbone.block_list.bottle
neckBlock_3_1.conv2.bn.num_batches_tracked", "backbone.block_list.bottleneckBlock_3_2.conv0.conv.weight", "backbone.block_list.bottleneckBlock_3_2.conv0.bn.weight", "backbone.block
list.bottleneckBlock_3_2.conv0.bn.bias", "backbone.block_list.bottleneckBlock_3_2.conv0.bn.running_mean", "backbone.block_list.bottleneckBlock_3_2.conv0.bn.running_var", "backbone.b
lock_list.bottleneckBlock_3_2.conv0.bn.num_batches_tracked", "backbone.block_list.bottleneckBlock_3_2.conv1.conv.weight", "backbone.block_list.bottleneckBlock_3_2.conv1.bn.weight",
"backbone.block_list.bottleneckBlock_3_2.conv1.bn.bias", "backbone.block_list.bottleneckBlock_3_2.conv1.bn.running_mean", "backbone.block_list.bottleneckBlock_3_2.conv1.bn.running_v
ar", "backbone.block_list.bottleneckBlock_3_2.conv1.bn.num_batches_tracked", "backbone.block_list.bottleneckBlock_3_2.conv2.conv.weight", "backbone.block_list.bottleneckBlock_3_2.co
nv2.bn.weight", "backbone.block_list.bottleneckBlock_3_2.conv2.bn.bias", "backbone.block_list.bottleneckBlock_3_2.conv2.bn.running_mean", "backbone.block_list.bottleneckBlock_3_2.co
nv2.bn.running_var", "backbone.block_list.bottleneckBlock_3_2.conv2.bn.num_batches_tracked", "backbone.base_block.F-2_base_block_0.weight", "backbone.base_block.F-2_base_block_0.b
ias", "backbone.base_block.F-2_base_block_1.weight", "backbone.base_block.F-2_base_block_1.bias", "backbone.base_block.F-2_base_block_2.0.weight", "backbone.base_block.F-2_base
block_2.0.bias", "backbone.base_block.F_-2_base_block_2.0.running_mean", "backbone.base_block.F_-2_base_block_2.0.running_var", "backbone.base_block.F_-2_base_block_2.0.num_batches_
tracked", "backbone.base_block.F_-3_base_block_0.weight", "backbone.base_block.F_-3_base_block_0.bias", "backbone.base_block.F_-3_base_block_1.weight", "backbone.base_block.F_-3_bas
e_block_1.bias", "backbone.base_block.F_-3_base_block_2.0.weight", "backbone.base_block.F_-3_base_block_2.0.bias", "backbone.base_block.F_-3_base_block_2.0.running_mean", "backbone.
base_block.F_-3_base_block_2.0.running_var", "backbone.base_block.F_-3_base_block_2.0.num_batches_tracked", "backbone.base_block.F_-3_base_block_3.weight", "backbone.base_block.F_-3
_base_block_3.bias", "head.pvam.wrap_encoder_for_feature.prepare_encoder.emb.weight", "head.pvam.wrap_encoder_for_feature.encoder.encoder_layers.layer_0.preprocesser1.functors.layer
_norm_0.weight", "head.pvam.wrap_encoder_for_feature.encoder.encoder_layers.layer_0.preprocesser1.functors.layer_norm_0.bias", "head.pvam.wrap_encoder_for_feature.encoder.encoder_la
yers.layer_0.self_attn.q_fc.weight", "head.pvam.wrap_encoder_for_feature.encoder.encoder_layers.layer_0.self_attn.k_fc.weight", "head.pvam.wrap_encoder_for_feature.encoder.encoder_l
ayers.layer_0.self_attn.v_fc.weight", "head.pvam.wrap_encoder_for_feature.encoder.encoder_layers.layer_0.self_attn.proj_fc.weight", "head.pvam.wrap_encoder_for_feature.encoder.encod
er_layers.layer_0.preprocesser2.functors.layer_norm_0.weight", "head.pvam.wrap_encoder_for_feature.encoder.encoder_layers.layer_0.preprocesser2.functors.layer_norm_0.bias", "head.pv
am.wrap_encoder_for_feature.encoder.encoder_layers.layer_0.ffn.fc1.weight", "head.pvam.wrap_encoder_for_feature.encoder.encoder_layers.layer_0.ffn.fc1.bias", "head.pvam.wrap_encoder
_for_feature.encoder.encoder_layers.layer_0.ffn.fc2.weight", "head.pvam.wrap_encoder_for_feature.encoder.encoder_layers.layer_0.ffn.fc2.bias", "head.pvam.wrap_encoder_for_feature.en
coder.encoder_layers.layer_1.preprocesser1.functors.layer_norm_0.weight", "head.pvam.wrap_encoder_for_feature.encoder.encoder_layers.layer_1.preprocesser1.functors.layer_norm_0.bias
", "head.pvam.wrap_encoder_for_feature.encoder.encoder_layers.layer_1.self_attn.q_fc.weight", "head.pvam.wrap_encoder_for_feature.encoder.encoder_layers.layer_1.self_attn.k_fc.weigh
t", "head.pvam.wrap_encoder_for_feature.encoder.encoder_layers.layer_1.self_attn.v_fc.weight", "head.pvam.wrap_encoder_for_feature.encoder.encoder_layers.layer_1.self_attn.proj_fc.w
eight", "head.pvam.wrap_encoder_for_feature.encoder.encoder_layers.layer_1.preprocesser2.functors.layer_norm_0.weight", "head.pvam.wrap_encoder_for_feature.encoder.encoder_layers.la
yer_1.preprocesser2.functors.layer_norm_0.bias", "head.pvam.wrap_encoder_for_feature.encoder.encoder_layers.layer_1.ffn.fc1.weight", "head.pvam.wrap_encoder_for_feature.encoder.enco
der_layers.layer_1.ffn.fc1.bias", "head.pvam.wrap_encoder_for_feature.encoder.encoder_layers.layer_1.ffn.fc2.weight", "head.pvam.wrap_encoder_for_feature.encoder.encoder_layers.laye
r_1.ffn.fc2.bias", "head.pvam.wrap_encoder_for_feature.encoder.processer.functors.layer_norm_0.weight", "head.pvam.wrap_encoder_for_feature.encoder.processer.functors.layer_norm_0.b
ias", "head.pvam.fc0.weight", "head.pvam.fc0.bias", "head.pvam.emb.weight", "head.pvam.fc1.weight", "head.gsrm.fc0.weight", "head.gsrm.fc0.bias", "head.gsrm.wrap_encoder0.prepare_de
coder.emb0.weight", "head.gsrm.wrap_encoder0.prepare_decoder.emb1.weight", "head.gsrm.wrap_encoder0.encoder.encoder_layers.layer_0.preprocesser1.functors.layer_norm_0.weight", "head
.gsrm.wrap_encoder0.encoder.encoder_layers.layer_0.preprocesser1.functors.layer_norm_0.bias", "head.gsrm.wrap_encoder0.encoder.encoder_layers.layer_0.self_attn.q_fc.weight", "head.g
srm.wrap_encoder0.encoder.encoder_layers.layer_0.self_attn.k_fc.weight", "head.gsrm.wrap_encoder0.encoder.encoder_layers.layer_0.self_attn.v_fc.weight", "head.gsrm.wrap_encoder0.enc
oder.encoder_layers.layer_0.self_attn.proj_fc.weight", "head.gsrm.wrap_encoder0.encoder.encoder_layers.layer_0.preprocesser2.functors.layer_norm_0.weight", "head.gsrm.wrap_encoder0.
encoder.encoder_layers.layer_0.preprocesser2.functors.layer_norm_0.bias", "head.gsrm.wrap_encoder0.encoder.encoder_layers.layer_0.ffn.fc1.weight", "head.gsrm.wrap_encoder0.encoder.e
ncoder_layers.layer_0.ffn.fc1.bias", "head.gsrm.wrap_encoder0.encoder.encoder_layers.layer_0.ffn.fc2.weight", "head.gsrm.wrap_encoder0.encoder.encoder_layers.layer_0.ffn.fc2.bias",
"head.gsrm.wrap_encoder0.encoder.encoder_layers.layer_1.preprocesser1.functors.layer_norm_0.weight", "head.gsrm.wrap_encoder0.encoder.encoder_layers.layer_1.preprocesser1.functors.l
ayer_norm_0.bias", "head.gsrm.wrap_encoder0.encoder.encoder_layers.layer_1.self_attn.q_fc.weight", "head.gsrm.wrap_encoder0.encoder.encoder_layers.layer_1.self_attn.k_fc.weight", "h
ead.gsrm.wrap_encoder0.encoder.encoder_layers.layer_1.self_attn.v_fc.weight", "head.gsrm.wrap_encoder0.encoder.encoder_layers.layer_1.self_attn.proj_fc.weight", "head.gsrm.wrap_enco
der0.encoder.encoder_layers.layer_1.preprocesser2.functors.layer_norm_0.weight", "head.gsrm.wrap_encoder0.encoder.encoder_layers.layer_1.preprocesser2.functors.layer_norm_0.bias", "
head.gsrm.wrap_encoder0.encoder.encoder_layers.layer_1.ffn.fc1.weight", "head.gsrm.wrap_encoder0.encoder.encoder_layers.layer_1.ffn.fc1.bias", "head.gsrm.wrap_encoder0.encoder.encod
er_layers.layer_1.ffn.fc2.weight", "head.gsrm.wrap_encoder0.encoder.encoder_layers.layer_1.ffn.fc2.bias", "head.gsrm.wrap_encoder0.encoder.encoder_layers.layer_2.preprocesser1.funct
ors.layer_norm_0.weight", "head.gsrm.wrap_encoder0.encoder.encoder_layers.layer_2.preprocesser1.functors.layer_norm_0.bias", "head.gsrm.wrap_encoder0.encoder.encoder_layers.layer_2.
self_attn.q_fc.weight", "head.gsrm.wrap_encoder0.encoder.encoder_layers.layer_2.self_attn.k_fc.weight", "head.gsrm.wrap_encoder0.encoder.encoder_layers.layer_2.self_attn.v_fc.weight
", "head.gsrm.wrap_encoder0.encoder.encoder_layers.layer_2.self_attn.proj_fc.weight", "head.gsrm.wrap_encoder0.encoder.encoder_layers.layer_2.preprocesser2.functors.layer_norm_0.wei
ght", "head.gsrm.wrap_encoder0.encoder.encoder_layers.layer_2.preprocesser2.functors.layer_norm_0.bias", "head.gsrm.wrap_encoder0.encoder.encoder_layers.layer_2.ffn.fc1.weight", "he
ad.gsrm.wrap_encoder0.encoder.encoder_layers.layer_2.ffn.fc1.bias", "head.gsrm.wrap_encoder0.encoder.encoder_layers.layer_2.ffn.fc2.weight", "head.gsrm.wrap_encoder0.encoder.encoder
layers.layer_2.ffn.fc2.bias", "head.gsrm.wrap_encoder0.encoder.encoder_layers.layer_3.preprocesser1.functors.layer_norm_0.weight", "head.gsrm.wrap_encoder0.encoder.encoder_layers.l
ayer_3.preprocesser1.functors.layer_norm_0.bias", "head.gsrm.wrap_encoder0.encoder.encoder_layers.layer_3.self_attn.q_fc.weight", "head.gsrm.wrap_encoder0.encoder.encoder_layers.lay
er_3.self_attn.k_fc.weight", "head.gsrm.wrap_encoder0.encoder.encoder_layers.layer_3.self_attn.v_fc.weight", "head.gsrm.wrap_encoder0.encoder.encoder_layers.layer_3.self_attn.proj_f
c.weight", "head.gsrm.wrap_encoder0.encoder.encoder_layers.layer_3.preprocesser2.functors.layer_norm_0.weight", "head.gsrm.wrap_encoder0.encoder.encoder_layers.layer_3.preprocesser2
.functors.layer_norm_0.bias", "head.gsrm.wrap_encoder0.encoder.encoder_layers.layer_3.ffn.fc1.weight", "head.gsrm.wrap_encoder0.encoder.encoder_layers.layer_3.ffn.fc1.bias", "head.g
srm.wrap_encoder0.encoder.encoder_layers.layer_3.ffn.fc2.weight", "head.gsrm.wrap_encoder0.encoder.encoder_layers.layer_3.ffn.fc2.bias", "head.gsrm.wrap_encoder0.encoder.processer.f
unctors.layer_norm_0.weight", "head.gsrm.wrap_encoder0.encoder.processer.functors.layer_norm_0.bias", "head.gsrm.wrap_encoder1.prepare_decoder.emb0.weight", "head.gsrm.wrap_encoder1
.prepare_decoder.emb1.weight", "head.gsrm.wrap_encoder1.encoder.encoder_layers.layer_0.preprocesser1.functors.layer_norm_0.weight", "head.gsrm.wrap_encoder1.encoder.encoder_layers.l
ayer_0.preprocesser1.functors.layer_norm_0.bias", "head.gsrm.wrap_encoder1.encoder.encoder_layers.layer_0.self_attn.q_fc.weight", "head.gsrm.wrap_encoder1.encoder.encoder_layers.lay
er_0.self_attn.k_fc.weight", "head.gsrm.wrap_encoder1.encoder.encoder_layers.layer_0.self_attn.v_fc.weight", "head.gsrm.wrap_encoder1.encoder.encoder_layers.layer_0.self_attn.proj_f
c.weight", "head.gsrm.wrap_encoder1.encoder.encoder_layers.layer_0.preprocesser2.functors.layer_norm_0.weight", "head.gsrm.wrap_encoder1.encoder.encoder_layers.layer_0.preprocesser2
.functors.layer_norm_0.bias", "head.gsrm.wrap_encoder1.encoder.encoder_layers.layer_0.ffn.fc1.weight", "head.gsrm.wrap_encoder1.encoder.encoder_layers.layer_0.ffn.fc1.bias", "head.g
srm.wrap_encoder1.encoder.encoder_layers.layer_0.ffn.fc2.weight", "head.gsrm.wrap_encoder1.encoder.encoder_layers.layer_0.ffn.fc2.bias", "head.gsrm.wrap_encoder1.encoder.encoder_lay
ers.layer_1.preprocesser1.functors.layer_norm_0.weight", "head.gsrm.wrap_encoder1.encoder.encoder_layers.layer_1.preprocesser1.functors.layer_norm_0.bias", "head.gsrm.wrap_encoder1.
encoder.encoder_layers.layer_1.self_attn.q_fc.weight", "head.gsrm.wrap_encoder1.encoder.encoder_layers.layer_1.self_attn.k_fc.weight", "head.gsrm.wrap_encoder1.encoder.encoder_layer
s.layer_1.self_attn.v_fc.weight", "head.gsrm.wrap_encoder1.encoder.encoder_layers.layer_1.self_attn.proj_fc.weight", "head.gsrm.wrap_encoder1.encoder.encoder_layers.layer_1.preproce
sser2.functors.layer_norm_0.weight", "head.gsrm.wrap_encoder1.encoder.encoder_layers.layer_1.preprocesser2.functors.layer_norm_0.bias", "head.gsrm.wrap_encoder1.encoder.encoder_laye
rs.layer_1.ffn.fc1.weight", "head.gsrm.wrap_encoder1.encoder.encoder_layers.layer_1.ffn.fc1.bias", "head.gsrm.wrap_encoder1.encoder.encoder_layers.layer_1.ffn.fc2.weight", "head.gsr
m.wrap_encoder1.encoder.encoder_layers.layer_1.ffn.fc2.bias", "head.gsrm.wrap_encoder1.encoder.encoder_layers.layer_2.preprocesser1.functors.layer_norm_0.weight", "head.gsrm.wrap_en
coder1.encoder.encoder_layers.layer_2.preprocesser1.functors.layer_norm_0.bias", "head.gsrm.wrap_encoder1.encoder.encoder_layers.layer_2.self_attn.q_fc.weight", "head.gsrm.wrap_enco
der1.encoder.encoder_layers.layer_2.self_attn.k_fc.weight", "head.gsrm.wrap_encoder1.encoder.encoder_layers.layer_2.self_attn.v_fc.weight", "head.gsrm.wrap_encoder1.encoder.encoder
layers.layer_2.self_attn.proj_fc.weight", "head.gsrm.wrap_encoder1.encoder.encoder_layers.layer_2.preprocesser2.functors.layer_norm_0.weight", "head.gsrm.wrap_encoder1.encoder.encod
er_layers.layer_2.preprocesser2.functors.layer_norm_0.bias", "head.gsrm.wrap_encoder1.encoder.encoder_layers.layer_2.ffn.fc1.weight", "head.gsrm.wrap_encoder1.encoder.encoder_layers
.layer_2.ffn.fc1.bias", "head.gsrm.wrap_encoder1.encoder.encoder_layers.layer_2.ffn.fc2.weight", "head.gsrm.wrap_encoder1.encoder.encoder_layers.layer_2.ffn.fc2.bias", "head.gsrm.wr
ap_encoder1.encoder.encoder_layers.layer_3.preprocesser1.functors.layer_norm_0.weight", "head.gsrm.wrap_encoder1.encoder.encoder_layers.layer_3.preprocesser1.functors.layer_norm_0.b
ias", "head.gsrm.wrap_encoder1.encoder.encoder_layers.layer_3.self_attn.q_fc.weight", "head.gsrm.wrap_encoder1.encoder.encoder_layers.layer_3.self_attn.k_fc.weight", "head.gsrm.wrap
_encoder1.encoder.encoder_layers.layer_3.self_attn.v_fc.weight", "head.gsrm.wrap_encoder1.encoder.encoder_layers.layer_3.self_attn.proj_fc.weight", "head.gsrm.wrap_encoder1.encoder.
encoder_layers.layer_3.preprocesser2.functors.layer_norm_0.weight", "head.gsrm.wrap_encoder1.encoder.encoder_layers.layer_3.preprocesser2.functors.layer_norm_0.bias", "head.gsrm.wra
p_encoder1.encoder.encoder_layers.layer_3.ffn.fc1.weight", "head.gsrm.wrap_encoder1.encoder.encoder_layers.layer_3.ffn.fc1.bias", "head.gsrm.wrap_encoder1.encoder.encoder_layers.lay
er_3.ffn.fc2.weight", "head.gsrm.wrap_encoder1.encoder.encoder_layers.layer_3.ffn.fc2.bias", "head.gsrm.wrap_encoder1.encoder.processer.functors.layer_norm_0.weight", "head.gsrm.wra
p_encoder1.encoder.processer.functors.layer_norm_0.bias", "head.vsfd.fc0.weight", "head.vsfd.fc0.bias", "head.vsfd.fc1.weight", "head.vsfd.fc1.bias".
大佬什么时候开始更新3.0版本的svtr呢?期待
I was able to convert the PP-structure paddle train model (best_accuracy.pdparams, best_accuracy.pdopt, best_accuracy.stated) to pytorch model (model.pth). How can I convert the model.pth to onnx model considering that model.pth is training model not inference model?
Should I convert the mode.pth( train) to inference model and then to onnx, or sth?
Thanks
你好, 感谢您分享的pytorch版ppocr模型.
想说能否提供torchserve的部署方案和文档呢?
我想转化成Android可以使用的pt或ptl文件,使用官方提供的转化手段如下:
在predict_det.pt加载好检测的v3模型后添加代码如下:
example = torch.rand(1, 3, 640, 640)
traced_script_module = torch.jit.trace(self.net, example)
traced_script_module_optimized = optimize_for_mobile(traced_script_module)
traced_script_module_optimized._save_for_lite_interpreter("ptocr_v3_det.ptl")
出现如下错误:
Encountering a dict at the output of the tracer might cause the trace to be incorrect, this is only valid if the container structure does not change based on the module's inputs. Consider using a constant container instead (e.g. for list
, use a tuple
instead. for dict
, use a NamedTuple
instead). If you absolutely need this and know the side effects, pass strict=False to trace() to allow this behavior.
请问您有什么思路或者解决办法吗?或者后续会提供保存好的pt模型吗?
非常感谢!!!
想要基于这些模型做fine-tuning,请问支持吗?
Hi, thanks for releasing this nice converter, it's been very useful! I'm trying to benchmark the performance of PaddleOCR model and the corresponding converted PyTorch model on ICDAR2015 dataset and found there is a big gap between them that I couldn't explain, can you help me?
The model I'm using is det_r50_vd_db_v2.0_train
and the corresponding PyTorch model is det_r50_vd_db_v2.0_infer.pth
.
The reported performance for DB ResNet50_vd
is precision: 86.41%, recall: 78.72%, hmean 82.38%.
However, the best performance I can get from the converted model so far is precision: 66.51%, recall: 69.14%, hmean: 67.80%.
The metric is calculated using the PaddleOCR's DetMetric
class and I've matched exactly the same preprocessing and post-processing pipelines. I also excluded those bounding boxes which have ###
as labels as done in the PaddleOCR data preparation.
I've also searched issues in PaddleOCR and see if others experienced performance degradation and adjust some inference parameters such as using image_shape
as the same as in the training configuration file.
Do you have an idea what's going on in my case? Am I missing something? I would love to have your advice.
Yuhuang.
调用ch_ptocr_v3_rec_infer.pth
https://github.com/frotms/PaddleOCR2Pytorch/blob/main/tools/infer/predict_rec.py#L286
图片resize时高为48,宽被压缩,在识别一些英文和数字时,精度受到影响
感谢作者的工作,正好看到一个小问题
下面是作者转写的,其中bias=True
PaddleOCR2Pytorch/pytorchocr/modeling/heads/rec_att_head.py
Lines 76 to 77 in 28ac119
Paddle系列写法源码
self.rnn = nn.GRUCell(input_size=input_size + num_embeddings, hidden_size=hidden_size)
bias
默认为None
,作者转写对应GRUCell
设置为bias=True
@frotms, I tried the Paddle code for conversion of TPS based models, the model gets converted but causes problems during the inference. Can you add support for TPS based models conversion using PyTorch?
python ./converter/ch_ppocr_mobile_v2.0_det_converter.py --src_model_path ./ch_ppocr_mobile_v2.0_det_infer/
{'k': 50, 'in_channels': 96}
paddle weights loading...
Traceback (most recent call last):
File "./converter/ch_ppocr_mobile_v2.0_det_converter.py", line 61, in <module>
converter = MobileV20DetConverter(cfg, paddle_pretrained_model_path)
File "./converter/ch_ppocr_mobile_v2.0_det_converter.py", line 13, in __init__
self.load_paddle_weights(paddle_pretrained_model_path)
File "./converter/ch_ppocr_mobile_v2.0_det_converter.py", line 43, in load_paddle_weights
self.net.state_dict()[k].copy_(torch.Tensor(para_state_dict[ppname]))
KeyError: 'backbone.conv.conv.weight'
I do not have access to baidu pan website , can somebody plz uplaod this models on Google Drive
请问下对pytorch版本有要求吗?我使用ch_ptocr_v3_rec_infer.pth的识别结果:
python ./tools/infer/predict_rec.py --rec_algorithm SVTR --rec_model_path ./ch_ptocr_v3_rec_infer.pth --rec_image_shape 3,48,320 --image_dir test.jpg
('注室你的以发一夜七发使用4突击步检命中头部海淡了', 0.74806666)
以下是paddleocr的识别结果:
paddleocr --image_dir test.jpg --det false
('主室你的队友一液七次i使用AKM突击步枪命中头部淘汰了', 0.9387470483779907)
请问下我在PaddleOCR那边训练好了一个检测模型后
python3 tools/train.py -c configs/det/det_mv3_db.yml \
-o Global.pretrained_model=./pretrain_models/MobileNetV3_large_x0_5_pretrained
然后利用det_converter.py转换为自己的模型后,去预测的时候,就预测不出来了,可能是什么原因呢?
1、训练好的模型,利用PaddleOCR自带的预测命令,都可以预测对。
2、转换后的参数,可以正确的载入检测模型,但是文字一张都预测不出来。
python ./converter/ch_ppocr_v2_rec_converter.py --src_model_path ./ch_PP-OCRv2_rec_train
文件路径:ch_PP-OCRv2_rec_train/best_accuracy/.pdopt、.pdparams、**.states
完整报错如下:
W1223 17:12:03.727869 23403 device_context.cc:404] Please NOTE: device: 0, GPU Compute Capability: 7.5, Driver API Version: 11.0, Runtime API Version: 10.2
W1223 17:12:03.732515 23403 device_context.cc:422] device: 0, cuDNN Version: 8.0.
Traceback (most recent call last):
File "./converter/ch_ppocr_v2_rec_converter.py", line 80, in
converter = PPOCRv2RecConverter(cfg, paddle_pretrained_model_path)
File "./converter/ch_ppocr_v2_rec_converter.py", line 12, in init
para_state_dict, opti_state_dict = self.read_paddle_weights(paddle_pretrained_model_path)
File "/data/cxchen/PaddleOCR2Pytorch/pytorchocr/base_ocr_v20.py", line 94, in read_paddle_weights
para_state_dict, opti_state_dict = fluid.load_dygraph(weights_path)
File "/data/cxchen/venv/lib/python3.6/site-packages/paddle/fluid/dygraph/checkpoint.py", line 290, in load_dygraph
attrs={'file_path': os.path.join(model_path, name)})
File "/data/cxchen/venv/lib/python3.6/site-packages/paddle/fluid/dygraph/tracer.py", line 45, in trace_op
not stop_gradient)
ValueError: (InvalidArgument) Deserialize to tensor failed, maybe the loaded file is not a paddle model(expected file format: 0, but 1904018048 found).
[Hint: Expected version == 0U, but received version:1904018048 != 0U:0.] (at /paddle/paddle/fluid/framework/lod_tensor.cc:329)
[operator < load > error]
I was able to convert the PP-structure paddle train model (best_accuracy.pdparams, best_accuracy.pdopt, best_accuracy.stated) to pytorch model (model.pth). However I realized that the model output is not the same as the paddle model. I did some investigation and I seems the paddle and the backbone weights are the same however the shape of the attention head in the pytorch model is different than the paddle model. This is a bug in the code. Would you be able to fix it?
Thanks
File "/home/guanmengnan/miniconda3/envs/TSF/lib/python3.7/tarfile.py", line 1754, in getmember
raise KeyError("filename %r not found" % name)
KeyError: "filename 'storages' not found"
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.