awslabs / handwritten-text-recognition-for-apache-mxnet

This repository lets you train neural networks models for performing end-to-end full-page handwriting recognition using the Apache MXNet deep learning frameworks on the IAM Dataset.
Apache License 2.0
479 stars 189 forks source link

regions of text not being detected properly #41

Closed naveen-marthala closed 4 years ago

naveen-marthala commented 4 years ago

Here is my input image in color: new paragraph image 1. The detection that happended from pre-trained models can be seen below, when the above image is converted from 0. RGB to grayscale and 1. BGR to grayscale (happended at paragraph segmentation from '0_handwriting_ocr.ipynb' notebook & I have made no changes in the code from that notebook): image 2. Because of this improper region detection, areas that actually has text are being cropped out. And, when i try form size other than what is in the code(because my images have smaller aspect ratio), that is form_size = (1120, 800), computer crashes. What is causing this and how can i not have this happen? 3. Presumably, because of the above improper detection or may be becuase line/word segmentaion not happening properly, here's the word segmentation: image and here's the line segmentation: image How do i fix these?

jonomon commented 4 years ago

Hi Naveen, it seems like your dataset does not fit the IAM dataset very well. You may have to finetune the network to your dataset. This includes labelling a few images and similar to the IAM specifications.

naveen-marthala commented 4 years ago

Thanks. So, you are telling me that I should train the network again with my images and labels. Yes?

jonomon commented 4 years ago

You could use use the weights in the pretrained network provided then retrain it with your own images.

Please take a look at https://gluon.mxnet.io/chapter08_computer-vision/fine-tuning.html for more details.