AttributeError: module 'paddle' has no attribute 'device'
参考这里快速集成,试用文本旋转检测时,安装paddlex。 环境:Nvidia, V100, CUDA,11.8
1、先安装paddlex pip install -i https://pypi.tuna.tsinghua.edu.cn/simple paddlex pip install -i https://pypi.tuna.tsinghua.edu.cn/simple "paddlex[ocr]" paddlex 3.3.6
2、运行上述文档的测试代码时 运行报错, File "/usr/local/lib/python3.10/dist-packages/paddlex/utils/device.py", line 44, in get_default_device if paddle.device.is_compiled_with_cuda() and paddle.device.cuda.device_count() > 0: AttributeError: module 'paddle' has no attribute 'device'
solved. pip install paddlepaddle-gpu==3.2.0 -i https://www.paddlepaddle.org.cn/packages/stable/cu118/ pip install -i https://pypi.tuna.tsinghua.edu.cn/simple torch==2.6.0
But the PP-LCNet_x1_0_textline_ori seems not make sense for our test images. How about degree of 0,90,-90,180?
The PP-LCNet-x1_x_textline_ori model is designed to solve text line direction classification, with only 0 and 90 degrees. For the classification of documents in four directions, we have the PP-LCNet-x1_x_doc_ori model that you can try using.