sayakpaul / Handwriting-Recognizer-in-Keras

This project shows how to build a simple handwriting recognizer in Keras with the IAM dataset.
Apache License 2.0
13 stars 2 forks source link

Added Aakash's pipeline and implemented minor changes #2

Closed sayakpaul closed 3 years ago

sayakpaul commented 3 years ago

Reference: https://github.com/sayakpaul/Handwriting-Recognizer-in-Keras/issues/1

review-notebook-app[bot] commented 3 years ago

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

AakashKumarNain commented 3 years ago

@sayakpaul I guess the model won't take much time to train. Let us train it for at least 50-60 epochs

AakashKumarNain commented 3 years ago

This what I got after 34 epochs. Pretty good results IMO

sayakpaul commented 3 years ago

@sayakpaul I guess the model won't take much time to train. Let us train it for at least 50-60 epochs

Each epoch takes about 48 seconds to run. So, 50 epochs would take (48 * 50) / 60 = 40 minutes. For generating the additional files, this might be an overkill.

AakashKumarNain commented 3 years ago

@sayakpaul I guess the model won't take much time to train. Let us train it for at least 50-60 epochs

Each epoch takes about 48 seconds to run. So, 50 epochs would take (48 * 50) / 60 = 40 minutes. For generating the additional files, this might be an overkill.

Cool. Let's go with 30 only then

sayakpaul commented 3 years ago

Sounds good. Here's what I am thinking about the next steps:

Sounds good?

AakashKumarNain commented 3 years ago

Sounds good to me. Also, I think you left one more change that is required. For cleaning the labels, just define a function clean_labels(..) and call it for training labels, validation labels, and test labels. This would also help reduce the LOC

AakashKumarNain commented 3 years ago

Side note: I am not sure if all the ops here are supported by TFLite but we can give it a try to convert it into a model than runs on phone. It would be awesome if we can do that. We can even showcase it in the code example if we are able to accomplish it

sayakpaul commented 3 years ago

Sounds good to me. Also, I think you left one more change that is required. For cleaning the labels, just define a function clean_labels(..) and call it for training labels, validation labels, and test labels. This would also help reduce the LOC

Done. However, I kept the training label cleaner as it is because it is printing and storing important information which is being used later on. I did not want to have multiple variables returning from the utility and wanted to keep it clean.

Side note: I am not sure if all the ops here are supported by TFLite but we can give it a try to convert it into a model than runs on phone. It would be awesome if we can do that. We can even showcase it in the code example if we are able to accomplish it

Yes. It's possible to convert to TFLite. Refer to the following notebooks:

AakashKumarNain commented 3 years ago

This LGTM! If you want to make more changes, do let me know else we can merge this