인터페이스는 현지화되어 있으며, Skill 소개와 설명 문서는 선택한 언어로 AI가 자동 번역합니다. 코드·명령어·경로·전문 용어는 원문을 유지하며 원작자 문서가 우선합니다.
Skills 둘러보기
생산성 및 협업 · SKILL.md

ocr-inference

ocr-inference

Guides pix2tex CLI and Python OCR inference from equation images to LaTeX, including images, checkpoints, CPU/CUDA choices, and prediction troubleshooting.

Independent GitHub snapshot · Automated classification · Original documentation governs

Skill 문서

GitHub

name: ocr-inference description: "Guides pix2tex CLI and Python OCR inference from equation images to LaTeX, including images, checkpoints, CPU/CUDA choices, and prediction troubleshooting." disable-model-invocation: true metadata: disco-role: operating license: MIT

OCR Inference

Use this sub-skill when the user wants LaTeX code from an equation image, wants to call pix2tex or LatexOCR, or needs to debug inference quality, model checkpoints, image preprocessing, or CLI flags.

Quick Route

  1. For the Python class and helper signatures, read references/api-reference.md.
  2. For CLI commands and flags, read references/cli-reference.md.
  3. For image size/mode/preprocessing decisions, read references/image-preprocessing.md.
  4. For common failures, read references/troubleshooting.md.
  5. Before loading model weights, run scripts/check_pix2tex_cli.py and, for a local image, scripts/inspect_pix2tex_image.py.

Standard CLI Workflow

pix2tex --no-cuda path/to/equation.png

Use --no-cuda for CPU-only environments or deterministic smoke tests. Omit it only after verifying CUDA PyTorch in the target environment. Add --no-resize when you do not want the auxiliary image-resizer model to adjust image width. Use -t/--temperature to control sampling; lower values make repeated predictions less variable.

Standard Python Workflow

from PIL import Image
from pix2tex.cli import LatexOCR

model = LatexOCR()  # may download checkpoints if missing
latex = model(Image.open("equation.png"))
print(latex)

Instantiate LatexOCR() only when checkpoint downloads and compute are allowed. For CPU-only use, pass an argparse-like object or CLI route with no_cuda=True.

Boundaries

저장한 Skills