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
| Stage | Reads | Writes | Needs |
|---|---|---|---|
| DataToImage | bytes | image | — |
| PdfToImage | bytes | image | pdfjs-dist |
| PdfToDocument | bytes | document | pdfjs-dist |
Detect
| Stage | Reads | Writes | Needs |
|---|---|---|---|
| PaddleTextDetector | image | boxes | ppu-paddle-ocr |
| DbnetOnnxDetector | image | boxes | onnxruntime-web |
| YoloOnnxDetector | image | boxes | onnxruntime-web |
| SignatureDetector | image | boxes | onnxruntime-web |
| FaceDetector | image | boxes | onnxruntime-web |
Recognise
| Stage | Reads | Writes | Needs |
|---|---|---|---|
| PaddleTextRecognizer | image | document | ppu-paddle-ocr |
| TesseractOcr | image | document | tesseract-wasm |
| TesseractRecognizer | image, boxes | document | tesseract-wasm |
Transform
| Stage | Reads | Writes | Needs |
|---|---|---|---|
| LineOrientationDetector | image, boxes | image | onnxruntime-web |
| ImageDrawBoxes | image, boxes | image | — |
| ImageCropBoxes | image, boxes | image | — |
Understand
| Stage | Reads | Writes | Needs |
|---|---|---|---|
| GlinerNer | document | ner | @huggingface/transformers |
The six parameters every stage has
| Parameter | Type | Default | Meaning |
|---|---|---|---|
inputCol | string | per stage | Row field to read |
outputCol | string | per stage | Row field to write |
pathCol | string | 'path' | Field holding the source path |
pageCol | string | 'page' | Field holding the page index |
keepInputData | boolean | per stage | Keep inputCol instead of dropping it |
propagateError | boolean | false | Throw 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 whateverinputColandoutputColsay. - 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.