- why are you reshaping the image?
- what features are you extracting from the image?
- what are you expecting knn to learn? I am not asking about the labels; are you expecting knn to learn the cluster patterns of black and white pixels and use that to classify the images? If you used features that might've been easier for knn to learn.
- In your code, you're trying to predict "new". How does the model perform on testing data? you mentioned you have 10000 testing images, right?
Hand-written Digit Recognition
12 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Hello, I am trying to implement a simple handwritten digit recognizer using knn. For this purpose, I am using the famous MNIST dataset to train the model and a handwrittern digit image using paint program.
To explain briefly, MNIST is a dataset that contains 60000 training samples of different handwritten digits and 10000 testing samples. All these digits are centered in 28x28 pixel images with black background and white font color, then they are reshaped to form a 1x784 row and that is what each row of the dataset contains.There is also a label column for these digits.
What I did so far is reading an image in matlab, transforming it to mnist format then training the model using the training samples and testing it using the image I transformed but I got the same prediction whatever the digit is, then I found something about elastic deformations and I tried it but still false predictions with slight change in the predictions.
The MNIST dataset I am using can be found under this link: https://github.com/daniel-e/mnist_octave/raw/master/mnist.mat
I attached the matlab file I wrote and a sample of the image and how it looks after transformation to mnist format and I am looking forward to your help.
Thank you in advance
2 comentarios
Ridwan Alam
el 20 de Dic. de 2019
Editada: Ridwan Alam
el 20 de Dic. de 2019
if you don't mind, can you please explain
Respuestas (0)
Ver también
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!