VisionFaceDetection vision.face-detection@1
Generated at from
openvibe-contracts v0.419.0 and
openvibe-sdk v0.161.0.
- Version
- 1.0.0
- Owner
- vision
- Visibility
- first-party
- Status
- active
- Compatibility
- backward
- Schema
https://openvibe.network/contracts/vision/face-detection.v1.json
vision.face-detection@1: POST /api/v1/faces/detect, an identity-free YuNet privacy tool. It counts faces and returns their boxes and scores; it stores no template, names no one and needs no consent. Anyone may use it.
Fields
| Field | Type | Required | Description | Constraints |
|---|---|---|---|---|
count | integer | yes |
| |
boxes | array of object | yes |
| |
boxes[].x | number | yes | ||
boxes[].y | number | yes | ||
boxes[].width | number | yes | ||
boxes[].height | number | yes | ||
boxes[].score | number | yes |
|
Examples
From the contract's own test fixtures: valid ones validate, rejected ones must fail.
Valid: one
{
"count": 1,
"boxes": [
{
"x": 20,
"y": 20,
"width": 80,
"height": 80,
"score": 0.99
}
]
}Rejected: one
{
"count": 1,
"boxes": [
{
"x": 20,
"y": 20,
"width": 80,
"height": 80,
"score": 2
}
]
}Validate
const contracts = require('openvibe-contracts');
contracts.validate('vision.face-detection@1', value); // { valid, errors: [{ path, message }] }