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

fix with the correct import #117

Closed g1y5x3 closed 5 months ago

g1y5x3 commented 5 months ago

was running the example script but encoutered the following issue

  File "/home/yixiang/torch/lib/python3.10/site-packages/pix2text/text_formula_ocr.py", line 16, in <module>
    from cnstd.yolov7.general import box_partial_overlap
ImportError: cannot import name 'box_partial_overlap' from 'cnstd.yolov7.general' (/home/yixiang/torch/lib/python3.10/site-packages/cnstd/yolov7/general.py)

Maybe because cnstd just have a recent update and changed some file structures.

breezedeus commented 5 months ago

Yes, not yet adapted to the latest cnstd==1.2.4, using the previous version is fine with cnstd<1.2.4. Thanks.