Platform 4.0

Model packages and JSON contracts

Prepare package files, runtime profiles and categories without changing the machine-readable field names.

Browsing: Platform 4.0
Also available in: Platform 4.0BOX 5.0

ZIP structure

Place model_info.json and coco_categories.json at the archive root. Weights are addressed by the relative weights_path. Include additional files, including model.py, when required by the selected custom-model protocol; a Python implementation is not mandatory for every built-in type.

model-package.zip
├── model_info.json
├── coco_categories.json
└── weights/
    └── model.onnx

Model metadata and profiles

model_type must be registered in the target runtime and task_type must match the model. A custom type requires task_type, deploy_profile, img_size and weights_path. A weights-file extension alone does not prove runtime support.

FieldType and validation
model_typeSupported machine-readable model type
task_typeSupported task type
weights_pathRelative path or supported pattern inside the package
img_size.height / img_size.widthPositive integer input dimensions in pixels
deploy_profile.profilesNon-empty array of validated runtime profiles
deploy_profile.default_profileOne of the listed profiles
model_attributesOptional typed parameters and defaults

Example model_info.json

Replace angle-bracket placeholders with values supported by your runtime. The 640 × 640 input is illustrative; use the actual model dimensions.

{
  "model_type": "<supported-model-type>",
  "task_type": "<supported-task-type>",
  "img_size": {
    "height": 640,
    "width": 640
  },
  "weights_path": "weights/model.onnx",
  "deploy_profile": {
    "default_profile": "<runtime-profile>",
    "profiles": [
      "<runtime-profile>"
    ]
  }
}

Category contract

The root object contains categories. Each id must match a class produced by the model. Threshold and colour support processing and visualisation; is_violation does not replace event-creation logic. The legacy schema keys ru_name and full_ru_name are retained for compatibility; their example values are English display text.

{
  "categories": [
    {
      "id": 1,
      "name": "example_object",
      "ru_name": "Object",
      "full_ru_name": "Example object",
      "supercategory": "object",
      "threshold": 0.5,
      "color": [
        0,
        255,
        0
      ],
      "is_violation": false,
      "is_primary": true,
      "exclude": false
    }
  ]
}

Pre-upload validation

  • Parse both JSON files and validate field types.
  • Verify every relative weights path and required protocol file.
  • Match category IDs to actual model outputs.
  • Validate each declared profile on the target runtime.
  • Wait for automated checks after upload, then run the model on a representative asset.

tested establishes technical operation, not accuracy on a site’s cameras.

Category field constraints and package checks

Category fieldContract constraint
idInteger; must match the class emitted by the model
name, ru_name, full_ru_name, supercategoryStrings; preserve the legacy machine keys
thresholdNumber
colorExactly three integers from 0 to 255
is_violation, is_primary, excludeBooleans

Do not place an extra enclosing directory above the required JSON files in the ZIP. Confirm that the input dimensions match the model and selected profile, and that every additional file is permitted by that model protocol. Exclude credentials, tokens, absolute paths and intermediate weight copies from the package.

Use the documentation and configuration supplied for your installed release. Environment addresses and access credentials are provided privately with the delivery.