AI 驱动文档
您想了解什么?
快照与变更日志
参数快照
每个已发布的版本都会存储一个参数快照:程序和测试集参数按照固定的、有版本的架构进行捕获,因此一个版本包含其内部的完整结构化内容。每个版本还有一个 README 文件,以可读形式呈现该快照。
一个版本包含两个快照文件:
parameters/recipe/<version>.json— 程序快照parameters/testset/<version>.json— 测试集快照
两者都带有一个 schema_version,用于描述该文件的结构(当前为 1.1)。字段使用下述点路径表示;[] 表示列表,因此 blocks[].type_config.labels[].name 表示每个模型中每个标签的 name。
程序快照
parameters/recipe/<version>.json
| 字段 | 类型 | 含义 |
|---|---|---|
schema_version | string | 此文件的架构结构版本。 |
extracted_at | string | 快照生成时间。 |
recipe_name | string | 程序名称。 |
description | string | null | 程序描述。 |
plc_recipe_id | integer | null | PLC 程序 ID。 |
meta_version | integer | 程序元数据版本。 |
database_version | integer | 程序数据库版本。 |
software_version | string | 程序软件版本。 |
imaging.preview_image.sha | string | 预览图像的 SHA。 |
imaging.preview_image.path | string | 预览图像的路径。 |
imaging.exposure | integer | null | 曝光时间。 |
imaging.gain | number | null | 传感器增益。 |
imaging.brightness | integer | null | 亮度。 |
imaging.gamma | integer | null | 伽玛值。 |
imaging.focal_length | number | null | 焦距。 |
imaging.focus | number | null | 对焦。 |
imaging.focus_distance | number | null | 对焦距离。 |
imaging.rotation_mode | integer | null | 图像旋转模式。 |
imaging.acq_mode | integer | null | 采集模式。 |
imaging.hdr_mode_enabled | boolean | null | HDR 模式开/关。 |
imaging.led_mode | integer | null | LED 照明模式。 |
imaging.led_gain | integer | null | LED 增益。 |
imaging.led_strobe_mode | boolean | null | LED 频闪开/关。 |
imaging.lens_correct | boolean | null | 镜头畸变校正开/关。 |
imaging.photometric_enabled | boolean | null | 光度校正开/关。 |
imaging.photometric_mode | integer | null | 光度模式。 |
imaging.awb_red | integer | null | 自动白平衡红色通道。 |
imaging.awb_green | integer | null | 自动白平衡绿色通道。 |
imaging.awb_blue | integer | null | 自动白平衡蓝色通道。 |
imaging.awb_op | boolean | null | 自动白平衡启用状态。 |
imaging.calibration_pixels_per_unit | number | null | 校准比例(每单位像素数)。 |
imaging.calibration_unit | string | null | 校准单位。 |
imaging.trigger_debounce | integer | null | 触发去抖动。 |
imaging.trigger_delay | integer | null | 触发延迟。 |
imaging.raw | object | 完整未解析的图像源。 |
blocks[].block_type | string | 模型类型(alignment、classification、segmentation、measurement、ocr、unsupervised)。 |
blocks[].uuid | string | 稳定的模型标识。 |
blocks[].name | string | 模型名称。 |
blocks[].status | string | 模型状态。 |
blocks[].is_enabled | boolean | 模型是否运行。 |
blocks[].has_model | boolean | 是否附加了已训练的模型。 |
blocks[].search_area.search_area_id | integer | null | 搜索区域 ID。 |
blocks[].search_area.search_area_bbox | list of number | null | 搜索区域边界框。 |
blocks[].search_area.roi_regions[].bbox | list of number | ROI 边界框。 |
blocks[].search_area.roi_regions[].angle | number | ROI 旋转角度。 |
blocks[].type_config | object | 特定类型配置(见下文)。 |
blocks[].model_ref.sha | string | 已训练模型文件的 SHA。 |
blocks[].model_ref.path | string | 已训练模型文件的路径。 |
blocks[].model_ref.file_extension | string | 已训练模型文件的扩展名。 |
aligner_reference_image.sha | string | 对齐参考图像 SHA。 |
aligner_reference_image.path | string | 对齐参考图像路径。 |
aligner_reference_image.full_repo_path | string | 对齐参考图像在仓库内的路径。 |
node_red_flow.basic_mode | boolean | 流程是否处于基本模式。 |
node_red_flow.basic_flow_id | string | null | 基本模式流程 ID。 |
node_red_flow.basic_flow_metadata | object | null | 基本模式流程元数据。 |
node_red_flow.nodes[].id | string | 节点 ID。 |
node_red_flow.nodes[].node_type | string | 节点类型。 |
node_red_flow.nodes[].name | string | 节点名称。 |
node_red_flow.nodes[].x | integer | null | 节点画布 X 位置。 |
node_red_flow.nodes[].y | integer | null | 节点画布 Y 位置。 |
node_red_flow.nodes[].wires | list of list of string | 输出连接(每个输出对应的目标节点 ID)。 |
node_red_flow.nodes[].func | string | null | 函数节点代码。 |
node_red_flow.nodes[].raw | object | 完整未解析的节点源。 |
模型配置
blocks[].type_config 下的字段取决于 blocks[].block_type。
| 字段 | 类型 | 含义 |
|---|---|---|
blocks[].type_config.angle_tolerance_left | number | null | 对齐 — 左角度容差。 |
blocks[].type_config.angle_tolerance_right | number | null | 对齐 — 右角度容差。 |
blocks[].type_config.confidence_score_threshold | number | null | 对齐 / 分割 / 无监督 — 匹配/置信度阈值。 |
blocks[].type_config.sensitivity | number | null | 对齐 / 无监督 — 灵敏度。 |
blocks[].type_config.version | integer | null | 对齐 — 配置版本。 |
blocks[].type_config.scale_invariant | boolean | null | 对齐 — 尺度不变匹配开/关。 |
blocks[].type_config.inference_mode | string | null | 对齐 — 推理模式。 |
blocks[].type_config.dl_performance_mode | integer | null | 对齐 — 深度学习性能模式。 |
blocks[].type_config.skip_block | boolean | null | 对齐 — 跳过此模型。 |
blocks[].type_config.template_image_id_path | string | null | 对齐 — 模板图像引用路径。 |
blocks[].type_config.labels[].name | string | 分类 — 标签名称。 |
blocks[].type_config.labels[].confidence_threshold | number | null | 分类 — 每个标签的置信度阈值。 |
blocks[].type_config.labels[].is_positive | boolean | null | 分类 — 该标签是否计为通过。 |
blocks[].type_config.labels[].inspection_type | integer | null | 分类 — 检测类型。 |
blocks[].type_config.labels[].color | string | null | 分类 — 显示颜色。 |
blocks[].type_config.segmentation_type | string | null | 分割 — 分割类型。 |
blocks[].type_config.classes[].class_name | string | 分割 — 类别名称。 |
blocks[].type_config.classes[].mask_pixel_value | integer | null | 分割 — 掩膜像素值。 |
blocks[].type_config.classes[].color | string | null | 分割 — 显示颜色。 |
blocks[].type_config.classes[].mask_sha | string | null | 分割 — 掩膜文件 SHA。 |
blocks[].type_config.classes[].mask_path | string | null | 分割 — 掩膜文件路径。 |
blocks[].type_config.measurement_regions[] | object | 测量 — 测量区域。 |
blocks[].type_config.min_text_area | integer | null | ocr — 最小文本区域。 |
blocks[].type_config.text_segmentation_threshold | number | null | ocr — 文本分割阈值。 |
blocks[].type_config.unclip_ratio | number | null | ocr — unclip 比率。 |
blocks[].type_config.unclip_ceiling | number | null | ocr — unclip 上限。 |
blocks[].type_config.unsupervised_type | string | null | 无监督 — 方法类型。 |
blocks[].type_config.epochs | integer | null | 无监督 — 训练轮数。 |
blocks[].type_config.encoder | string | null | 无监督 — 编码器。 |
blocks[].type_config.learning_rate | number | null | 无监督 — 学习率。 |
blocks[].type_config.downsampling_ratio | number | null | 无监督 — 下采样比率。 |
blocks[].type_config.tiled_mode | boolean | null | 无监督 — 平铺模式开/关。 |
blocks[].type_config.min_blob_area | number | null | 无监督 — 最小 blob 面积。 |
blocks[].type_config.max_blob_area | number | null | 无监督 — 最大 blob 面积。 |
blocks[].type_config.hyperparameters | object | 分类 / 分割 / 测量 / ocr / 无监督 — 训练超参数。 |
测试集快照
parameters/testset/<version>.json
| 字段 | 类型 | 含义 |
|---|---|---|
schema_version | string | 该文件的 Schema 形态版本。 |
extracted_at | string | 快照生成时间。 |
name | string | 测试集名称。 |
description | string | null | 测试集描述。 |
author | string | null | 测试集作者。 |
image_count | integer | 图像数量。 |
images_with_ground_truth | integer | 具有真实标签的图像数量。 |
search_area_ids[] | string | 测试集引用的搜索区域 ID。 |
per_class_distribution[].class_name | string | 类别名称。保留字段;当前始终为空(视为"分布不可用")。 |
per_class_distribution[].count | integer | 该类别的图像数量。保留字段;当前始终为空。 |
images[].image_id | string | 图像 ID。 |
images[].ground_truth_fingerprint | string | null | 图像真实标签的指纹。 |
images[].has_ground_truth | boolean | 图像是否具有真实标签。 |
README
每个版本还带有已提交的 README.md,以可读形式呈现快照。其章节包括:
- Imaging Settings — 图像参数的表格。
- Aligner Reference Image — 对齐参考图像及其 SHA-256(仅当程序中包含该图像时)。
- Inspection Blocks — 每个模型一个子章节,标题为
<name> (<block type>),包含该模型的 UUID、状态和启用标志,随后是特定类型的部分 — Classification Labels、Segmentation Classes、OCR Parameters、Unsupervised Parameters、Alignment Parameters,或测量区域数量。 - Node-RED Flow — 基本模式标志、节点数量以及节点表格(ID、类型、名称)。
- Test Set — 名称、描述、作者、图像数量、具有真实标签的图像数量以及搜索区域。
更新日志
发布某个版本时,会将其参数快照与上一版本的快照进行比较,以生成更新日志。该比较是结构化的 — 按上述 schema 逐字段比较,其中列表(模型、标签、类别、Node-RED 节点)通过稳定的标识而非位置进行匹配,因此重新排序不会显示为变更。程序和测试集分别独立比较,更新日志根据已提交的快照按需生成,因此可用于任意两个版本之间的比较。
变更按与快照相同的章节分组,某个章节只有在其中发生变化时才会出现。无差异的版本会被相应标记,而第一个版本则显示完整的初始信息,而非差异对比。