- 入门指南
- 框架组件
- AI Center 中的 Document Understanding
- 管道
- ML 包
- Data Manager
- OCR 服务
- 许可
- 参考
复选框和签名
复选框
在 ML 提取模型的上下文中,复选框不是实际值,而是用于选择特定文本段的一种方式。
因此,其旁边的词语将成为焦点,而非复选框。这正是复选框的作用,即充当特定词语的锚点。
因此,要训练 ML 模型,您需要标记词语,而不是复选框。
在某些情况下,系统不会检测复选框。例如,OCR 可能会将复选框读取为 X,或者它可能只是某个手写标记,根本不会被选取。ML 模型可以学习所有这些情况,并将其与标记旁边的词语相关联。
因此,训练模型以识别词语会更可靠,而无论如何选择它:无论是使用复选框、X 还是手写标记(带圆圈和下划线等)。
单选项复选框
对于上面的示例,您可以在 Data Manager 中创建三个字段,如下所示:
- “情况 - 就业”(标记“是”一词);
- “情况 - 交通事故”(标记“是”一词);
- “情况 - 其他事故”(标记“否”一词);
The ML model learns to recognize those words, whether they are marked by checkboxes, X’s, or just circled in pen. To do so, you could use UiPath Document OCR which can recognize even checkboxes.
没有标签的复选框
在有些情况下,没有任何标签与复选框相关联。例如,当复选框是表格的一部分时。
以下是一个典型示例:
在这种情况下,有必要为方框加上标签。提取程序将返回复选框的字符串值,该值是以下两个字符之一:
- ☒
- ☐
These two characters can be copied and pasted like any other and can be used in workflows to verify if a checkbox was returned as checked or unchecked. Moreover, the IntelligentOCR framework knows how to recognize these, especially if a field is defined as Boolean:
- 如果提取程序返回 ☒,则表示“是”;
- 如果提取程序返回 ☐,则表示“否”;
In cases where an unchecked box is returned as O or D, or when a checked box is returned as X,V,K or R, these can also be included in the RPA workflow logic to make the workflow more robust when these kinds of OCR errors occur.
签名检测
签名是任何 OCR 引擎都无法检测到的视觉特征,因此 ML 模型无法直接检测它们。
但是,UiPath ML 模型通过查看图像上的文字和像素来进行学习。可以通过使用这种方法来执行签名检测。
我们以下面的表单为例。
At the end of the page, next to the signature, there is the text Signature of U.S. person. It does not matter what the text is, as long as it is close enough to the signature (whenever the signature exists). Dealing with a signature is similar to dealing with a checkbox - see the Checkboxes section above.
您可以创建一个名为“签名”的文本字段,当文档具有签名时,您可以将“美国人的签名”标记为签名字段。当文档没有签名时,请将该字段留空。
然后,您必须确保训练集中大约一半的文档带有签名,而另一半的文档没有签名。两者的比例也可以是 60/40%,但不能是 80/20% 或 90/10%。此外,每个模型至少要有 20 到 30 个样本,以便学习这一点。
这样,您可以使用 ML 模型执行签名检测。