Closed naveen-marthala closed 4 years ago
I believe that by default, the IAMDataset class uses grayscale images. Therefore we assumed that the image
is an array of w * h. Therefore image[0][0]
is a scalar.
If you are using coloured images, image[0][0]
will be a vector of size 3 corresponding to R, G, and B.
To use the provided code, please try to convert your images into grayscale.
will sure do that, thanks.
During Paragraph Segmentation in "0_handwriting_ocr.ipynb", when
paragraph_segmentation_transform(image, form_size)
is called to paragraph-segment the image, which in turn callsresize_image()
function fromocr.utils.iam_dataset.py
to resize image(images i have passed are not from IAM dataset. I have passed my own images toimages
array for text recongition). Error occurs at line 72 of that file:the problem occurs becuase
image[0][0]
is an array, not a single value. How do i fix this and proceed further. Here is the screenshot of error: