简体   繁体   English

字符识别模型可能过拟合?

[英]Character recognition model possibly overfitting?

I'm trying to train a model to recognize gestures drawn using a wand which is picked up by an IR camera and fed into a model.我正在尝试训练一个模型来识别使用由红外摄像机拾取并输入模型的魔杖绘制的手势。 I trained the model using an AZ handwritten character dataset, as well as two additional custom symbols that I have trained.我使用 AZ 手写字符数据集以及我训练过的另外两个自定义符号来训练模型。 Currently it detects all the symbols correctly when drawing them directly, but if any random symbols/drawings are put into the model it will also identify them as being one of the two custom symbols I've added.目前,它在直接绘制它们时会正确检测所有符号,但是如果将任何随机符号/绘图放入模型中,它也会将它们标识为我添加的两个自定义符号之一。 This is my confusion matrix:这是我的混淆矩阵: 在此处输入图片说明

Any ideas?有任何想法吗? Thanks!谢谢!

Well, since your model has to classify any given input into any one class, your model seems to be trying to classify the random inputs to your custom classes.好吧,由于您的模型必须将任何给定的输入分类为任何一个类,因此您的模型似乎试图将随机输入分类到您的自定义类中。 It would be useful if you could provide more information about your custom classes.如果您可以提供有关自定义类的更多信息,那将会很有用。

I guess you could try introducing a component of confidence in your class predictions, ie assuming you're using softmax, for any input, you can only truly accept a classification if the probability given for a class is above a certain threshold, else classify as random.我想您可以尝试在您的类预测中引入一个置信度组件,即假设您使用的是 softmax,对于任何输入,如果为类给出的概率高于某个阈值,您只能真正接受分类,否则分类为随机的。

Additionally, you could try adding another custom class and train your model with all the random symbols but I don't think it is ideal.此外,您可以尝试添加另一个自定义类并使用所有随机符号训练您的模型,但我认为这并不理想。

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

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