alpr-unconstrained icon indicating copy to clipboard operation
alpr-unconstrained copied to clipboard

problems about ocr dataset

Open xiaogangjia opened this issue 6 years ago • 15 comments

Hello, I'm now trying to train the ocr model using my dataset, but the trained model just doesn't work. I want to know if my annotations are right. Every LP image has several bounding boxes. There's an example:

  • class_id x y w h 33 0.0970149253731 0.443069306931 0.0985074626866 0.509900990099 16 0.222388059701 0.457920792079 0.10447761194 0.490099009901 9 0.361194029851 0.457920792079 0.113432835821 0.490099009901 32 0.597014925373 0.487623762376 0.107462686567 0.519801980198 2 0.741791044776 0.502475247525 0.110447761194 0.509900990099 16 0.877611940299 0.512376237624 0.101492537313 0.509900990099 I just use darknet to train your ocr network, so could you give me some hints? Plus, can you tell me how many training LP images you used for ocr network?

xiaogangjia avatar Dec 07 '18 02:12 xiaogangjia

You need to put the txt file and the picture in the same directory for training. @heuDavidJia

linzhi123 avatar Dec 07 '18 08:12 linzhi123

Take a look at #19 , even with correct labels you will not be able to train the network with Darknet as is. You need to modify the data augmentation part to be less aggressive.

sergiomsilva avatar Dec 07 '18 12:12 sergiomsilva

@sergiomsilva Thanks for replying. I will try to modify the data augmentation part.

xiaogangjia avatar Dec 08 '18 01:12 xiaogangjia

@linzhi123 I guess the directory of dataset is right, but there are some problems with my data. Have you trained the model successfully?

xiaogangjia avatar Dec 08 '18 01:12 xiaogangjia

What do you think is wrong with the data? It's okay for me to use the author's network to train the model, and I only used 1,000 pictures to train, and the effect is good.

linzhi123 avatar Dec 08 '18 04:12 linzhi123

@linzhi123 I guess i have find the problem, the annotation tool i used has a big bug. Do you train the network with Darknet directly or with modified data augmentation part?

xiaogangjia avatar Dec 08 '18 07:12 xiaogangjia

Direct use, no modification

linzhi123 avatar Dec 10 '18 02:12 linzhi123

@linzhi123 Have you changed the anchors for your own data? And should i resize my data to 240*80 before training?Cause i always think the darknet has completed the resize work.

xiaogangjia avatar Dec 10 '18 11:12 xiaogangjia

@linzhi123 are you using actual images or synthetically generated? I started training it on synthetic data, the accuracy on val and test data is about 99% but on real data it's not not giving good accuracy, and it's not even robust on one frame it's giving different output and on another it's different of the same plate. while after 10k iterations IOU is about 0.9, class score id 0.99, objectness is 0.9 and recall 1.0. Any hint and suggestion will be appreciated.

danishansari avatar Dec 11 '18 11:12 danishansari

I did not change the data to a fixed size @heuDavidJia

linzhi123 avatar Dec 14 '18 02:12 linzhi123

Of the 1,000 images I used, 100 were real and 900 were composite. @danishansari

linzhi123 avatar Dec 14 '18 02:12 linzhi123

I want to run this code on video please guide me on how to implement it...

MustakMU avatar Feb 17 '19 19:02 MustakMU

@linzhi123, could you provide your train data (1,000 pictures to train),thanks.

rochesterlmg avatar Mar 08 '19 01:03 rochesterlmg

Of the 1,000 images I used, 100 were real and 900 were composite. @danishansari

Hi,What method do you use to mark Chinese license plates?I have some problems ,Thank you

G-YY avatar Mar 09 '19 05:03 G-YY

我没有将数据更改为固定大小@heuDavidJia

Which project are you based on to implement OCR, can you give a link

linnnff avatar Jul 27 '20 09:07 linnnff