跳到主要内容

AI 驱动文档

您想了解什么?

添加数据和重新训练

OV10i Note

OV10i 仅支持 classification 模型。本页提及的分割功能在 OV20iOV80i 摄像头上可用。

本教程演示如何通过向现有配方添加新图像并重新训练模型来提高 AI 模型的准确性。当模型错误地将良品判定为不良,或在生产中遇到新的变体时,此过程尤为关键。

视频指南

请查看实操演示: OV Auto-Defect Creator Studio

你将学到:

  • 如何查找并选择用于重新训练的图像
  • 如何向现有 trainset 添加图像
  • 如何为新的训练数据打标签
  • 如何使用新数据重新训练模型

适用时机: 当良品在检验中被误判为不良,或出现新的零件变体,或需要通过额外示例提升模型的准确性时。

先决条件

  • 具备经过训练的 AI 模型的活动配方(classification 或 segmentation)
  • 访问 OV10i 摄像头界面
  • Library 中需要添加到训练的图像

Step 1: Find Images for Retraining

1.1 Navigate to Library

  1. Open the OV10i interface
  2. Click "Library" in the left navigation menu
  3. You'll see all captured images from your camera

1.2 Filter Images

  1. Filter by Recipe: Select the recipe you want to improve
  2. Filter by Pass/Fail: Select "FAIL" to see failed images, or "PASS" to see passed images
  3. Sort By: Choose date or other criteria to organize results
  4. Click "Search" to display filtered results

Goal: Find images that were incorrectly classified - either good parts that failed or bad parts that passed.

Step 2: Add Images to Trainset

2.1 Select Images

  1. Review each image to identify incorrectly classified parts
  2. Select images that show:
    • Good parts that were incorrectly marked as failed
    • Bad parts that were incorrectly marked as passed
  3. Click the checkbox on each image you want to add
Important

Add images that were incorrectly classified - this includes good parts that failed AND bad parts that passed. Both help improve model accuracy.

image.png

2.2 Add to Trainset

  1. After selecting images, click "Add to the active recipe's trainset" at the bottom
  2. A success message will confirm the images were added
  3. Click "Go to recipe editor" to continue

Step 3: Label New Training Data

3.1 Navigate to Label and Train

  1. From Recipe Editor, go to:
    • Classification Recipe: "Classification Block"
    • Segmentation Recipe: "Label And Train"
  2. Click "View All ROIs"

3.2 Find Unlabeled Images

  1. Use "Filter By Class" dropdown
  2. Select "Unlabeled" to show only unlabeled images
  3. You'll see the images you just added to the trainset

image.png

3.3 标注已选图像

  1. 选择你添加的所有未标注的图像
  2. 在底部左下角点击 “Label Selected ROIs”
  3. 从下拉菜单中选择正确的标签(例如 “Pass”、“Good” 等)
  4. 点击 “OK” 以应用该标签
重要

在不同标注会话之间点击 “Clear Selection” 以避免错误标注。

image.png

3.4 关闭 ROI 视图

  1. 关闭 “View All ROIs” 模态框
  2. 返回到主页面:标注与训练

第4步:重新训练模型

4.1 开始重新训练

  1. 点击 “训练分类器模型”“训练分割器模型”
  2. 系统将使用所有现有数据以及您新增的图像进行重新训练
  3. 监控训练进度

4.2 训练过程

  • 模型从旧的和新的带标签数据中学习
  • 训练时间取决于数据总量
  • 在测试之前等待训练完成

4.3 测试改进后的模型

  1. 使用 “实时预览模式” 测试重新训练的模型
  2. 使用此前被错误判定为不良的相同图像进行测试
  3. 验证模型现在是否能正确将良品识别为通过

第5步:验证结果

5.1 使用新图像进行测试

  1. 捕获相似零件的新图像
  2. 检查模型在边缘情形下的表现是否有所提升
  3. 验证先前良好的图像现在是否正确通过

5.2 监控性能

  1. 关注是否出现新的误报或漏报
  2. 记录准确性的提升
  3. 记录仍存在的问题以便未来重新训练

成功!您的模型已重新训练

您的改进后 AI 模型现在可以:

✅ 更好地识别此前被误判为不良的良品

✅ 能处理生产零件中的新变体

✅ 减少误判为不良的情况并提高准确性

✅ 适应制造过程中的变更

成功的关键提示

数据质量

  • 添加被错误分类的图像(包括误判通过和误判为不良)
  • 标注要保持一致——将良品标注为“Pass”,不良品标注为“Fail”
  • 包含通过和不通过条件的多样化示例
  • 在不同标注会话之间清除选择

何时重新训练

  • 误判为不良的情况增加(良品被判定为不良)
  • 误判为通过的情况增加(不良品通过)
  • 生产中出现新的零件变体
  • 工艺变更影响零件外观
  • 材料或照明的季节性变化

最佳实践

  • 从小做起 — 一次添加 10-20 张图像
  • 在每次重新训练后进行彻底测试
  • 记录变更和改进
  • 在进行重大重新训练前保留工作模型的备份

下一步

在重新训练模型后:

  1. 监控生产以提升准确性
  2. 继续收集有问题的图像以便未来重新训练
  3. 如有需要,设置定期重新训练计划
  4. 培训操作员,了解何时将图像标记为需要重新训练
  5. 记录重新训练过程以保持一致性

🔗 参考链接