跳到主要内容

create-recipe

title: "创建您的第一个配方(OV80i)" sidebar_label: "配方概览" sidebar_position: 5 slug: /guides/ov80i/create-recipe

创建您的第一个配方(OV80i)

Time: 30-45 minutes

这是相机将成为 AI 检查员的地方。一个 recipe 是一个完整的集合(图像设置、对齐、检查区域、AI 模型和输出规则),为一个特定的检查任务打包在一起。

You can have as many recipes as you want on a camera. Each one can be saved, backed up, transferred to other cameras, and version controlled.

开始前:记住瀑布原则

本节中的所有内容都遵循 瀑布原则。您将按顺序完成六个步骤。请勿跳过前面的步骤。 在进入下一步之前,请验证每一步是否工作正常。

1

Image Settings

Exposure, Gain, Lighting

2

Template & Aligner

Capture, Align

3

Inspection Regions

Draw ROIs

4

AI Training

Label, Train

5

Output Rules

Pass/Fail, IO

6

Deploy!

Activate, Verify

创建一个新配方

  1. 转到左侧边栏中的 All Recipes(打开相机时,这也是起始页)
  2. 点击 + New
  3. 给它一个名称(例如,“Surface Defect Inspection”)
  4. 选择配方类型:
    • Classification: 用于通过/失败、存在/不存在,或多类别决策
    • Segmentation: 用于像素级缺陷检测(划痕、污渍、测量)
  5. 点击 Activate 进入配方编辑器

Activate and enter the recipe editor

Multi-model recipes

OV80i 支持多模型配方。您可以在单个配方中组合 classifiers 和 segmenters,以实现全面的检测。例如,在一个配方中同时使用一个 classifier 来检查零件是否存在,以及一个 segmenter 来检测表面缺陷。 Not sure which to choose? See Classifier vs. Segmenter or ask the AI Assistant at tools.overview.ai.

Start with Development Mode enabled

Development Mode 让你在不影响生产输出的情况下测试你的配方。它大约在 30 秒内训练出一个快速模型,便于你在每个阶段验证准确性。仅在你确认检测工作正常后,才切换到 Production Mode。

Multi-model flexibility

OV80i 支持多模型配方,允许你在单个配方中组合 classifiers 和 segmenters,以实现全面的检测。例如,在同一次捕获上运行时,使用一个 classifier 来验证部件是否存在,使用一个 segmenter 来检测表面划痕。

现在按照以下六个步骤进行:

Step 1: Image Settings

Full guide: Image Settings

Configure Imaging screen

获取干净且一致的相机图像。调整 Exposure、Gain、White Balance;在使用广角镜头时,尤其要启用镜头畸变校正

Key settings:

  • Exposure: 传感器捕捉光线的时间。数值越高,画面越亮,但运动模糊也会增大
  • Gain: 数字增益。数值越高,画面越亮,但噪声越大
  • Lens Correction: 纠正广角镜头产生的桶形畸变。如有需要,请立即启用。 不要跳过。
  • External lighting: 在继续前,确保光照均匀且一致

Verify before moving on: Click Live Preview. The image should be sharp, well-lit, and consistent shot to shot.

Step 2: Template Image & Alignment

Full guide: Alignment Explained

Template alignment setup

这是大多数客户认为最具挑战性的步骤,也是影响最大的环节。对齐器使您的检测区域在零件在图像中移动时自动跟踪。

The short version:

  1. Capture a template image of a good part
  2. Place 2-3 small template regions on features that never change (strong edges, corners, holes)
  3. Place them as far apart as possible on the part
  4. Clean up noisy edges with the Ignore tool
  5. Save, then test with Live Preview. Move the part around and verify the alignment tracks it

Read Alignment Explained for the full walkthrough. This is the most important page in this documentation.

Step 3: Inspection Regions (ROIs)

Full guide: Inspection Regions

现在绘制 AI 将实际检测的区域。这些就是你的 ROIs( Regions of Interest )。

关键规则:尽量把 ROIs 做得越小越好。 这是导致客户问题的第二大来源。请阅读 Why ROI Size Matters 以了解原因。

简要要点:

  1. 创建一个 Inspection Type(例如“Surface Quality”),并设定你预期的类别(例如“good”、“defective”)
  2. 在你要检视的每个位置绘制矩形 ROIs
  3. 让它们刚好足以包含该特征,不要再大
  4. 给它们起一个描述性名称(例如“Surface_Center”)

Step 4: Train Your AI Model

Full guide: Training Your AI

分类器标注界面:为每个 ROI 选择类别

标注若干图像并训练您的首个模型。

简短版本:

  1. 每个类别从 3-5 张图像 开始。不要过度收集
  2. 在训练前逐一核对每个标签(一个错误标签就会毁掉您的模型)
  3. 先在 Development Mode 进行训练(约 30 秒)以检查信号
  4. 使用 Live Preview 进行测试。尽量找出问题
  5. 在失败的地方添加定向数据,重新训练
  6. 当 Development Mode 运作良好时,切换到 Production Mode(5-10 分钟)

Step 5: Output Rules (IO Block)

Full guide: Setting Up Outputs

通过/不通过逻辑配置

定义 AI 做出决策时的处理方式。

Basic Mode: 设置通过/不通过的规则。最简单的设置:所有 ROIs 必须通过,才能全球通过。该单一二元结果将发送给 PLC、HMI 或输出。

Advanced Mode (Node-RED): 对于超出简单通过/不通过的情况:自定义仪表板、时序逻辑、数据路由到 MES 系统、条码集成等。使用 tools.overview.ai 根据英文描述生成 Node-RED 流。

Step 6: Deploy and verify

将配方投入生产以激活

  1. 启用您的配方
  2. 设置触发模式(手动、硬件传感器、PLC 或时间间隔)
  3. 将测试部件通过系统处理
  4. 验证通过/不通过输出是否与预期一致
  5. 检查边缘情况,即最难分类的部件

恭喜!您现在已经拥有一个正在运行的 AI 检验系统。

Recipe checklist

在继续之前,请确认:

  • 新的配方已创建并命名
  • 图像设置已配置:清晰、光照充足、稳定
  • 对齐设置完毕并可靠追踪
  • 检测区域绘制完成:尺寸小、定位准确、命名清晰
  • AI 模型已在 Development Mode 下训练并测试
  • 输出规则已配置:通过/不通过与预期一致
  • 配方已激活并以正确的触发模式部署

What's next?