Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

导出训练好的模型报错 #254

Open
xiaozo opened this issue Jun 16, 2023 · 4 comments
Open

导出训练好的模型报错 #254

xiaozo opened this issue Jun 16, 2023 · 4 comments

Comments

@xiaozo
Copy link

xiaozo commented Jun 16, 2023

我用的cnocr版本是2.2.2.3,执行cnocr export-onnx -o /Users/ZLX_1/Desktop/cocos2d/test.onnx 命令报错:

Traceback (most recent call last):
File "/Users/ZLX_1/Library/Python/3.9/bin/cnocr", line 8, in
sys.exit(cli())
File "/Users/ZLX_1/Library/Python/3.9/lib/python/site-packages/click/core.py", line 1130, in call
return self.main(*args, **kwargs)
File "/Users/ZLX_1/Library/Python/3.9/lib/python/site-packages/click/core.py", line 1055, in main
rv = self.invoke(ctx)
File "/Users/ZLX_1/Library/Python/3.9/lib/python/site-packages/click/core.py", line 1657, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/Users/ZLX_1/Library/Python/3.9/lib/python/site-packages/click/core.py", line 1404, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/Users/ZLX_1/Library/Python/3.9/lib/python/site-packages/click/core.py", line 760, in invoke
return __callback(*args, **kwargs)
File "/Users/ZLX_1/Library/Python/3.9/lib/python/site-packages/cnocr/cli.py", line 541, in export_onnx_model
export_to_onnx(rec_model_name, output_model_fp, input_model_fp)
File "/Users/ZLX_1/Library/Python/3.9/lib/python/site-packages/cnocr/cli.py", line 486, in export_to_onnx
model = ocr._model
AttributeError: 'CnOcr' object has no attribute '_model'

@breezedeus
Copy link
Owner

你试试先用 cnocr resave 转存 ,再调这个命令。

@xiaozo
Copy link
Author

xiaozo commented Jun 17, 2023

好的,我试试

@cpp597455873
Copy link

cnocr resave 调用后依然报错

@HaviZou
Copy link

HaviZou commented Aug 3, 2023

遇见了相同的问题,请问你导出成功了吗?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants