加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
algorithm_input_parameters.json 18.48 KB
一键复制 编辑 原始数据 按行查看 历史
jin 提交于 2023-12-27 17:55 . add file
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569
{
"$schema": "http://json-schema.org/draft-07/schema#",
"required": [
"RulesParams",
"StreamOptions",
"ID",
"Name"
],
"properties": {
"RulesParams": {
"items": {
"required": [
"EventID",
"RuleID",
"Areas",
"ExtendParams"
],
"properties": {
"EventID": {
"type": "string",
"description": "事件类型 代表算法支持的一种功能,具体内容应该是算法包提交 的 algo.yaml 中的 Abilities 字段中 eventID 的一种.",
"title": "EventID",
"enum": [
"FIRE_EQUIPMENT"
],
"default": "FIRE_EQUIPMENT"
},
"RuleID": {
"type": "integer",
"description": "规则 ID 用于区分相同 EventID 的不同规则, 也用于唯一标识一 个任务中的一个规格, 常用于任务合并的计算,默认可以不填, 由 AI-PaaS Gateway 生成.",
"title": "RuleID"
},
"RuleCustomName": {
"type": "string",
"description": "自定义规则名称,相比 RuleID 更语义化",
"title": "RuleCustomName"
},
"Areas": {
"items": {
"required": [
"AreaID",
"AreaType"
],
"properties": {
"AreaID": {
"type": "integer",
"title": "AreaID"
},
"AreaType": {
"enum": [
"POLYGON"
],
"oneOf": [
{
"description": "多边形",
"const": "POLYGON"
},
{
"description": "单向单拌线",
"const": "SINGLE_LINE"
},
{
"description": "双向单拌线",
"const": "SINGLE_LINE_BOTH"
},
{
"description": "单向多拌线",
"const": "MULTI_LINE"
},
{
"description": "双向多拌线",
"const": "MULTI_LINE_BOTH"
}
],
"title": "Area Type",
"description": "区域类型.",
"type": "string"
},
"Points": {
"items": {
"required": [
"PointX",
"PointY"
],
"properties": {
"PointX": {
"type": "number",
"title": "PointX"
},
"PointY": {
"type": "number",
"title": "PointY"
}
},
"additionalProperties": true,
"type": "object",
"title": "Point"
},
"type": "array",
"description": "**关于有向拌线方向及产品报警定义的说明:** 1. 有向拌 线可以为多段折线,按照起点-终点的顺序进行绘制 2. 拌线的箭头方向为第一段线(可以绘制折线) 逆时针旋转90度所指的方向 3. 如无特殊说明,所有功能的报警都是顺着箭头方向通过则报警 注意:当 AreaType 为 'POLYGON'/'SINGLE_LINE'/SINGLE_LINE_BOTH'时,使用 'Points' 当 AreaType 为 'MULTI_LINE'/'MULTI_LINE_BOTH' 时,需要使用 MultiPoints.",
"title": "Points",
"minItems": 2,
"maxItems": 20
},
"MultiPoints": {
"items": {
"required": [
"Points"
],
"properties": {
"Points": {
"items": {
"required": [
"PointX",
"PointY"
],
"properties": {
"PointX": {
"type": "number",
"title": "PointX"
},
"PointY": {
"type": "number",
"title": "PointY"
}
},
"additionalProperties": true,
"type": "object",
"title": "Point"
},
"type": "array",
"title": "Points",
"minItems": 2,
"maxItems": 20
}
},
"additionalProperties": true,
"type": "object",
"title": "Points"
},
"type": "array",
"title": "MultiPoints",
"minItems": 1,
"maxItems": 10
}
},
"additionalProperties": true,
"type": "object",
"title": "Area",
"default": {
"AreaID": 1,
"AreaType": "POLYGON",
"Points": [
{
"PointX": 0,
"PointY": 0
},
{
"PointX": 1,
"PointY": 0
},
{
"PointX": 1,
"PointY": 1
},
{
"PointX": 0,
"PointY": 1
}
]
},
"if": {
"properties": {
"AreaType": {
"enum": [
"POLYGON",
"SINGLE_LINE",
"SINGLE_LINE_BOTH"
]
}
}
},
"then": {
"allOf": [
{
"required": [
"Points"
]
},
{
"not": {
"required": [
"MultiPoints"
]
}
}
]
},
"else": {
"allOf": [
{
"required": [
"MultiPoints"
]
},
{
"not": {
"required": [
"Points"
]
}
}
]
}
},
"type": "array",
"description": "检测区域",
"title": "Areas",
"minItems": 1,
"maxItems": 20
},
"Masks": {
"items": {
"required": [
"MaskID",
"MaskType",
"Points"
],
"properties": {
"MaskID": {
"type": "integer",
"title": "MaskID"
},
"MaskType": {
"enum": [
"POLYGON"
],
"oneOf": [
{
"description": "多边形",
"const": "POLYGON"
}
],
"title": "Mask Type",
"description": "屏蔽区域类型.",
"type": "string"
},
"Points": {
"items": {
"required": [
"PointX",
"PointY"
],
"properties": {
"PointX": {
"type": "number",
"title": "PointX"
},
"PointY": {
"type": "number",
"title": "PointY"
}
},
"additionalProperties": true,
"type": "object",
"title": "Point"
},
"type": "array",
"title": "Points",
"minItems": 3,
"maxItems": 20
}
},
"additionalProperties": true,
"type": "object",
"title": "Mask"
},
"type": "array",
"description": "遮蔽区域",
"title": "Masks",
"minItems": 0,
"maxItems": 20
},
"ExtendParams": {
"additionalProperties": true,
"type": "object",
"title": "ExtendParams",
"required": [
"TargetMin",
"TargetMax",
"Duration",
"CooldownDuration",
"TargetTypes",
"Custom"
],
"properties": {
"TargetMin": {
"type": "number",
"description": "目标大小过滤逻辑阈值,0.00 <= TargetMin < TargetMax <= 1.00 目标大小过滤逻辑阈值,目标边长占图片边长最小比例",
"title": "TargetMin",
"default": 0,
"minimum": 0,
"maximum": 1
},
"TargetMax": {
"type": "number",
"description": "目标大小过滤逻辑阈值,目标边长占图片的最大比例",
"title": "TargetMax",
"default": 1,
"minimum": 0,
"maximum": 1
},
"Duration": {
"type": "number",
"description": "延迟报警(单位:秒),报警目标需至少维持报警状态该时长 后才报警",
"title": "Duration",
"default": 1,
"minimum": 0,
"maximum": 1800
},
"CooldownDuration": {
"type": "number",
"description": "报警间隔时长(单位:秒)",
"title": "CooldownDuration",
"default": 600,
"minimum": 0,
"maximum": 86400
},
"TargetTypes": {
"items": {
"type": "string",
"enum": [
"FIRE_EQUIPMENT"
]
},
"type": "array",
"description": "list 类型,元素由 AlgoCabinObjType.ObjType 定义 目标 类型列表",
"title": "TargetTypes"
},
"Level": {
"enum": [
"ALARM_LEVEL"
],
"oneOf": [
{
"description": "报警层",
"const": "ALARM_LEVEL"
},
{
"description": "事件层",
"const": "EVENT_LEVEL"
},
{
"description": "模型层",
"const": "MODEL_LEVEL"
}
],
"title": "Level",
"description": "布控的报警层级.",
"type": "string",
"default": "ALARM_LEVEL"
},
"Custom": {
"additionalProperties": true,
"type": "object",
"description": " 算 法 仓 自 定 义 布 控 参 数 , 可 用 于 指 定 AlgoCabinExtendParams.Custom 参数.",
"title": "Custom",
"properties": {
"FireEquipment": {
"required": [
"LeastObjCount"
],
"properties": {
"LeastObjCount": {
"type": "integer",
"description": "画面中至少出现的消防设施个数",
"title": "LeastObjCount"
}
},
"additionalProperties": true,
"type": "object",
"title": "FireEquipment",
"description": "物品及物品属性报警(2XXX) 消防设施"
}
},
"oneOf": [
{
"required": [
"FireEquipment"
]
}
]
},
"Threshold": {
"additionalProperties": {
"type": "number"
},
"type": "object",
"description": "阈值设置的接口,用于传入阈值",
"title": "Threshold",
"properties": {
"FIRE_EQUIPMENT": {
"type": "number",
"title": "FIRE_EQUIPMENT",
"default": 0.35,
"minimum": 0,
"maximum": 1
}
}
}
},
"description": "算法仓扩展参数,标准由 R 和业务制定."
},
"Labels": {
"type": "object",
"description": "用于平台透传信息(比如gb ID),算法仓应将此字段中的内容透 传到输出消息的指定字段中",
"title": "Labels"
}
},
"additionalProperties": true,
"type": "object",
"title": "Rule Params",
"description": "布控规则参数."
},
"type": "array",
"description": "任务配置参数, 包含一个或这个多个事件类型对应规则的配置.",
"title": "RulesParams"
},
"StreamOptions": {
"properties": {
"CaptureStreamOptions": {
"required": [
"Url",
"ImageType",
"MinWidth",
"MaxWidth",
"MinHeight",
"MaxHeight",
"DeprecatedQps",
"Qps"
],
"properties": {
"Url": {
"type": "string"
},
"ImageType": {
"enum": [
"UNSPECIFIED",
"JPEG",
"PNG",
"RAW",
"BMP"
],
"type": "string",
"title": "Image Type",
"description": "图片类型在开放平台上需要准确定义"
},
"MinWidth": {
"type": "integer"
},
"MaxWidth": {
"type": "integer"
},
"MinHeight": {
"type": "integer"
},
"MaxHeight": {
"type": "integer"
},
"DeprecatedQps": {
"type": "integer"
},
"Qps": {
"type": "number",
"description": "抓拍流对应的 Qps, 最小值是 0.001 为了 ai-paas gateway 计 算任务所需 Quota."
}
},
"additionalProperties": true,
"type": "object",
"title": "Capture Stream Options",
"description": "图片流参数设置."
},
"VideoStreamOptions": {
"required": [
"Url",
"Resolution",
"PlayType",
"StartTime",
"EndTime",
"PlaybackSpeed"
],
"properties": {
"Url": {
"type": "string",
"description": "视频地址"
},
"Resolution": {
"enum": [
"UNSPECIFIED",
"PIXELS_200W",
"PIXELS_400W",
"PIXELS_800W"
],
"type": "string",
"title": "Resolution",
"description": "视频流分辨率 用于 Quota 计算,用户需要保证视频流的分辨率 在该范围内, 当未指定时, 默认为 PIXELS_200W, 注意:AI-PaaS 不会对该字段进行实际拉流校验,当 视频流分辨率超出指定范围时,可能会导致解析服务负载过高."
},
"PlayType": {
"enum": [
"REALPLAY",
"PLAYBACK"
],
"type": "string",
"title": "Play Type",
"description": "取流类型 Playback 为历史流,Realplay 为实时流 默认是 REALPLAY."
},
"StartTime": {
"type": "string",
"description": "历史流开始时间, 当 PlayType 为 Playback 时,必填, 注意: 这个时间也会用作抓拍时间的起点.",
"format": "date-time"
},
"EndTime": {
"type": "string",
"description": "历史流结束时间, 当 PlayType 为 Playback 时,必填, 结束 时间必须大于开始时间.",
"format": "date-time"
},
"PlaybackSpeed": {
"type": "integer"
}
},
"additionalProperties": true,
"type": "object",
"title": "Video Stream Options",
"description": "视频流参数设置."
}
},
"additionalProperties": true,
"type": "object",
"oneOf": [
{
"required": [
"CaptureStreamOptions"
]
},
{
"required": [
"VideoStreamOptions"
]
}
],
"title": "Stream Options",
"description": "用于指定流的类型,以及流的参数, 支持图片流和视频流的设置."
},
"ID": {
"type": "string",
"title": "ID",
"description": "任务的UUID,一般由算法平台生成"
},
"Name": {
"type": "string",
"title": "Name",
"description": "任务的自定义别名"
}
},
"additionalProperties": true,
"type": "object",
"title": "Task Info",
"description": "算法服务所需的具体任务信息."
}
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化