这是本节的多页打印视图。 点击此处打印.

返回本页常规视图.

训练教程

训练流程概述.仅提供训练宜美智AOI与AVI的AI训练

1 - 训练步骤

从创建项目到训练到验证的训练步骤.

创建项目

创建项目.具体请参阅创建项目

备注:因为需要该项目的数据参与训练,故创建项目时最好填写检修保存路径以及用户名和密码(用于快速创建任务),选择设备和工序/表面
各种工序所使用的标签的Json源码格式请现场AI实施人员给予 检修保存图片路径、主机用户名以及共享密码将被遗弃

快速创建任务

(将被移除,请使用手动创建任务, 一定要指定项目)

  1. 设置检修软件AOI是AI工序选择 AVI是AI膜面选择,只有设置了才会导出图片
  2. 检修软件导出所需图片,导出路径为参数设置->缺陷报告路径下的Dataset文件夹的以AI工序选择的名称命名的文件夹内
    • F7判定所选图片为漏失并导出到路径中的aoi_missing文件夹中
    • F8判定所选图片为误判并导出到路径中的aoi_wrong文件夹中
  3. 在项目页面上动作菜单里点击快速创建任务按钮, 就会选择从检修导出的图片上传到服务器并创建任务,任务命名默认为当前日期

备注 从项目快速创建任务取决于项目的工序或膜面,比如,如果项目的工序是内层,则快速创建任务所选的图片是从{导出路径}/内层中读取所有图片,如果没有图片,则会提示错误

进行标注

标注请参考

标注完成之后在标注界面的菜单点击完成作业

创建训练任务

要创建新训练任务,请打开训练任务配置:

并指定以下参数:

  1. 名称字段, 输入新任务的名称.
  2. 指定模型并选择任务
  3. 选择主机以及相应的显卡(单机多卡训练)
  4. 训练参数
    1. 训练批次: 分批读取数据集的批量大小
    2. 图像尺寸: 用于训练数据的图像尺寸
    3. 训练周期: 选择深度学习训练次数,训练轮数越多,通常学习越深,但到了一定轮数就会有极限,并且容易过拟合

进入训练任务详情进行训练

2 - 训练任务页面

训练任务页面概览.

任务页面包含元素,每个元素与一个单独的任务相关。它们按创建顺序排序. 每个元素包含:任务名称,进度条,按钮 打开, 菜单 动作. 每个按钮负责菜单中的动作特定功能:

  • 导出模型 — 下载该训练训练出的特定格式的模型文件.
  • 验证模型 - 使用该模型文件创建推理任务
  • 删除 — 删除训练任务.

在左上角有一个搜索栏,使用它你可以找到任务的分配人员,任务名称等. 右上角有排序, 快速筛选和筛选.

筛选

应用筛选器禁用快速筛选器.

筛选器的工作原理与标注过滤器类似, 你可以从属性中创建规则 运算符 和值 并将规则 分组. 有关详细信息,请参阅 筛选部分. 了解更多关于日期和时间选择.

要清除所有筛选,请单击 清除筛选.

支持为任务列表的属性

属性支持的值描述
状态已完成未完成
模型模型类型
油墨AVI所添加的油墨
开始时间开始训练的时间日期可以以’ dd.MM.yyyy HH:mm ‘格式输入,也可以在单击输入框时出现的窗口中选择日期
完成时间完成训练的时间日期可以以’ dd.MM.yyyy HH:mm ‘格式输入,也可以在单击输入框时出现的窗口中选择日期
名称名称

打开按钮进入任务详情.

3 - 训练任务详情界面

训练任务的详情界面,用于训练、查看训练结果以及推理验证.

训练任务详情是一个训练页面,包含训练详情,训练状态,训练结果以及模型推理记录

训练任务详情

  1. 模型训练卡片

    1. 首先展示创建训练任务所填入的参数
    2. 底部三个按钮 创建训练集开始训练停止训练
    3. 训练步骤
      1. 首先点击创建训练集以匹配训练代码所需的数据集, 如果其中任务发生标注改变的时候,需重新创建训练集进行训练
      2. 点击开始训练直到训练结束
      3. 停止训练[可选] 如果中途训练已达到训练预期,即可停止训练保存训练结果
  2. 训练状态卡片

    1. 训练状态
    2. 创建时间
    3. 创建数据集时间
    4. 开始时间
    5. 结束时间
    6. 训练用时
  3. 近500条推理记录 使用该训练任务训练出来的模型进行推理的任务

  4. 训练进度卡片 包含训练代码每个周期训练出来的指标趋势图

4 - 各类模型标签Json源码

各类模型标签Json源码.含AOI与AVI

AOI

内层

[
  {
    "name": "板损",
    "color": "#33ddff",
    "type": "any",
    "attributes": []
  },
  {
    "name": "刮花",
    "color": "#fa3253",
    "type": "any",
    "attributes": []
  },
  {
    "name": "铜渣",
    "color": "#34d1b7",
    "type": "any",
    "attributes": []
  },
  {
    "name": "微短",
    "color": "#ff007c",
    "type": "any",
    "attributes": []
  },
  {
    "name": "杂物_重",
    "color": "#ff6037",
    "type": "any",
    "attributes": []
  },
  {
    "name": "杂物_轻",
    "color": "#ddff33",
    "type": "any",
    "attributes": []
  },
  {
    "name": "缺口",
    "color": "#24b353",
    "type": "any",
    "attributes": []
  },
  {
    "name": "针孔",
    "color": "#b83df5",
    "type": "any",
    "attributes": []
  },
  {
    "name": "缺铜",
    "color": "#00a9ff",
    "type": "any",
    "attributes": []
  },
  {
    "name": "油墨_蓝",
    "color": "#ffff00",
    "type": "any",
    "attributes": []
  },
  {
    "name": "油墨_绿",
    "color": "#007fff",
    "type": "any",
    "attributes": []
  },
  {
    "name": "异色",
    "color": "#2b00ff",
    "type": "any",
    "attributes": []
  },
  {
    "name": "胶膜",
    "color": "#fd2b00",
    "type": "any",
    "attributes": []
  },
  {
    "name": "气泡",
    "color": "#fc00fc",
    "type": "any",
    "attributes": []
  },
  {
    "name": "板边",
    "color": "#007eff",
    "type": "any",
    "attributes": []
  },
  {
    "name": "氧化_轻",
    "color": "#a40287",
    "type": "any",
    "attributes": []
  },
  {
    "name": "氧化_重",
    "color": "#a61d02",
    "type": "any",
    "attributes": []
  },
  {
    "name": "毛边微短_重",
    "color": "#33ddff",
    "type": "any",
    "attributes": []
  },
  {
    "name": "毛边微短1",
    "color": "#33ddff",
    "type": "any",
    "attributes": []
  },
  {
    "name": "毛边微短2",
    "color": "#fa3253",
    "type": "any",
    "attributes": []
  },
  {
    "name": "毛边微短3",
    "color": "#34d1b7",
    "type": "any",
    "attributes": []
  },
  {
    "name": "毛边微短4",
    "color": "#ff007c",
    "type": "any",
    "attributes": []
  },
  {
    "name": "毛边微短5",
    "color": "#ff6037",
    "type": "any",
    "attributes": []
  },
  {
    "name": "毛边微短6",
    "color": "#ddff33",
    "type": "any",
    "attributes": []
  },
  {
    "name": "毛边微短7",
    "color": "#24b353",
    "type": "any",
    "attributes": []
  },
  {
    "name": "毛边微短8",
    "color": "#b83df5",
    "type": "any",
    "attributes": []
  },
  {
    "name": "毛边微短9",
    "color": "#00a9ff",
    "type": "any",
    "attributes": []
  },
  {
    "name": "毛边微短10",
    "color": "#fcbf03",
    "type": "any",
    "attributes": []
  },
  {
    "name": "毛边微短11",
    "color": "#b91787",
    "type": "any",
    "attributes": []
  },
  {
    "name": "氧化",
    "color": "#220a9c",
    "type": "any",
    "attributes": []
  },
  {
    "name": "毛边单",
    "color": "#0fcd0f",
    "type": "any",
    "attributes": []
  },
  {
    "name": "毛边微短12",
    "color": "#a797fb",
    "type": "any",
    "attributes": []
  },
  {
    "name": "夹角铜渣",
    "color": "#aaf0d1",
    "type": "any",
    "attributes": []
  }
]

外层

[
  {
    "name": "铜渣",
    "color": "#e2b11a",
    "type": "polygon",
    "attributes": []
  },
  {
    "name": "胶膜",
    "color": "#a67616",
    "type": "polygon",
    "attributes": []
  },
  {
    "name": "杂物轻",
    "color": "#1eccae",
    "type": "polygon",
    "attributes": []
  },
  {
    "name": "杂物重",
    "color": "#3218c3",
    "type": "any",
    "attributes": []
  },
  {
    "name": "缺口",
    "color": "#b71280",
    "type": "polygon",
    "attributes": []
  },
  {
    "name": "毛边微短",
    "color": "#ff6037",
    "type": "polygon",
    "attributes": []
  },
  {
    "name": "刮花",
    "color": "#86d7b3",
    "type": "polygon",
    "attributes": []
  },
  {
    "name": "板损",
    "color": "#d12044",
    "type": "polygon",
    "attributes": []
  },
  {
    "name": "缺铜",
    "color": "#5b95d1",
    "type": "polygon",
    "attributes": []
  },
  {
    "name": "异色",
    "color": "#957724",
    "type": "polygon",
    "attributes": []
  },
  {
    "name": "氧化",
    "color": "#a48836",
    "type": "polygon",
    "attributes": []
  },
  {
    "name": "油墨绿",
    "color": "#5c4ac8",
    "type": "any",
    "attributes": []
  },
  {
    "name": "油墨蓝",
    "color": "#ab9fde",
    "type": "polygon",
    "attributes": []
  },
  {
    "name": "气泡",
    "color": "#71689f",
    "type": "polygon",
    "attributes": []
  },
  {
    "name": "通孔",
    "color": "#fa7dbb",
    "type": "any",
    "attributes": []
  },
  {
    "name": "孔破",
    "color": "#ff6037",
    "type": "any",
    "attributes": []
  },
  {
    "name": "孔内铜渣",
    "color": "#0d7a4a",
    "type": "polygon",
    "attributes": []
  },
  {
    "name": "盲孔",
    "color": "#ddff33",
    "type": "any",
    "attributes": []
  },
  {
    "name": "夹角铜渣",
    "color": "#fafa37",
    "type": "any",
    "attributes": []
  },
  {
    "name": "孔边披风",
    "color": "#5544ab",
    "type": "any",
    "attributes": []
  },
  {
    "name": "荚膜",
    "color": "#25ca5b",
    "type": "any",
    "attributes": []
  },
  {
    "name": "板边",
    "color": "#ab2669",
    "type": "any",
    "attributes": []
  }
]

树脂塞孔

[
  {
    "name": "漏塞",
    "color": "#ff007c",
    "type": "rectangle",
    "attributes": []
  },
  {
    "name": "塞孔凹陷",
    "color": "#422bc1",
    "type": "rectangle",
    "attributes": []
  },
  {
    "name": "正常塞孔",
    "color": "#f59331",
    "type": "rectangle",
    "attributes": []
  },
  {
    "name": "堵孔",
    "color": "#32b7fa",
    "type": "rectangle",
    "attributes": []
  },
  {
    "name": "电镀",
    "color": "#34d1b7",
    "type": "rectangle",
    "attributes": []
  },
  {
    "name": "塞孔白边",
    "color": "#aaf0d1",
    "type": "rectangle",
    "attributes": []
  },
  {
    "name": "塞孔气泡",
    "color": "#fafa37",
    "type": "rectangle",
    "attributes": []
  },
  {
    "name": "塞孔残渣",
    "color": "#ffcc33",
    "type": "rectangle",
    "attributes": []
  },
  {
    "name": "塞孔异色",
    "color": "#1b8238",
    "type": "rectangle",
    "attributes": []
  },
  {
    "name": "板面树脂",
    "color": "#d3e5ea",
    "type": "rectangle",
    "attributes": []
  },
  {
    "name": "板面刮伤",
    "color": "#7a920e",
    "type": "rectangle",
    "attributes": []
  },
  {
    "name": "树脂进孔",
    "color": "#3a77b5",
    "type": "rectangle",
    "attributes": []
  },
  {
    "name": "铜渣",
    "color": "#a3bea1",
    "type": "rectangle",
    "attributes": []
  }
]

AVI

5 - 模型验证

验证训练模型是否能识别出任务中图片的缺陷

要在自训练平台上进行模型验证,您需要先训练模型或者导入模型, 然后创建一个验证任务并指定其参数。

要创建验证任务, 请在 验证 页面上单击 + 并 选择 开始新推理. 开始新推理

选择数据集与模型

  1. 选择工序(模型工序)
  2. 选择模型(训练模型)
  3. 选择项目(将项目中为验证集的任务作为验证数据集,具体在任务详情设置) 然后点击 下一步

输入置信度

  1. 输入基础置信度(每个标签应用到的置信度)
  2. 多选标签输入标签置信度(选择特定标签的置信度,必须大于等于基础置信度)
    • 构造格式标签页上,单击增加标签置信度

      1. 标签构造器菜单将会打开:
    • 源码格式编辑标签置信度
  3. 点击下一步

输入推理参数

参数详述
设备选择显卡
批量大小推理时每次输入的图像数量,决定每次计算时的批量大小(batch size)。
图像尺寸数据集中的图像尺寸,用于模型输入时的尺寸调整。通常是指图像在进行推理前,按比例缩放到的目标尺寸
IOU阈值模型预测的标签与人工标注的真实标签进行比较时,计算交并比(IOU)。如果预测的标签与真实标签的 IOU 小于该阈值,则认为预测标签与真实标签不匹配,视为假阳性(false positive)
低重叠阈值在 IOU 阈值范围内,如果预测标签与真实标签的重叠度大于 IOU 阈值,但小于低重叠阈值,则认为预测标签与真实标签的重叠度较低,可能被视为不确定或低质量的预测结果.
点击开始推理会进入到验证详情界面

验证详情

验证详情包括三部分,默认展开推理详情

  1. 设置
  2. 评测指标
  3. 推理详情

设置

设置包括新建验证时的各项参数

评测指标

评测指标包括验证时的各项指标

  1. F1分数
  2. 精确率
  3. 召回率
  4. 验证用时 点击类别概览按钮,可以查看各项类别的指标

推理详情

包括混淆矩阵实例详情两部分

  1. 混淆矩阵
    1. 横轴代表实际标签
    2. 纵轴代表预测标签
    3. 纵轴中的{}代表遗漏,在实际标签里没有预测标签与之对应
    4. 横轴上的BG代表多报,在预测标签里没有实际标签与之对应
    5. 横轴上的LOC代表实际标签与预测标签匹配但是低于低重叠阈值,即重叠度较低
  2. 实例详情
    1. 点击混淆矩阵上的坐标,即可在实例详情中显示实例和标注信息
    2. 选择实例点击全屏可以放大最后一个选择实例图像
    3. 多选实例,点击修改 点击标题可以进入标注界面进行修改标注

6 - 导入模型

导入已经训练好的模型进行验证

要在自训练平台上进行模型验证,您可能需要先导入训练模型并指定其参数。

要导入训练模型, 请在 训练 页面上单击 + 并 选择 导入训练模型. 导入训练模型

导入训练模型

  1. 填入一下参数

    参数详述
    名称提供模型名称
    模型选择训练模型工序
    批量大小训练时的批量大小(batch_size)
    图像尺寸数据集的图像尺寸.
    训练轮数模型所在的epoch.
  2. 上传模型文件

  3. 点击确定