Downloads · 30 days
183
1% of all-time downloads
MixTex/ZhEn-Latex-OCR
ZhEn-Latex-OCR is a image-to-text model from MixTex. Use it when you need a caption or text from an image. It is set up for transformers. The card lists the license as apache-2.0.
已经发布win客户端本地离线cpu推理exe,可以在github上下载。 或者直接在Files里下载zip文件解压,直接运行exe即可(免安装)。
Downloads · 30 days
183
1% of all-time downloads
All-time downloads
13.4K
Public
Parameters
85.9M
1.1 GB on disk
Likes
34
Public
Click a slice to open those files.
.zip249 MB · 59%
How the weights are stored.
F1685.9M · 100%
From the Hugging Face model README
已经发布win客户端本地离线cpu推理exe,可以在github上下载。 或者直接在Files里下载zip文件解压,直接运行exe即可(免安装)。
The win client local offline CPU inference exe has been released and can be downloaded on github.
Github: https://github.com/RQLuo/MixTeX?tab=readme-ov-file
from transformers import AutoTokenizer, VisionEncoderDecoderModel, AutoImageProcessor
from PIL import Image
import requests
feature_extractor = AutoImageProcessor.from_pretrained("MixTex/ZhEn-Latex-OCR")
tokenizer = AutoTokenizer.from_pretrained("MixTex/ZhEn-Latex-OCR", max_len=296)
model = VisionEncoderDecoderModel.from_pretrained("MixTex/ZhEn-Latex-OCR")
imgen = Image.open(requests.get('https://cdn-uploads.huggingface.co/production/uploads/62dbaade36292040577d2d4f/eOAym7FZDsjic_8ptsC-H.png', stream=True).raw)
#imgzh = Image.open(requests.get('https://cdn-uploads.huggingface.co/production/uploads/62dbaade36292040577d2d4f/m-oVg8dsQbQZ1fDWbwKtO.png', stream=True).raw)
print(tokenizer.decode(model.generate(feature_extractor(imgen, return_tensors="pt").pixel_values)[0]).replace('\\[','\\begin{align*}').replace('\\]','\\end{align*}'))
colab: https://colab.research.google.com/drive/1vj3GKTmHcVor7FRKyk254nXEi9Lu_dhL?usp=sharing


I will release a small portion of the generated synthetic dataset and the data collection methods.
建议图片尺寸:大约 (400, 500), (H, W)。 建议输出字数:大约100-300个tokens。 Latex 环境:
Suggested image dimensions: approximately (400, 500), (H, W). Recommended output length: approximately 100-300 tokens. LaTeX environment:
\usepackage{amssymb}
\usepackage{amsmath}
\usepackage{stmaryrd}
\usepackage{color}