我正在使用 AForge 库框架及其神经网络。
当我训练我的网络时,我创建了大量大尺寸(30 pt)的图像(每个字母每个字体一个图像),剪下实际的字母,将其缩小到较小的尺寸(10x10 px),然后保存它到我的硬盘。然后我可以去读取所有这些图像,用数据创建我的 double[] 数组。目前我是在像素的基础上做这件事的。
因此,一旦我成功训练了我的网络,我就会测试网络并让它在具有不同大小(大写和小写)的字母表的示例图像上运行。
但结果并不乐观。我训练了网络,使 RunEpoch 的误差约为 1.5(因此几乎没有误差),但仍然有一些字母在我的测试图像中无法正确识别。
现在我的问题是:这是否是因为我的学习方法错误造成的(基于像素的与本文中建议使用的受体:http://www.codeproject.com/KB/cs/neural_network_ocr.aspx - 我可以使用其他方法来提取网络数据吗?)还是会发生这种情况因为我从图像中提取字母来查看的分割算法很糟糕?
有人对如何改进它有想法吗?
I'm using the AForge library framework and its neural network.
At the moment when I train my network I create lots of images (one image per letter per font) at a big size (30 pt), cut out the actual letter, scale this down to a smaller size (10x10 px) and then save it to my harddisk. I can then go and read all those images, creating my double[] arrays with data. At the moment I do this on a pixel basis.
So once I have successfully trained my network I test the network and let it run on a sample image with the alphabet at different sizes (uppercase and lowercase).
But the result is not really promising. I trained the network so that RunEpoch had an error of about 1.5 (so almost no error), but there are still some letters left that do not get identified correctly in my test image.
Now my question is: Is this caused because I have a faulty learning method (pixelbased vs. the suggested use of receptors in this article: http://www.codeproject.com/KB/cs/neural_network_ocr.aspx - are there other methods I can use to extract the data for the network?) or can this happen because my segmentation-algorithm to extract the letters from the image to look at is bad?
Does anyone have ideas on how to improve it?
发布评论
评论(1)
我会尝试使您的网络输入规模不变。换句话说,对您在测试图像中找到的对象进行预处理,以分割出各个候选字母对象,并将它们的大小调整为与训练集的大小相同。从你的描述来看你没有这样做。我对 AForge 不熟悉,所以也许你的问题中暗示了这一点。
我对神经网络的经验是,如果有已知的好方法,预处理输入数据通常会带来更好的结果。在这里看来是有的。
I would try making your network inputs scale invariant. In other words preprocessing the objects you find in the test image to segment out individual candidate letter objects and resize them to be the same size as your training set. From your description your not doing this. I'm not familiar with AForge so maybe this is implied in your question.
My experience with neural networks was that preprocessing the input data usually leads to much better results if there's a known good way to do this. Here it would seem that there is.