Skip to content

OCR Triton Node ​

Overview ​

ocr-triton (ocr triton in the palette) reads the text in an image with a PP-OCR 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 ​

Settings tab ​

FieldDefaultMeaning
NameemptyLabel of the node; when empty, ocr triton followed by the task and the model
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
PromiseoffPush a promise into the Promises field (msg.promises) instead of waiting
Max concurrent5Images in flight per node, 1 to 40
Debug ImageoffDraw the boxes on the frame under the node in the editor, with the interval, width, box thickness and font size of the triton-inferencer

Restart Triton Server restarts the server shared with the triton-inferencer nodes.

Model Config tab ​

FieldDefaultMeaning
ModelPP-OCRv5 ServerCatalog preset: PP-OCRv5 Server, PP-OCRv5 Mobile, PP-OCRv6 Tiny, PP-OCRv6 Small or PP-OCRv6 Medium. Each installs detection, recognition, textline orientation and document orientation sub-models; every task of a preset shares that one install. For Recognition Only it can also be SVTRv2-B (see below)
RecognitionSame as modelOCR task only. The preset's own recognizer, or another entry's: another preset's, or SVTRv2-B (OpenOCR): far better on curved, rotated and stylised words, worse on long lines, and English ASCII only — no spaces (multi-word lines come back joined) and no accents. The pair is installed as <preset>--<rec>, a pipeline over the two entries' engines (nothing extra is downloaded or built once both are installed)
Document OrientationfalseOCR task only. Classify the whole page (0/90/180/270) before detection and read it upright. Accepts msg/flow/global
Textline OrientationfalseOCR task only. Check each detected line for being upside down (0/180) before recognition. Accepts msg/flow/global
Text detection → Box Confidence0.6OCR and Detection Only. Detector box score threshold (PaddleOCR's text_det_box_thresh). Lower values let low-score regions through as empty or garbage lines
Text detection → Max Texts1000Keep at most this many lines
Text detection → DB Threshold / DB Unclip Ratio / DB Max Candidates / DB Min Box Size0.3 / 1.5 / 1000 / 3PaddleOCR's DB post-processing knobs

The text detection values can also be read from msg, flow or global context, like the triton-inferencer's parameters. 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). Precision is not offered: OCR presets are built in FP32.

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 = imageBuffer;   // a JPEG/PNG Buffer, or a raw bitmap { width, height, data, ... }
return msg;

An array of images is processed as a batch and gives an array of results. Other inputs fail with Unsupported image format: expected Buffer or bitmap object {width, height, data}.

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: "LOT 2024-07\nEXP 2026-07",
    text_concatenated: "LOT 2024-07\nEXP 2026-07",
    text_largest_box: "LOT 2024-07",
    text_highest_score: "LOT 2024-07",
    text_most_centric: "EXP 2026-07",
    metadata: {
        document_angle: 0,          // rotation applied when Document Orientation is on
        orientation_angles: [],     // per-line flip (0 upright, 1 flipped) when Textline Orientation is on
        warping_applied: false
    }
};
msg.performance.triton_inferencer["ocr-triton"] = { ...timings };   // keyed by the node's name when it has one

coords are the four corners normalised to the image sent, whatever rotation the document orientation stage applied. text and text_concatenated join the lines in order, with a line break between boxes on different lines and a space between boxes on the same line. text_largest_box, text_highest_score and text_most_centric are the text of the box with the largest area, the highest score, and the centre nearest the centre of the image.

Other tasks: Detection Only gives the text boxes as a detection list (raw_boxes, confidence and every box format); 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, all_tags } with the angle in 0/90/180/270, as the ocr node does.

Errors, timings and promise mode are those of the triton-inferencer: on error the message is sent with msg.error.

Compared with the ocr node ​

ocrocr-triton
RuntimePython inference server (PaddleX)Triton server (TensorRT, batched recognition)
ModelsPP-OCRv3/v4/v5/v6, PARSeq and SVTRv2-B rec, PaddleOCR-VLPP-OCRv5/v6 presets, any preset det + any preset rec or SVTRv2-B
TasksOCR, detection only, recognition only, document rotation, VLMOCR, detection only, recognition only, document rotation
Document / textline orientationyesyes
Document unwarpingyesno
Result shapetexts, text_concatenated, metadatasame
Errorserror text in the output fieldmsg.error

See Also ​