简体   繁体   English

CoreML image model 只识别给定的数据集,如何包含外部数据?

[英]CoreML image model only recognizing the given data sets, how to include outside data?

I have a trained CoreML image model that is supposed to recognize the front and back of checks.我有一个训练有素的 CoreML 图像 model 应该可以识别支票的正面和背面。 I am facing a problem where the model will see an image of a giraffe, and the model is only trying to decide if the image is the front of a check or the back of a check (with the confidence levels totaling 100%).我面临一个问题,model 将看到长颈鹿的图像,而 model 只是试图确定图像是支票的正面还是支票的背面(置信度总计 100%)。 Ideally, the model would not say 'what is the likelyhood this is the back of a check vs the front of a check' but instead 'is this the back of a check'.理想情况下,model 不会说“这是支票背面与支票正面的可能性有多大”,而是“这是支票背面”。

If you model is only trained on images of checks, you can only give it images of checks.如果你 model 只接受过支票图像的训练,你只能给它支票图像。 If you give it some other image, it will assume it's a check because that's the only thing it knows about.如果你给它一些其他图像,它会认为这是一张支票,因为这是它唯一知道的事情。

To make a model that can also detect "no check" you need to add a new category and also train the model with images of all kinds of objects that are not checks.要制作还可以检测“无检查”的 model,您需要添加一个新类别,并使用各种未检查对象的图像训练 model。

Alternatively, you can use some kind of OOD (out of domain) detection, to verify that the input image is similar to the sorts of things the model has been trained on.或者,您可以使用某种 OOD(域外)检测来验证输入图像是否与 model 已经训练过的事物相似。 But that's not something you can easily do with Core ML.但这不是您可以使用 Core ML 轻松完成的事情。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM