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)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
| Parameter | Type | Default | Meaning |
|---|---|---|---|
model | string | 'StabRise/face_detection' | Hugging Face repo id, or a URL when self-hosting. No default. |
labels | string[] | ['face'] | Class index → label. Empty falls back to class_<n>. |
scoreThreshold | number 0–1 | 0.2 | Drop detections below this confidence. |
iouThreshold | number 0–1 | 0.5 | Overlap above which two same-class boxes count as duplicates. |
padding | number 0–1 | 0 | Grow each box by this fraction of its size, to avoid clipping edges. |