Yunnalab/dsh-latex-ocr0

dsh-latex-ocr

公式图片 → LaTeX(pix2tex / LaTeX-OCR):把教材/截图中的数学公式识别为 LaTeX 代码

包名
dsh-latex-ocr
版本
0.1.0
最近更新
2026年8月16日

安装

$npx -p @deepseek-ai/dsh dsh plugin --profile web add github:Yunnalab/dsh-latex-ocr

使用

把这张公式识别成 LaTeX:latex_ocr(image="/path/to/formula.png")

返回 LaTeX 表达式,可直接用于讲解、推导与复现。本地 CPU 推理约 1-7 秒/条。

实测(温度 0.1):

原公式识别结果
∫₀^∞ e^{-x²} dx = √π/2\int_{0}^{\infty}e^{-x^{2}}\,d x={\frac{\sqrt{\pi}}{2}}
lim_{x→0} sinx/x = 1\operatorname*{lim}_{x\to0}{\frac{\sin x}{x}}=1

复杂公式(重积分、矩阵、求和上下限)可能不完美,关键公式请对照原图核对。