{
  "definitions": {},
  "$schema": "http://json-schema.org/draft-07/schema#",
  "$id": "https://docs.veritone.com/schemas/vtn-standard/master.json",
  "type": "object",
  "title": "vtn-standard for face detection engines",
  "required": [
    "series"
  ],
  "properties": {
    "schemaId": {
      "type": "string",
      "const": "https://docs.veritone.com/schemas/vtn-standard/master.json"
    },
    "validationContracts": {
      "type": "array",
      "title": "Validation contracts",
      "description": "Engine category contracts to validate this engine output against",
      "contains": {
        "type": "string",
        "description": "The face detection engine category ID",
        "const": "6faad6b7-0837-45f9-b161-2f6bf31b7a07"
      }
    },
    "series": {
      "type": "array",
      "title": "Time series objects",
      "items": {
        "type": "object",
        "title": "Time series object",
        "required": [
          "startTimeMs",
          "stopTimeMs",
          "object"
        ],
        "properties": {
          "startTimeMs": {
            "type": "integer",
            "title": "Start time (ms)",
            "description": "The time in milliseconds from the beginning of the file where this observation starts occurring",
            "minimum": 0,
            "examples": [
              817000
            ]
          },
          "stopTimeMs": {
            "type": "integer",
            "title": "Stop time (ms)",
            "description": "The time in milliseconds from the beginning of the file where this observation stops occurring.  Needs to be greater than or equal to startTimeMs.",
            "minimum": 0,
            "examples": [
              845000
            ]
          },
          "object": {
            "type": "object",
            "title": "Object observation",
            "description": "Used for specifying observations of \"objects\" (i.e. \"things\")",
            "required": [
              "type",
              "label",
              "boundingPoly"
            ],
            "properties": {
              "type": {
                "type": "string",
                "title": "Object type",
                "description": "Must be \"face\" for face detection engines",
                "const": "face"
              },
              "label": {
                "type": "string",
                "title": "Label",
                "description": "The label of the object",
                "examples": [
                  "Veritone"
                ]
              },
              "confidence": {
                "type": "number",
                "title": "Confidence",
                "description": "The engine's confidence in this observation (as a percentage)",
                "minimum": 0,
                "maximum": 1,
                "examples": [
                  0.002928053541550474
                ]
              },
              "boundingPoly": {
                "description": "Bounding polygon. Ordered array of (x,y) coordinates in percentage of axis. Implicit line from last to first. 0.00 = 0% to 1.00 = 100%",
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "x": {
                      "type": "number",
                      "minimum": 0,
                      "maximum": 1
                    },
                    "y": {
                      "type": "number",
                      "minimum": 0,
                      "maximum": 1
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}