Skip to content
This repository has been archived by the owner on Jan 7, 2022. It is now read-only.

training accuracy #56

Open
hanish3464 opened this issue Oct 17, 2019 · 4 comments
Open

training accuracy #56

hanish3464 opened this issue Oct 17, 2019 · 4 comments

Comments

@hanish3464
Copy link

hi author
I have changed datasets, including blur, rotate, scale.
black fond and white background images create (contrary to this project )

but training accuracy does not improve..
Can you tell me what problem is

@pvaneck
Copy link
Contributor

pvaneck commented Oct 17, 2019

How large is your dataset and how long are you training for? Depending on the size of the dataset, it can take a long time for the model to start converging and accuracy to improve, so ensure you training for a sufficient number of epochs. Or if the number of images for each character is too small, training performance may also be negatively impacted.

@hanish3464
Copy link
Author

thank you for reply!
The number of my datasets is 130K(orig, blur, distortion, and scale). training time is about 1 - 2 hours with Titan-X.
now, special characters(!, ?, [, ]) and alphabet is also contained as labels.
the number of images for each character is about 600..
epoch is 30, batch is 128
image

however, if I select font color with black and background with white, training accuracy does not still improve.
any idea to solve this problem?
Is there a good model for Exquisitely predicting Korean character better ?

@pvaneck
Copy link
Contributor

pvaneck commented Oct 21, 2019

Is the image you posted showing the training run for the white background images?

Based on that image, it looks like you've reached a decent accuracy, but it seems like you've reached a training saturation point where additional training does not help as shown by the constant fluctuations. The training can probably be stopped around where the training accuracy is consistently mid-90%. You can definitely reduce the number of epochs for training in that case.

What I don't have here in this project is mechanism for early stopping by checking the accuracy on a validation set of images every 1000 steps or so and stopping the training when validation accuracy begins to decline.

In any case, I'm sure there are better models out there as this is a fairly simple model which was extended from the MNIST TensorFlow model. Its focus is on showcasing the end the end process of data generation to app deployment and not so much creating a state of the art Hangul recognition model.

I think the accuracy you've gotten is reasonable, but if it is not sufficient, then for this project's model, you can always tweak the architecture of the model to add more nodes/layers. This will increase the learning capacity of the model. There are other hyperparameter tunings you could do such as changing the batch size, dropout rate, etc, but finding the optimal settings is likely to be time consuming and tough.

@hanish34
Copy link

@pvaneck
Hi. author!
First of all, thanks for the details.
I have tested better models (resnet) with pytorch as your advice. but result is not better than yours. I used your code about creating datasets, and converted train, test, and, model to pytorch version.

my train code is here
this is simliar to MNIST pytorch model.

Can you advise me to get higher performance? I will try.

Thanks in advance

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants