breezedeus / Pix2Text

An Open-Source Python3 tool with SMALL models for recognizing layouts, tables, math formulas (LaTeX), and text in images, converting them into Markdown format. A free alternative to Mathpix, empowering seamless conversion of visual content into text-based representations. 80+ languages are supported.
https://p2t.breezedeus.com
MIT License
1.99k stars 191 forks source link

找不到转换后文件的存储路径呢 #139

Open ghost opened 3 months ago

ghost commented 3 months ago

from pix2text import Pix2Text img_fp = r'C:\formula.jpg' p2t = Pix2Text() out_text = p2t(img_fp) # 也可以使用 p2t.recognize(img_fp) 获得相同的结果 print(out_text) 上述代码执行后,在控制台显示如下: C:\Users\zz\PycharmProjects\pythonProject6.venv\Scripts\python.exe C:\Users\zz\PycharmProjects\pythonProject6\pix2text_pdf2mdTest.py Fix size testing. training chunk_sizes: [32] The output will be saved to C:\Users\zz\PycharmProjects\pythonProject6.venv\Lib\site-packages\pix2text\doc_xl_layout....\exp\ctdet_subfield\default heads {'hm': 11, 'cls': 4, 'ftype': 3, 'wh': 8, 'hm_sub': 2, 'wh_sub': 8, 'reg': 2, 'regsub': 2} Loading C:\Users\zz\AppData\Roaming\pix2text\1.1\mfd-onnx\mfd-v20240618.onnx for ONNX Runtime inference... WARNING ⚠️ imgsz=[194, 768] must be multiple of max stride 32, updating to [224, 768] 0: 224x768 1 isolated, 218.7ms Speed: 10.1ms preprocess, 218.7ms inference, 45.1ms postprocess per image at shape (1, 3, 224, 768) 100%|██████████| 1/1 [00:01<00:00, 1.81s/it] Page(id=0, number=0, elements=[Element({'id': '0-0-remaining', 'box': [11, 10, 749, 153], 'text': '{\cal L}{\mathrm{e y e l i d}} \;=\sum{t=1}^{T} \sum{v=1}^{V} {\cal M}{v}^{( \mathrm{e y e l i d} \, )} \left( \left\| \hat{h}{t, v}-x_{t, v} \right\|^{2} \right)', 'meta': None, 'type': FORMULA, 'total_img': <PIL.Image.Image image mode=RGB size=752x190 at 0x1622D202F90>, 'isolated': False, 'col_number': 0, 'score': 0.9585866332054138, 'kwargs': {'embed_sep': (' $', '$ '), 'isolated_sep': ('$$\n', '\n$$'), 'line_sep': '\n', 'auto_line_break': True, 'title_contain_formula': False, 'text_contain_formula': True, 'resized_shape': 768}})]) 进程已结束,退出代码为 0

下边的存储路径在哪里呢,没找到....\exp\ctdet_subfield\default这段; The output will be saved to C:\Users\zz\PycharmProjects\pythonProject6.venv\Lib\site-packages\pix2text\doc_xl_layout....\exp\ctdet_subfield\default

breezedeus commented 1 month ago

什么转换后文件? ...\exp\ctdet_subfield\default 这一段忽略,没什么关系。