JaidedAI / EasyOCR

Ready-to-use OCR with 80+ supported languages and all popular writing scripts including Latin, Chinese, Arabic, Devanagari, Cyrillic and etc.
https://www.jaided.ai
Apache License 2.0
23.77k stars 3.12k forks source link

Retrain CRAFT-features with custom dataset #788

Open mkersche17 opened 2 years ago

mkersche17 commented 2 years ago

Thank you for adding the possibility to retrain the CRAFT features!

I want to retrain CRAFT using custom data. However, I'm not sure in which format I have to provide the custom labels for that. In the README.md file the ground-truth format is listed as:

 377,117,463,117,465,130,378,130,Genaxis Theatre
 493,115,519,115,519,131,493,131,[06]
 374,155,409,155,409,170,374,170,###

In the CRAFT paper (https://arxiv.org/pdf/1904.01941.pdf) it is listed that character boxes are needed (from which also Affinity Boxes can be calculated).

image

But how is the encoding? Is it a run length encoding? And is it possible to provide labels for each individual character in an image? Because in the provided example 377,117,463,117,465,130,378,130,Genaxis Theatre it seems to me, that this is the label for the complete word "Genaxis Theatre"

mkersche17 commented 2 years ago

I found some more information about the ICDAR dataset. So it seems that we can provides to be the bounding corner coordinates and label in following order: (maybe this information can be useful in the readme file)

image

Now, I can also provide bbounding boxes for each individual character. This should then boost the recogniation accuracy, right?