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
488 stars 189 forks source link

How do i validate a model on new data? can you provide stepwise solution to transform image and predict it on new data? #19

Open shaheerakr opened 4 years ago

jonomon commented 4 years ago

You could look at this notebook to get an idea of the entire pipeline.

If you want to validate the model on new data, simply edit the "Dataset creation" section in the notebook with your new data.

shaheerakr commented 4 years ago

@jonomon yeah thats cool but how do i provide my own data in this section? because it downloads data from: http://www.fki.inf.unibe.ch and pre process it, i want to provide my own images to be pre processed. Screenshot from 2019-12-29 17-56-39

Asus1996 commented 4 years ago

Hi can u provide step to teach us how to use our own data~ how to edit the "Dataset creation' section ?

shaheerakr commented 4 years ago

Here is the link to my repository: https://github.com/shaheerakr/cheating-detector you need to get the ocr folder (it is modified a bit for this purpose) from this and checkout the ocr.ipynb for step wise procedure of converting images to texts. or you can checkout image_to_text.ipynb if you want to create a REST API using flask to convert from image to text. Leaving this issue open until a proper solution is here, Thanks

ouardafenek commented 3 years ago

Dear @jonomon, thank you so much for the work you have done. It helps a lot. Though I'm having a little problem to test the algorithm on images of my own. I'm using the 0_handwriting_ucr notebook and as @shaheerakr said above i strugle replacing the dataset creation part. I've tried tried replacing the 4 images that you sampled with images not from the IAM dataset but I'm having shapes error later. Thanks in advance.

jonomon commented 3 years ago

@ouardafenek you can use the resize_image function to resize your input image.

Pabper commented 3 years ago

@jonomon Do other images need to mantain the aspect ratio of the ones in the IAM Database?

jonomon commented 3 years ago

@Pabper That would ideal however, the model should have some tolerance as the writers have different writing styles.