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

Kindly could you explain why you need to revert image? #2

Open
jeongc opened this issue Mar 1, 2018 · 2 comments
Open

Kindly could you explain why you need to revert image? #2

jeongc opened this issue Mar 1, 2018 · 2 comments

Comments

@jeongc
Copy link

jeongc commented Mar 1, 2018

Hi
Somewhat I cannot understand why you need to revert.

#revert the image,and normalize it to 0-1 range
img = 1.0 - img/255.0

Regards

@adityag6994
Copy link

it gave me better results, although I don't know the correct reason!

@cah-icuro
Copy link

In short, it's because that's how the original images were formatted - with zero representing the background and nonzero values representing the more important digit pixels. Roughly speaking, this is to help guide the neural network towards the important parts of the image. For more details, see this explanation.

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

No branches or pull requests

3 participants