PaddleOCR
PaddleOCR copied to clipboard
报错:TypeError: __call__() missing 1 required positional argument: 'shape_list'
🔎 Search before asking
- [X] I have searched the PaddleOCR Docs and found no similar bug report.
- [X] I have searched the PaddleOCR Issues and found no similar bug report.
- [X] I have searched the PaddleOCR Discussions and found no similar bug report.
🐛 Bug (问题描述)
想微调模型,于是图片训练了v4检测模型,然后参考模型评估与预测章节的测试检测效果。
单张没问题,想整个目录跑,执行:
python PaddleOCR/tools/infer_rec.py -c configs/ch_PP-OCRv4_det_student.yml -o Global.infer_img="./test_img/" Global.pretrained_model="./output/ch_PP-OCRv4/best_accuracy"
报错:
上面是第一张图的正常输出……
[2024/10/20 22:41:16] ppocr INFO: train with paddle 3.0.0-beta1 and device Place(gpu:0)
W1020 22:41:16.867971 528912 gpu_resources.cc:119] Please NOTE: device: 0, GPU Compute Capability: 8.9, Driver API Version: 12.7, Runtime API Version: 11.8
W1020 22:41:16.868974 528912 gpu_resources.cc:164] device: 0, cuDNN Version: 8.9.
[2024/10/20 22:41:17] ppocr INFO: load pretrain successful from ./output/ch_PP-OCRv4/best_accuracy
[2024/10/20 22:41:17] ppocr INFO: infer_img: ./test_img/1.png
Traceback (most recent call last):
File "PaddleOCR/tools/infer_rec.py", line 206, in <module>
main()
File "PaddleOCR/tools/infer_rec.py", line 178, in main
post_result = post_process_class(preds)
TypeError: __call__() missing 1 required positional argument: 'shape_list'
🏃♂️ Environment (运行环境)
Windows 10 64位
Nvidia 4080 Super
Python 3.8(AnoConda 环境)
项目:
今日份的 https://github.com/PaddlePaddle/PaddleOCR 主分支(main)
最后一个 Commit Hash:de457325cd2bd7bca11219eb83763086a5b61e00
包安装:
python -m pip install paddlepaddle-gpu==3.0.0b1 -i https://www.paddlepaddle.org.cn/packages/stable/cu118/
pip install PPOCRLabel -i https://pypi.tuna.tsinghua.edu.cn/simple
以及相关的依赖
🌰 Minimal Reproducible Example (最小可复现问题的Demo)
未对源代码做什么修改