Skip to content

OCR Triton Node ​

Overview ​

ocr-triton reads the text in an image with a PP-OCRv5 pipeline served by the local NVIDIA Triton server. It is the ocr node's job on the triton-inferencer runtime: the same node code runs it, registered under a second type with an OCR-only edit form. The model is a preset from the public catalog, runs as TensorRT engines, and the result has the same shape the ocr node produces, so a flow can swap one for the other without changing what comes after.

Configuration ​

FieldDefaultMeaning
Input fieldmsg.imageWhere the image is on the message.
Output fieldmsg.inference.ocrWhere the result is written.
TaskOCROCR (detection + recognition), Detection Only, Recognition Only (one cropped line in), Document Rotation (page angle out). Same tasks as the ocr node minus PaddleOCR-VL.
Model Config → Modelppocrv5-serverCatalog preset: PP-OCRv5 Server (most accurate) or PP-OCRv5 Mobile (lighter, faster). Each installs detection, recognition, textline orientation and document orientation sub-models; every task of a preset shares that one install.
Model Config → Document OrientationfalseOCR task only. Classify the whole page (0/90/180/270) before detection and read it upright. Accepts msg/flow/global.
Model Config → Textline OrientationfalseOCR task only. Check each detected line for being upside down (0/180) before recognition. Accepts msg/flow/global.
PromiseoffPush a promise into msg.promises instead of waiting.
Model Config → Max concurrent5Requests in flight per node.
Model Config → Text detection → Box Confidence0.6Detector box score threshold (PaddleOCR's text_det_box_thresh). Lower values let low-score regions through as empty or garbage lines.
Model Config → Text detection → Max Texts1000Keep at most this many lines.
Model Config → Text detection → DB Threshold / Unclip Ratio / Max Candidates / Min Box Size0.3 / 1.5 / 1000 / 3PaddleOCR's DB post-processing knobs.
Debug ImageoffDraw the boxes on the frame under the node in the editor.

The defaults are the ocr node's, so the two nodes read the same image the same way out of the box. Everything else the triton-inferencer form asks for (model source, origin, task type) is derived: static model, default-model catalog, and the Triton model of the chosen task (<preset> for OCR, <preset>_det, <preset>_rec or <preset>_doc for the single stages).

First use ​

The preset is downloaded from the public bucket, converted to TensorRT engines for this GPU and installed into the Triton model repository. The node status shows Downloading, Converting and Installing; the conversion can take several minutes on a small GPU. Later deploys reuse the installed engines. Text detection keeps the image at full resolution up to the engine's limit (1280 px on the long side), as the ocr node does.

Input ​

javascript
msg.image = <Buffer | base64 string | data URL>;

Output ​

OCR task:

javascript
msg.inference.ocr = {
    texts: [
        { text: "LOT 2024-07", score: 0.98, coords: [[0.12, 0.30], [0.41, 0.30], [0.41, 0.36], [0.12, 0.36]] },
        // ...
    ],
    text_concatenated: "LOT 2024-07 ...",
    text_highest_score: "LOT 2024-07",
    metadata: {
        document_angle: 0,          // rotation applied when Document Orientation is on
        orientation_angles: [],     // per-line flip when Textline Orientation is on
        warping_applied: false
    }
};
msg.performance = { "<node name>": { ...timings } };

coords are the four corners normalised to the image sent, whatever rotation the document orientation stage applied.

Other tasks: Detection Only gives the text boxes as a detection list (raw_boxes, confidence); Recognition Only gives { text, confidence } for the line sent (any width; the line is resized to height 48 with its aspect kept, as PaddleX does); Document Rotation gives { angle, orientation_label, confidence } with the angle in 0/90/180/270, as the ocr node does.

Compared with the ocr node ​

ocrocr-triton
RuntimePython inference server (PaddleX)Triton server (TensorRT, batched recognition)
ModelsPP-OCRv3/v4/v5, PaddleOCR-VLPP-OCRv5 presets (server, mobile)
TasksOCR, detection only, recognition only, document rotation, VLMOCR, detection only, recognition only, document rotation
Document / textline orientationyesyes
Document unwarpingyesno
Result shapetexts, text_concatenated, metadatasame

See Also ​