Stages

Stage reference

Every stage, grouped by what it does, with what it reads, what it writes and what it needs installed.

Every stage takes an options object, reads one row field and writes another. Defaults match the Python ScaleDP stage of the same name wherever one exists.

The parameter tables on each page are generated from the same catalogue the registry exposes and the demo builder renders its controls from, so a default here is the stage's own frozen constant rather than a transcription of it.

Read

StageReadsWritesNeeds
DataToImagebytesimage
PdfToImagebytesimagepdfjs-dist
PdfToDocumentbytesdocumentpdfjs-dist

Detect

StageReadsWritesNeeds
PaddleTextDetectorimageboxesppu-paddle-ocr
DbnetOnnxDetectorimageboxesonnxruntime-web
YoloOnnxDetectorimageboxesonnxruntime-web
SignatureDetectorimageboxesonnxruntime-web
FaceDetectorimageboxesonnxruntime-web

Recognise

StageReadsWritesNeeds
PaddleTextRecognizerimagedocumentppu-paddle-ocr
TesseractOcrimagedocumenttesseract-wasm
TesseractRecognizerimage, boxesdocumenttesseract-wasm

Transform

StageReadsWritesNeeds
LineOrientationDetectorimage, boxesimageonnxruntime-web
ImageDrawBoxesimage, boxesimage
ImageCropBoxesimage, boxesimage

Understand

StageReadsWritesNeeds
GlinerNerdocumentner@huggingface/transformers

The six parameters every stage has

ParameterTypeDefaultMeaning
inputColstringper stageRow field to read
outputColstringper stageRow field to write
pathColstring'path'Field holding the source path
pageColstring'page'Field holding the page index
keepInputDatabooleanper stageKeep inputCol instead of dropping it
propagateErrorbooleanfalseThrow on failure instead of recording it

keepInputData is the one that bites: with it off, the stage deletes its input column on the way through. See Columns are the wiring.

Four stages read more than one column and take an inputCols array instead; their inherited inputCol is unused.

Reading the tables

  • Reads / Writes are column kinds, not names — image, boxes, document, ner, orientations, box, bytes. The names are whatever inputCol and outputCol say.
  • Needs is the optional peer dependency to install. A stage with no peer runs with nothing beyond the core.
  • A stage marked expands turns one input row into several.
  • A stage marked terminal produces output for looking at, not for feeding onward.

On this page