
Reads a cropped mathematical formula Image and emits its LaTeX source as a String via the PP-FormulaNet recognition head. Blank or unreadable crops return an empty String. One formula per frame, not a full page.
Crop a detected formula region from a document image, transcribe it to LaTeX, then ship the result over HTTP.
Pull formula crops over HTTP and route the recognised LaTeX into a text model for downstream reasoning or rendering.
use_gpu binds the model to the first CUDA device at startup and requires a real GPU to be present. There is no automatic switch to CPU when GPU is requested.String. A zero-size or sub-stride Image short-circuits to an empty String; a larger blank or flat frame still decodes to a short spurious formula because the recognition head is generative. The output is raw LaTeX that is never rendered or validated as math, so malformed formulas surface only downstream.model slot MUST bind a PaddleX inference bundle (config.json + inference.json + inference.yml + inference.pdiparams) whose head matches formula_model_name. The bundle loads entirely offline; nothing is fetched from a remote model server at deploy or runtime.formula_model_name names the recognition head the bound model bundle holds and is validated against the published PP-FormulaNet set; a name outside it fails at startup. The plus-M default is the highest-accuracy English+Chinese head (2560 tokens); the lighter L/S and UniMERNet/LaTeX_OCR_rec heads trade accuracy for throughput.Automated release