Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
ghost opened this issue Aug 15, 2024 · 1 comment
Open

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

ghost opened this issue Aug 15, 2024 · 1 comment

Comments

@ghost
Copy link

ghost commented Aug 15, 2024

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, 'reg_sub': 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
Copy link
Owner

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant