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

Image process should be sub 127.5 then div 127.5 #1

Open
xiaoxiong1006 opened this issue Oct 3, 2022 · 1 comment
Open

Image process should be sub 127.5 then div 127.5 #1

xiaoxiong1006 opened this issue Oct 3, 2022 · 1 comment

Comments

@xiaoxiong1006
Copy link

Sorry for my English. Refer in https://tfhub.dev/tensorflow/lite-model/deeplabv3/1/metadata/2,the origin image process should be sub 127.5 then div 127.5.The code in line 2 of setcion 6 should like this:

np_res_im = ((np_res_im-127.5)/127.5)).astype('float32')

displace

np_res_im = (np_res_im/255).astype('float32')

After do it,the accuracy will improve.

@joonb14
Copy link
Owner

joonb14 commented Oct 4, 2022

@xiaoxiong1006 You are the best!
Since I don't have jupyter environment anymore, I will replace it latter!
Thank you!

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

2 participants