Replies: 2 comments
-
检查一下数据集格式,注意检测和识别数据集格式是不同的 |
Beta Was this translation helpful? Give feedback.
-
这个错误 RecursionError: maximum recursion depth exceeded while calling a Python object(Python 对象调用时超过了最大递归深度)通常是由于代码中出现了递归调用未正确终止,或者出现了无限递归循环。 根据你提供的信息,在训练识别模型(rec)时出现此错误,而训练检测模型没有问题,同时你也提供了运行命令: python tools/train.py -c configs/rec/PP-OCRv3/ch_PP-OCRv3_rec.yml 结合 PaddleOCR 框架的特性,这个问题可能出现在以下几个方面: 🔍 可能原因分析:
建议查看该配置文件和其 base 的父级文件,比如:
✅ 建议解决方案:
import sys 但这仅为临时绕过方案,根本还是要修复递归源头。
🔗 相关问题参考: 虽然你提到查找过但未发现相似问题,不过值得再次确认的相关 Issue:
📌 小结: 错误 RecursionError: maximum recursion depth exceeded 很可能是由于配置文件间 base 字段的环形引用造成的。建议从 configs/rec/PP-OCRv3/ch_PP-OCRv3_rec.yml 开始,检查其所有上级 base 文件中是否有循环引用。你也可以尝试在全新环境下使用官方默认 yaml 配置作为对比,逐步还原你当前的配置,找出递归源头。 如果问题持续无法解决,建议你将完整的 ch_PP-OCRv3_rec.yml 和所有引用的 base 文件整理打包发到社区以便他人协助进一步排查。 Response generated by 🤖 feifei-bot | chatgpt-4o-latest |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
🔎 Search before asking
🐛 Bug (问题描述)
,报错。RecursionError: maximum recursion depth exceeded while calling a Python object。训练检测模型的时候没有报错,训练识别模型的时候报错。
🏃♂️ Environment (运行环境)
win10 锐龙cpu,英特尔独显。
🌰 Minimal Reproducible Example (最小可复现问题的Demo)
python tools/train.py -c configs/rec/PP-OCRv3/ch_PP-OCRv3_rec.yml
Beta Was this translation helpful? Give feedback.
All reactions