Skip to content
New issue

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

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

Already on GitHub? # to your account

paddle怎么训练docunet? #11817

Closed
nissansz opened this issue Mar 27, 2024 · 13 comments
Closed

paddle怎么训练docunet? #11817

nissansz opened this issue Mar 27, 2024 · 13 comments
Assignees

Comments

@nissansz
Copy link

请提供下述完整信息以便快速定位问题/Please provide the following information to quickly locate the problem

  • 系统环境/System Environment:
  • 版本号/Version:Paddle: PaddleOCR:2.7.1 问题相关组件/Related components:
  • 运行指令/Command Code:
  • 完整报错/Complete Error Message:

请尽量不要包含图片在问题中/Please try to not include the image in the issue.

https://github.com/teresasun/docUnet.pytorch

@Sunting78
Copy link
Collaborator

您好 目前暂时没有集成该算法。其他文档矫正算法,如doctr++有开发者在提PR可以参考下。#11475

@nissansz
Copy link
Author

谢谢。 有训练好的模型吗?怎么使用doctr++

@Sunting78
Copy link
Collaborator

暂时没有。使用方法可以参考该PR。由于暂未合入,开发者提交的doctr++代码是否完备以及是否完全能复现,暂时还未知。

@GreatV
Copy link
Collaborator

GreatV commented Apr 26, 2024

可以试试这个仓库 https://github.com/GreatV/DocTrPP

@nissansz
Copy link
Author

nissansz commented Apr 26, 2024 via email

@GreatV
Copy link
Collaborator

GreatV commented Apr 26, 2024

是python实现的,与操作系统无关。

@nissansz
Copy link
Author

报这个错误,怎么解决?

python predict.py -i "F:\0Table03\3.jpg" -m L:\img2table\DocTrPP-main\best.ckpt -o F:\3result.jpg
Namespace(image='F:\0Table03\3.jpg', model='L:\img2table\DocTrPP-main\best.ckpt', output='F:\3result.jpg')
W0427 08:19:53.655071 50756 gpu_resources.cc:61] Please NOTE: device: 0, GPU Compute Capability: 6.1, Driver API Version: 12.0, Runtime API Version: 10.2
W0427 08:19:53.673440 50756 gpu_resources.cc:91] device: 0, cuDNN Version: 7.6.
Traceback (most recent call last):
File "predict.py", line 69, in
run(args)
File "predict.py", line 25, in run
bm = model(x)
File "D:\Python3.8.8\lib\site-packages\paddle\fluid\dygraph\layers.py", line 930, in call
return self._dygraph_call_func(*inputs, **kwargs)
File "D:\Python3.8.8\lib\site-packages\paddle\fluid\dygraph\layers.py", line 915, in _dygraph_call_func
outputs = self.forward(*inputs, **kwargs)
File "L:\img2table\DocTrPP-main\GeoTr.py", line 370, in forward
fmap1 = self.getattr(self.encoder_block[0])(fmap)
File "D:\Python3.8.8\lib\site-packages\paddle\fluid\dygraph\layers.py", line 930, in call
return self._dygraph_call_func(*inputs, **kwargs)
File "D:\Python3.8.8\lib\site-packages\paddle\fluid\dygraph\layers.py", line 915, in _dygraph_call_func
outputs = self.forward(*inputs, **kwargs)
File "L:\img2table\DocTrPP-main\GeoTr.py", line 206, in forward
pos = self.position_embedding(
File "D:\Python3.8.8\lib\site-packages\paddle\fluid\dygraph\layers.py", line 930, in call
return self._dygraph_call_func(*inputs, **kwargs)
File "D:\Python3.8.8\lib\site-packages\paddle\fluid\dygraph\layers.py", line 915, in _dygraph_call_func
outputs = self.forward(*inputs, **kwargs)
File "L:\img2table\DocTrPP-main\position_encoding.py", line 55, in forward
dim_t = self.temperature ** (2 * (dim_t // 2) / self.num_pos_feats)
File "D:\Python3.8.8\lib\site-packages\paddle\fluid\dygraph\math_op_patch.py", line 299, in impl
return math_op(self, other_var, 'axis', axis)
RuntimeError: (NotFound) There are no kernels which are registered in the elementwise_floordiv operator.
[Hint: Expected kernels_iter != all_op_kernels.end(), but received kernels_iter == all_op_kernels.end().] (at ..\paddle\fluid\imperative\prepared_operator.cc:341)
[operator < elementwise_floordiv > error]

@GreatV
Copy link
Collaborator

GreatV commented Apr 27, 2024

是不是paddle版本不对,建议按照 https://www.paddlepaddle.org.cn/ 安装

@nissansz
Copy link
Author

要哪个版本?requirements里没看到要paddlepaddle 版本
hdf5storage
loguru
numpy
scipy
opencv-python
matplotlib
albumentations

@GreatV
Copy link
Collaborator

GreatV commented Apr 27, 2024

最新版paddle就好了

@nissansz
Copy link
Author

哦。我装的是paddlepaddle-gpu 2.3.2
cuda10.2

@nissansz
Copy link
Author

有没有办法转换成onnx格式使用?怎么用?

@UserWangZz
Copy link
Collaborator

问题非paddleocr问题,此处关闭该issue,可在具体仓库中重开issue提问

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 11, 2024
# for free to subscribe to this conversation on GitHub. Already have an account? #.
Projects
None yet
Development

No branches or pull requests

4 participants