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

FieldTypeRequiredDescriptionConstraints
channelstringyes
matchesarray of objectyes
  • items: no other fields
matches[].subjectstringyes
  • pattern ^usr_[0-9A-HJKMNP-TV-Z]{26}$
matches[].scorenumberyes
  • minimum 0
  • maximum 1
matches[].boxobject
  • no other fields
matches[].box.xnumberyes
matches[].box.ynumberyes
matches[].box.widthnumberyes
matches[].box.heightnumberyes
livenessenumyes
  • one of "not_checked", "checked"

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 }] }