Closed MuhammadSaim7776 closed 1 year ago
Can you please provide a more detailed description of the error. In which line of the code did it appear?
Traceback (most recent call last):
File "/home/cle-dl-10/Desktop/SAIM/latest ocr/HTR-best-practices-main/train_htr.py", line 312, in
From the function that raises the error (np.pad), you can safely assume that is a dimension missmatch. Most probably you used a colored image as a 3D tensor input, while I used grayscale images as 2D tensors.
I used opencv to read image and than convert image to grayscale. it worked for me. Thanks
Even if that's the case, the image can be still represented as a 3D tensor (3 axes instead of 2). Check the dimensions of the loaded image and reshape it accordingly.
Can we use this code for Urdu language recognition? If we can use it. Kindly tell me the changes that i have to make
On Mon, Mar 6, 2023, 4:48 PM George Retsinas @.***> wrote:
Even if that's the case, the image can be still represented as a 3D tensor (3 axes instead of 2). Check the dimensions of the loaded image and reshape it accordingly.
— Reply to this email directly, view it on GitHub https://github.com/georgeretsi/HTR-best-practices/issues/1#issuecomment-1455989419, or unsubscribe https://github.com/notifications/unsubscribe-auth/APMRJCNSOTM6JT62JMYGSFLW2XFKHANCNFSM6AAAAAAVQW2IJ4 . You are receiving this because you authored the thread.Message ID: @.***>
In theory, you can use it for Urdu. I am not familiar with the peculiarities of such scripts. For example if is a right-to-left language, you should reverse both final prediction sequence and target character sequence. I cannot help you with low-level language-specific adjustments.
i am using this code for my own dataset. While training i am getting this error
ValueError: operands could not be broadcast together with remapped shapes [original->remapped]: (2,2) and requested shape (3,2)
can you help me sort out this error?