跳到主要内容

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_versionstring此文件的架构结构版本。
extracted_atstring快照生成时间。
recipe_namestring程序名称。
descriptionstring | null程序描述。
plc_recipe_idinteger | nullPLC 程序 ID。
meta_versioninteger程序元数据版本。
database_versioninteger程序数据库版本。
software_versionstring程序软件版本。
imaging.preview_image.shastring预览图像的 SHA。
imaging.preview_image.pathstring预览图像的路径。
imaging.exposureinteger | null曝光时间。
imaging.gainnumber | null传感器增益。
imaging.brightnessinteger | null亮度。
imaging.gammainteger | null伽玛值。
imaging.focal_lengthnumber | null焦距。
imaging.focusnumber | null对焦。
imaging.focus_distancenumber | null对焦距离。
imaging.rotation_modeinteger | null图像旋转模式。
imaging.acq_modeinteger | null采集模式。
imaging.hdr_mode_enabledboolean | nullHDR 模式开/关。
imaging.led_modeinteger | nullLED 照明模式。
imaging.led_gaininteger | nullLED 增益。
imaging.led_strobe_modeboolean | nullLED 频闪开/关。
imaging.lens_correctboolean | null镜头畸变校正开/关。
imaging.photometric_enabledboolean | null光度校正开/关。
imaging.photometric_modeinteger | null光度模式。
imaging.awb_redinteger | null自动白平衡红色通道。
imaging.awb_greeninteger | null自动白平衡绿色通道。
imaging.awb_blueinteger | null自动白平衡蓝色通道。
imaging.awb_opboolean | null自动白平衡启用状态。
imaging.calibration_pixels_per_unitnumber | null校准比例(每单位像素数)。
imaging.calibration_unitstring | null校准单位。
imaging.trigger_debounceinteger | null触发去抖动。
imaging.trigger_delayinteger | null触发延迟。
imaging.rawobject完整未解析的图像源。
blocks[].block_typestring模型类型(alignmentclassificationsegmentationmeasurementocrunsupervised)。
blocks[].uuidstring稳定的模型标识。
blocks[].namestring模型名称。
blocks[].statusstring模型状态。
blocks[].is_enabledboolean模型是否运行。
blocks[].has_modelboolean是否附加了已训练的模型。
blocks[].search_area.search_area_idinteger | null搜索区域 ID。
blocks[].search_area.search_area_bboxlist of number | null搜索区域边界框。
blocks[].search_area.roi_regions[].bboxlist of numberROI 边界框。
blocks[].search_area.roi_regions[].anglenumberROI 旋转角度。
blocks[].type_configobject特定类型配置(见下文)。
blocks[].model_ref.shastring已训练模型文件的 SHA。
blocks[].model_ref.pathstring已训练模型文件的路径。
blocks[].model_ref.file_extensionstring已训练模型文件的扩展名。
aligner_reference_image.shastring对齐参考图像 SHA。
aligner_reference_image.pathstring对齐参考图像路径。
aligner_reference_image.full_repo_pathstring对齐参考图像在仓库内的路径。
node_red_flow.basic_modeboolean流程是否处于基本模式。
node_red_flow.basic_flow_idstring | null基本模式流程 ID。
node_red_flow.basic_flow_metadataobject | null基本模式流程元数据。
node_red_flow.nodes[].idstring节点 ID。
node_red_flow.nodes[].node_typestring节点类型。
node_red_flow.nodes[].namestring节点名称。
node_red_flow.nodes[].xinteger | null节点画布 X 位置。
node_red_flow.nodes[].yinteger | null节点画布 Y 位置。
node_red_flow.nodes[].wireslist of list of string输出连接(每个输出对应的目标节点 ID)。
node_red_flow.nodes[].funcstring | null函数节点代码。
node_red_flow.nodes[].rawobject完整未解析的节点源。

模型配置

blocks[].type_config 下的字段取决于 blocks[].block_type

字段类型含义
blocks[].type_config.angle_tolerance_leftnumber | null对齐 — 左角度容差。
blocks[].type_config.angle_tolerance_rightnumber | null对齐 — 右角度容差。
blocks[].type_config.confidence_score_thresholdnumber | null对齐 / 分割 / 无监督 — 匹配/置信度阈值。
blocks[].type_config.sensitivitynumber | null对齐 / 无监督 — 灵敏度。
blocks[].type_config.versioninteger | null对齐 — 配置版本。
blocks[].type_config.scale_invariantboolean | null对齐 — 尺度不变匹配开/关。
blocks[].type_config.inference_modestring | null对齐 — 推理模式。
blocks[].type_config.dl_performance_modeinteger | null对齐 — 深度学习性能模式。
blocks[].type_config.skip_blockboolean | null对齐 — 跳过此模型。
blocks[].type_config.template_image_id_pathstring | null对齐 — 模板图像引用路径。
blocks[].type_config.labels[].namestring分类 — 标签名称。
blocks[].type_config.labels[].confidence_thresholdnumber | null分类 — 每个标签的置信度阈值。
blocks[].type_config.labels[].is_positiveboolean | null分类 — 该标签是否计为通过。
blocks[].type_config.labels[].inspection_typeinteger | null分类 — 检测类型。
blocks[].type_config.labels[].colorstring | null分类 — 显示颜色。
blocks[].type_config.segmentation_typestring | null分割 — 分割类型。
blocks[].type_config.classes[].class_namestring分割 — 类别名称。
blocks[].type_config.classes[].mask_pixel_valueinteger | null分割 — 掩膜像素值。
blocks[].type_config.classes[].colorstring | null分割 — 显示颜色。
blocks[].type_config.classes[].mask_shastring | null分割 — 掩膜文件 SHA。
blocks[].type_config.classes[].mask_pathstring | null分割 — 掩膜文件路径。
blocks[].type_config.measurement_regions[]object测量 — 测量区域。
blocks[].type_config.min_text_areainteger | nullocr — 最小文本区域。
blocks[].type_config.text_segmentation_thresholdnumber | nullocr — 文本分割阈值。
blocks[].type_config.unclip_rationumber | nullocr — unclip 比率。
blocks[].type_config.unclip_ceilingnumber | nullocr — unclip 上限。
blocks[].type_config.unsupervised_typestring | null无监督 — 方法类型。
blocks[].type_config.epochsinteger | null无监督 — 训练轮数。
blocks[].type_config.encoderstring | null无监督 — 编码器。
blocks[].type_config.learning_ratenumber | null无监督 — 学习率。
blocks[].type_config.downsampling_rationumber | null无监督 — 下采样比率。
blocks[].type_config.tiled_modeboolean | null无监督 — 平铺模式开/关。
blocks[].type_config.min_blob_areanumber | null无监督 — 最小 blob 面积。
blocks[].type_config.max_blob_areanumber | null无监督 — 最大 blob 面积。
blocks[].type_config.hyperparametersobject分类 / 分割 / 测量 / ocr / 无监督 — 训练超参数。

测试集快照

parameters/testset/<version>.json

字段类型含义
schema_versionstring该文件的 Schema 形态版本。
extracted_atstring快照生成时间。
namestring测试集名称。
descriptionstring | null测试集描述。
authorstring | null测试集作者。
image_countinteger图像数量。
images_with_ground_truthinteger具有真实标签的图像数量。
search_area_ids[]string测试集引用的搜索区域 ID。
per_class_distribution[].class_namestring类别名称。保留字段;当前始终为空(视为"分布不可用")。
per_class_distribution[].countinteger该类别的图像数量。保留字段;当前始终为空。
images[].image_idstring图像 ID。
images[].ground_truth_fingerprintstring | null图像真实标签的指纹。
images[].has_ground_truthboolean图像是否具有真实标签。

README

每个版本还带有已提交的 README.md,以可读形式呈现快照。其章节包括:

  • Imaging Settings — 图像参数的表格。
  • Aligner Reference Image — 对齐参考图像及其 SHA-256(仅当程序中包含该图像时)。
  • Inspection Blocks — 每个模型一个子章节,标题为 <name> (<block type>),包含该模型的 UUID、状态和启用标志,随后是特定类型的部分 — Classification LabelsSegmentation ClassesOCR ParametersUnsupervised ParametersAlignment Parameters,或测量区域数量。
  • Node-RED Flow — 基本模式标志、节点数量以及节点表格(ID、类型、名称)。
  • Test Set — 名称、描述、作者、图像数量、具有真实标签的图像数量以及搜索区域。

更新日志

发布某个版本时,会将其参数快照与上一版本的快照进行比较,以生成更新日志。该比较是结构化的 — 按上述 schema 逐字段比较,其中列表(模型、标签、类别、Node-RED 节点)通过稳定的标识而非位置进行匹配,因此重新排序不会显示为变更。程序和测试集分别独立比较,更新日志根据已提交的快照按需生成,因此可用于任意两个版本之间的比较。

变更按与快照相同的章节分组,某个章节只有在其中发生变化时才会出现。无差异的版本会被相应标记,而第一个版本则显示完整的初始信息,而非差异对比。