StagesDetect

FaceDetector

YoloOnnxDetector pre-set to StabRise/face_detection, writing a `faces` column.

Import
import { FaceDetector } from '@stabrise/scaledp/detect'
Group
Detect
Reads
image
Writes
boxes
Needs
onnxruntime-web
import { Pipeline } from '@stabrise/scaledp'
import { DataToImage, ImageDrawBoxes } from '@stabrise/scaledp'
import { FaceDetector } from '@stabrise/scaledp/detect'

const rows = await new Pipeline([
    new DataToImage(),
    new FaceDetector(),
    new ImageDrawBoxes({ inputCols: ['image', 'faces'], outputCol: 'annotated', filled: true }),
]).transform(scan)
Open in builder

Identical to YoloOnnxDetector with model: 'StabRise/face_detection', labels: ['face'], outputCol: 'faces' and outputType: 'face'.

For redaction, filled: true on ImageDrawBoxes paints over the region rather than outlining it — see Signatures and faces.

The same caveat as SignatureDetector applies: pre-set options bypass the base class's validators.

Parameters

ParameterTypeDefaultMeaning
modelstring'StabRise/face_detection'Hugging Face repo id, or a URL when self-hosting. No default.
labelsstring[]['face']Class index → label. Empty falls back to class_<n>.
scoreThresholdnumber 0–10.2Drop detections below this confidence.
iouThresholdnumber 0–10.5Overlap above which two same-class boxes count as duplicates.
paddingnumber 0–10Grow each box by this fraction of its size, to avoid clipping edges.

On this page