0
$\begingroup$

I want to extract text data from the image, however not sure what approach I should take.

Steps successfully performed

  1. Dataset collection
  2. Image Preprocessing done
  3. Image Augmentation done
  4. Final Image data set prepared
  5. Train, Test Split done
  6. Annotation done (table and paragraph)
  7. Convolution Model (faster rcnn resnet50)
  8. Model performing well in identifying table and paragraph
  9. Cropped detection boxex image sections

Confused with further step, I want to do text segmentation and pass it to tesseract. Not able to find good example from tensorflow or Open CV

I tried solution 1 from Kaggle https://www.kaggle.com/code/irinaabdullaeva/text-segmentation not getting desired result

I tried solution 2 from kaggle https://www.kaggle.com/code/dmitryyemelyanov/receipt-ocr-part-1-image-segmentation-by-opencv not getting desired result

I am attaching my output, wanted to know if my approach to work on text segmentation after 9 steps above is correct ?? or I need to take some other approach.

I want to pass segmented text to tesseract for text extraction.

Output -

cropped image 1

cropped image 2

cropped image 3

cropped image 4

cropped image 5

Please help

$\endgroup$
2
  • $\begingroup$ have you tried a simpler approach: what happens when you just sum the column-wise color value to isolate which rows contain the text in the matrix form of the image? $\endgroup$
    – Dan
    Nov 18, 2022 at 18:29
  • $\begingroup$ yes it is failing badly when image has lines (vertical/horizontal) $\endgroup$
    – ZKS
    Nov 18, 2022 at 18:51

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.