VisionFaceCastMatch vision.face-cast-match@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-cast-match.v1.json
vision.face-cast-match@1: the matches inside one channel's consented roster, each with a score and box. No other subject is named and no non-roster face is described.
Fields
| Field | Type | Required | Description | Constraints |
|---|---|---|---|---|
channel | string | yes | ||
matches | array of object | yes |
| |
matches[].subject | string | yes |
| |
matches[].score | number | yes |
| |
matches[].box | object |
| ||
matches[].box.x | number | yes | ||
matches[].box.y | number | yes | ||
matches[].box.width | number | yes | ||
matches[].box.height | number | yes | ||
liveness | enum | yes |
|
Examples
From the contract's own test fixtures: valid ones validate, rejected ones must fail.
Valid: one
{
"channel": "live:one",
"matches": [
{
"subject": "usr_01J8Z3Q4R5S6T7V8W9X0Y1Z2A4",
"score": 0.71,
"box": {
"x": 1,
"y": 2,
"width": 30,
"height": 40
}
}
],
"liveness": "not_checked"
}Rejected: one
{
"channel": "live:one",
"matches": [
{
"subject": "ana",
"score": 0.71
}
],
"liveness": "not_checked"
}Validate
const contracts = require('openvibe-contracts');
contracts.validate('vision.face-cast-match@1', value); // { valid, errors: [{ path, message }] }