| https://github.com/breezedeus/Pix2Text | |
| pip install pix2text | |
| # pix2text in d:\usr\python310\lib\site-packages (1.1.4) | |
| # vscode 打开这个文件夹 D:\usr\Python310\Lib\site-packages\pix2text\cli.py ,python 环境选 d:\usr\python310 里的 python 调试看看 | |
| p2t predict -l en,ch_sim --resized-shape 768 --file-type text_formula -i assets/formula.jpg --save-debug-res out-debug-ch.jpg | |
| p2t predict -l en,ch_sim --resized-shape 768 --file-type text_formula -i docs/examples/mixed.jpg --save-debug-res out-debug-mixed.jpg | |
| p2t predict -l en,ch_sim --resized-shape 768 --file-type text_formula -i docs/examples/en1.jpg --save-debug-res out-debug-en1.jpg | |
| # 成功识别 | |
| p2t predict -l en,ch_sim --mfd-config '{"model_name": "mfd-pro-1.5", "model_backend": "onnx"}' --formula-ocr-config '{"model_name":"mfr-pro-1.5","model_backend":"onnx"}' --text-ocr-config '{"rec_model_name": "doc-densenet_lite_666-gru_large"}' --resized-shape 768 --file-type text_formula -i docs/examples/en1.jpg --save-debug-res out-debug-en1.jpg | |
| # 付费模型 | |
| C:\Users\Administrator\AppData\Roaming\pix2text\1.1\table-rec\model.safetensors | |
| # 模型保存在这了 | |
| conda create formulaocr python==3.10 pip | |
| pip install -r .\requirements.txt | |