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

input_norm_and_resized_node vs input_node #47

Closed
JadBatmobile opened this issue Feb 5, 2019 · 6 comments
Closed

input_norm_and_resized_node vs input_node #47

JadBatmobile opened this issue Feb 5, 2019 · 6 comments

Comments

@JadBatmobile
Copy link

Hello,

I am curious what the difference between the input_node and the input_norm_and_resized_node are?

I see in deploy_cpp that netTF.cpp utilizes input_node, and netTRT.cpp utilizes input_norm_and_resized_node.

@JadBatmobile
Copy link
Author

i see that one is raw image, and the other is resized and normalized, but why is it necessary that TRT accepts the processed version, and TF the raw version?

@tano297
Copy link
Member

tano297 commented Feb 5, 2019

Unfortunately some of the operators between the input and the norm_resized version are not supported by tensorRT. At least at the time that I built the inference pipeline. If you want to try to change that and it works with newer tensorRT versions, I'm more than happy accepting a pull request :)

@JadBatmobile
Copy link
Author

I understand, which tensorRT version are you using? it is not specified in the README

@JadBatmobile
Copy link
Author

Also, in bonnet.py, lines 52 - 62, i see img_pl being resized with tf.image.resize_images, then transposed with tf.transpose, then normalized with a regular python subtraction and division ( - 128 / 128 ). Do you recall which of those operations specifically was not running in TensorRT?

@tano297
Copy link
Member

tano297 commented Feb 5, 2019

It was definitely the resizing. And in older versions of tensorRT also division was a problem given some nomenclature and API problems. The division seems to be supported in tensorRT5, but resizing I don't think. In my computer I'm currently running tensorRT3 and in my jetson AGX tensorRT5, and it's working for both in the current state

@JadBatmobile
Copy link
Author

Okay, thank you for the speedy responses

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