Deepayan137 / Adapting-OCR

Pytorch implementation of our paper: Adapting OCR with Limited Labels
MIT License
57 stars 27 forks source link

How to train for RTL languages? #33

Open NaumanHSA opened 5 months ago

NaumanHSA commented 5 months ago

I'm trying to use code from this repo to train OCR for Arabic language. Additionally, the dataset has hand written text which makes it even complicated, but this is just for learning purposes.

I trained a model without any modifications to the workflow and the model architecture except for the dataset class. The model is giving me 0 WA and CA. So, I wanted to ask what possible changes we need to make the model learn?

So far, I'm trying to reverse the targets as Arabic is an RTL language unlike English. And to pad the images to the left instead of right. I'd like to hear your thoughts on this. Thanks.

Deepayan137 commented 3 months ago

Hi Nauman, sorry for the late response, but right now I don't have any ready solution for it. Maybe you can look at repos that already do Arabic OCR. I have never worked with Arabic, so I am not sure of the technical nuances that would be required to modify my code.

NaumanHSA commented 2 months ago

Hi @Deepayan137, Thank you for your response. I've been working on my own solution for Arabic. Your repo was a help for me.