Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Canvas image breaks down #1

Open
piyush01123 opened this issue Feb 1, 2019 · 0 comments
Open

Canvas image breaks down #1

piyush01123 opened this issue Feb 1, 2019 · 0 comments
Labels
help wanted Extra attention is needed

Comments

@piyush01123
Copy link
Owner

To get a 1x784 tensor to be fed into the model, a for loop is used to convert the canvas image of shape 280x280 to scale down every pixel.
https://github.com/piyush-kgp/Digit-Recognition-with-TFJS/blob/4482b2ab004794256819a43e56a81094fdb256b4/drawScript.js#L77

We can reconstruct a 28x28 image from this 1x784 tensor to view how the image that goes inside the model which looks like https://github.com/piyush-kgp/Digit-Recognition-with-TFJS/blob/master/check.png. On zooming in, it can be seen that the segments of image are broken.

How can this be corrected, considering that our final tensor has to be 1x784 or 1x28x28 because all our training images are 28x28 size in MNIST.

@piyush01123 piyush01123 added the help wanted Extra attention is needed label Feb 1, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

1 participant