Closed Joe-Mobarak closed 4 years ago
That is happening when segmenting use segment method
There was a problem with the dataset. So we updated the link and fixed some conflict in preprocessing.py file Reclone and try again using the images in the new dataset.
Hey man but the data set images are still the same 2 months ago
The images still have the same names but they have only letters now. Since the system supports only letters for now (29 letters) ا-ى, لا. The older version of the dataset contained characters other than Arabic letters.
Ok man i will give it a shot and let you know Thank you
Hey man i am afraid the issue remains :
TypeError: Cannot cast array data from dtype('uint32') to dtype('int32') according to the rule 'safe'
Can you specify what image that produces the error ?
Traceback (most recent call last): File "C:\Users\mobar\AppData\Local\Programs\Python\Python38-32\lib\multiprocessing\pool.py", line 125, in worker result = (True, func(*args, *kwds)) File "C:\Users\mobar\AppData\Local\Programs\Python\Python38-32\lib\multiprocessing\pool.py", line 48, in mapstar return list(map(args)) File "C:\Users\mobar\Downloads\Omega\Omega\src\OCR.py", line 24, in run2 char_imgs = segment(line, word) File "C:\Users\mobar\Downloads\Omega\Omega\src\character_segmentation.py", line 746, in segment valid = filter_regions(binary_word, no_dots_copy, SRL, VP, upper_base, lower_base, MTI, MFV, top_line) File "C:\Users\mobar\Downloads\Omega\Omega\src\character_segmentation.py", line 584, in filter_regions (check_stroke(no_dots_copy, no_dots_copy[:, SEG[0]:SEG[1]], upper_base, lower_base, SEG_SR1, SEG_SR2) \ File "C:\Users\mobar\Downloads\Omega\Omega\src\character_segmentation.py", line 361, in check_stroke MFV_HP = np.argmax(np.bincount(HP)[1:])+1 File "<__array_function__ internals>", line 5, in bincount TypeError: Cannot cast array data from dtype('uint32') to dtype('int32') according to the rule 'safe' """
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "C:/Users/mobar/Downloads/Omega/Omega/src/OCR.py", line 115, in
I am using capr2.png from your drive
That's weird. We had no problem with casting on our machines but i have updated utilities.py file to explicitly cast to int32. so please try again and let me know.
It worked man Thank you
Hey when i m loading one of your test images i m getting this error any idea how to solve this ?