NMAC427 / SwiftOCR

Fast and simple OCR library written in Swift
Apache License 2.0
4.61k stars 481 forks source link

FFNN inputs and hidden counds #92

Closed MonkeyDMat closed 7 years ago

MonkeyDMat commented 7 years ago

Hi,

First of all, thanks for you very nice library.

Could you explain how did you choose 321 and 100 for the input count and hidden count ? From what I understand, inputs refers to the number of pixels of each blobs pictures ? And I have no idea why you choose 100 for hidden nodes count, is there any reason, or is it arbitrary ?

Thanks, Mathieu Lecoupeur

NMAC427 commented 7 years ago

Hi,

You are correct. 321 is the image size (16 * 20) plus one input for the aspect ratio of the non resized image. I chose 100 hidden nodes because I didn't get a notable improvement in accuracy by increasing it. So yeah 100 is kind of arbitrary.

MonkeyDMat commented 7 years ago

Ok, Thanks a lot for your quick answer. By the way, I added some log to your code, and I figured, there is a lot of training code aborted because the number of blobs found is different to 6, so I guess some improvements in the extractBlobs could give much better results.

Best