公式识别 #14841
公式识别
#14841
-
大佬们,我第一次接触PaddleOCR,请问最新的这个公式识别PP-FormulaNet-S怎么下载的模型没有“.pdmodel”文件?这还能正常使用嘛, 我想要精简点部署 |
Beta Was this translation helpful? Give feedback.
Answered by
GreatV
Mar 12, 2025
Replies: 1 comment
-
下载的 在 PaddleOCR 中, 你可以按照以下命令进行推理: python3 tools/infer_rec.py -c configs/rec/PP-FormuaNet/rec_pp_formulanet_s.yml \
-o Global.infer_img='./docs/datasets/images/pme_demo/0000099.png'\
Global.pretrained_model=./rec_ppformulanet_s_train/best_accuracy.pdparams 确保指定正确的 Response generated by 🤖 feifei-bot | chatgpt-4o-latest |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
Devcode518
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
下载的
PP-FormulaNet-S
预训练模型没有.pdmodel
文件是正常的。根据提供的文档,该模型的预训练文件主要包括best_accuracy.pdparams
,而不是.pdmodel
。在 PaddleOCR 中,
.pdparams
文件通常用于存储模型参数,而.pdmodel
文件一般用于 Paddle Inference 部署的静态图模型格式。但在 PaddleOCR 训练和推理过程中,使用的是动态图模式,所以只需要.pdparams
文件即可进行加载和运行。你可以按照以下命令进行推理:
python3 tools/infer_rec.py -c configs/rec/PP-FormuaNet/rec_pp_formulanet_s.yml \ -o Global.infer_img='./docs/datasets/images/pme_demo/0000099.png'\ Global.pretrained_model=./rec_ppformulanet_s_train/best_accuracy.pdparams
确保指定正确的
pretrained_model
路径,即.pdparams
文件的位置,这样就能正常进行公式识别了。Response generated by 🤖 feifei-bot | chatgpt-4o-latest