VisionWatchResult vision.watch-result@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/watch-result.v1.json
vision.watch-result@1: POST /api/v1/watch answers the requested classes found in a camera still (DETR labels, snow/delivery/package through CLIP, or a histogram scene change), each with a confidence and, for an object, a box.
Fields
| Field | Type | Required | Description | Constraints |
|---|---|---|---|---|
answer | object | yes |
| |
answer.detections | array of object | yes |
| |
answer.detections[].class | string | yes | ||
answer.detections[].confidence | number | yes |
| |
answer.detections[].box | object | null | |||
answer.receipt | object | yes |
| |
answer.receipt.engine | enum | yes |
| |
answer.receipt.model | string | null | yes | ||
answer.receipt.cost_usd | number | yes |
| |
answer.receipt.ms | integer | yes |
| |
answer.receipt.confidence | number | null | yes | ||
answer.receipt.retention | string | yes |
Examples
From the contract's own test fixtures: valid ones validate, rejected ones must fail.
Valid: one
{
"answer": {
"detections": [
{
"class": "package",
"confidence": 0.88,
"box": {
"x": 1,
"y": 2,
"width": 30,
"height": 40
}
},
{
"class": "scene change",
"confidence": 0.4,
"box": null
}
],
"receipt": {
"engine": "local",
"model": "DETR ResNet-50 q8 + histogram",
"cost_usd": 0,
"ms": 80,
"confidence": 0.88,
"retention": "not stored"
}
}
}Rejected: one
{
"answer": {
"detections": [
{
"class": "package",
"confidence": 1.5
}
],
"receipt": {
"engine": "local",
"model": null,
"cost_usd": 0,
"ms": 1,
"confidence": null,
"retention": "x"
}
}
}Validate
const contracts = require('openvibe-contracts');
contracts.validate('vision.watch-result@1', value); // { valid, errors: [{ path, message }] }