Mnist data should also work for handwritten number on page plz find error in the code

hello sir,

sir plz if u can help , sir tried to create a model for mnist digit classification it is working correctly for that purpose but when i try to check a number written on a page with it does not give correct output sir plz if u can help


but above fails it only give answer five i even used transfered photo by clicking it through phone still it does not work

sir the above code is working fine for mnist data set but if i use an image taken from mobile and convert it gray scale and even convert it into 28*28 it does not give correct answer

Do you get an error from you code or it does not predict the label correctly?

it does not predict label correctly for images taken from phone (using cv2) but works fine for mnist test data set

The problem is that the images you are predicting on are not of the same distribution as the model trained on, you can train the model first further on, on these kind of images and then tests its accuracy!

1 Like

sir but mnist data set for handwritten digit and on top of that i am converting the image into 28*28 size and gray scale also so why its not working

sir did u find a solution?

I already told you what you are supposed to do about your issue!