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.onnxModel 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.
| Field | Type and validation |
|---|---|
| model_type | Supported machine-readable model type |
| task_type | Supported task type |
| weights_path | Relative path or supported pattern inside the package |
| img_size.height / img_size.width | Positive integer input dimensions in pixels |
| deploy_profile.profiles | Non-empty array of validated runtime profiles |
| deploy_profile.default_profile | One of the listed profiles |
| model_attributes | Optional 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 field | Contract constraint |
|---|---|
id | Integer; must match the class emitted by the model |
name, ru_name, full_ru_name, supercategory | Strings; preserve the legacy machine keys |
threshold | Number |
color | Exactly three integers from 0 to 255 |
is_violation, is_primary, exclude | Booleans |
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.
