matthewearl / deep-anpr

Using neural networks to build an automatic number plate recognition system
MIT License
1.84k stars 699 forks source link

got overfitting when training? #39

Closed Qg2TzVSm closed 7 years ago

Qg2TzVSm commented 7 years ago

Dear all.

I modify the code to recognise Chinese car plate, and successful train the model. But I can't detect any real car plate, but it worked on test plates which generated by gen.py. Maybe I generate too many test images in the .test/ folder? How many test images should I generate?

Is the model got overfitting? Can I add some real car plate in the test set images to solve this problem, or add a drop out in full connected layer?

Thanks. (excuse for my English.)

sourabh2k15 commented 7 years ago

Hello, I had trained this for Indian number plates and it worked fine. How are you generating the test data , can you provide me an example so I can help out.

Thanks.

Qg2TzVSm commented 7 years ago

Hello, Sorry for so long to reply. I got the weights.npz after a 10 hours training. It could not recognise any real car plate pictures but work well with the training set pictures(test images). Here is the test images I generated: 2 Here is a real car plate image: 9 Maybe I should do some change to the test images? Thanks for your help! (excuse for my Englisch again

jesiws commented 7 years ago

I'm also trying to modified the code to recognize Chinese car plates, and I find that just because the chars in the generated images are black but in real plate are white that causes the problem. Then I reverse the color of the real test images and find the model works out fine. Hope it may helps you.

By the way, what kind of font are you using to generated images? I think the images you provided above don't look quite like real plates. This may also cause the problem of failure in detection.

Qg2TzVSm commented 7 years ago

@jesiws Thanks! I 'll try your advice. I used different fonts to generate images. Does this improve the ability of the model to identify similar characters? Did you change the size of the test images?