Question about preprocess
Closed this issue · 1 comments
iwatake2222 commented
Thank you for sharing the great project and the models.
I have a question about the preprocess.
It looks two preprocessing are executed:
- normalize the input data from [0, 255] to [-1.0, 1.0]
- L89 - L91
- then,
keras.applications.imagenet_utils.preprocess_input
is called- L94
As a result, the input tensor data becomes like the following:
array([[[[-104.92331373, -117.62998039, -124.35843137],
[-104.939 , -117.67703922, -124.4054902 ],
[-104.89194118, -117.59076471, -124.28 ],
...,
[-104.93115686, -117.74762745, -124.60941176],
[-104.93115686, -117.76331373, -124.6172549 ],
[-104.939 , -117.75547059, -124.6172549 ]],
[[-104.92331373, -117.63782353, -124.35843137],
[-104.92331373, -117.64566667, -124.37411765],
[-104.90762745, -117.59860784, -124.28784314],
...,
[-104.939 , -117.75547059, -124.6172549 ],
Is this what you intended?
I just use the same preprocess as above and it works somehow.
By the way, I made a project to run the model on Android with TesorFlow Lite.
- https://github.com/iwatake2222/play_with_tflite/tree/master/pj_tflite_camera_deep_calib
- https://www.youtube.com/watch?v=RJdSW22dzwM
Thanks!
alexvbogdan commented
Yes, that is how we intended it, those preprocesses are not in a conflict with each other to our best knowledge.
Thank you for your interest in our work!