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

how to train OCR model?

Open linzhi123 opened this issue 6 years ago • 22 comments

Hello, do you have open source training OCR model code?

linzhi123 avatar Nov 07 '18 11:11 linzhi123

Hi @linzhi123 , sorry but we do not plan to publish this part anytime soon.

sergiomsilva avatar Nov 08 '18 16:11 sergiomsilva

@sergiomsilva Aren't you just using Darknet for OCR? If so, OCR can be trained separately using yolo, am i correct?

danishansari avatar Nov 12 '18 06:11 danishansari

Yeah, I just want to train OCR alone. There's no training code. Yolo's training code is official, and his training code is modified. @danishansari

linzhi123 avatar Nov 12 '18 06:11 linzhi123

Do you have training code? Or do you know how to train? @danishansari

linzhi123 avatar Nov 12 '18 06:11 linzhi123

Yes i am training it using YOLO-v2 with the same network and weights that is there in this repository. I am not able to get the loss reduced much, otherwise it showing good IOU(0.7) and Recall(0.96). Still working on it, haven't verified the result till now.

danishansari avatar Nov 12 '18 07:11 danishansari

Can you share your code? @danishansari

linzhi123 avatar Nov 12 '18 07:11 linzhi123

I used YOLO-v2 itself, did not modified any of the code. I am just training for 36 classes instead of 35. So only config file has to be modified. So you can directly use Darknet for training and inference.

danishansari avatar Nov 12 '18 07:11 danishansari

That's fine. Thank you!

linzhi123 avatar Nov 12 '18 07:11 linzhi123

@linzhi123 please do share your experience and results(accuracy/map) after training.

danishansari avatar Nov 12 '18 07:11 danishansari

ok @danishansari

linzhi123 avatar Nov 12 '18 07:11 linzhi123

I see you are interested in the training script, and I am sorry for not being able to share it with you guys at this moment because I'm really out of time. However I can give you some hints. The only modification we did in the original YOLO training algorithm was considering its data augmentation process. Basically, it reduces too much the image size, which is undesirable in this case, so we controlled it by performing small changes in the source code. We also included synthetically created data, as mentioned in the paper, but you may also achieve nice results without them.

sergiomsilva avatar Nov 12 '18 09:11 sergiomsilva

Thanks very much @sergiomsilva

linzhi123 avatar Nov 12 '18 10:11 linzhi123

@sergiomsilva then those modification about augmentation and controlling size reduction must be there in the darknet code in your repository?

danishansari avatar Nov 12 '18 12:11 danishansari

No, the modification is not in our repo.

sergiomsilva avatar Nov 12 '18 17:11 sergiomsilva

32/5000
I want to ask how to use OCR training license plate data alone, I tried, but not so good @linzhi123

Tomhouxin avatar Nov 13 '18 03:11 Tomhouxin

Sorry,I'm also trying. @Tomhouxin

linzhi123 avatar Nov 13 '18 03:11 linzhi123

ok,I use tesseract4.0,and you?

Tomhouxin avatar Nov 13 '18 03:11 Tomhouxin

why not release the ocr training ????? em..............

xinyuegtxy avatar Mar 14 '19 09:03 xinyuegtxy

@linzhi123 hello, how do you train the ocr? And how do you prepare the dataset ?

xinyuegtxy avatar Mar 19 '19 03:03 xinyuegtxy

I want to know how to train ocr too. and could we change the code for two layer plate recognition?

wanglaotou avatar Jul 31 '19 07:07 wanglaotou

ok,I use tesseract4.0,and you?

could you share the details of how you used tesseract4.0? When I tried I get the error saying DPI information not present in the image.

PhilipsKoshy avatar Aug 05 '19 00:08 PhilipsKoshy

I want to know how to train ocr too. and could we change the code for two layer plate recognition?

yes. I wish to train it for plate with 2 rows

suvarnak avatar Jan 06 '20 03:01 suvarnak