Using specific fixed model input size #475
Replies: 4 comments
-
Thanks for your report. OpenPifPaf doesn't have a tensorrt backend option. The |
Beta Was this translation helpful? Give feedback.
-
Thank you for quick response, So to be more precise, I am trying to reuse your code (preprocessing, postprocessing) and use tensorrt inference instead of torch inference, also testing with onnxruntime. As mentioned for square input sizes this process is working and I can reproduce original results when doing evaluation. But what i cannot do with original preprocessing code is to resize to target I can solve this by using my custom function to preprocess the input image to target But i am trying to evade modifying original code as much as possible and stay within the framework (your original code) for the purpose of replicating results. Essentially can your transforms somehow be used to preprocess image to target I am aware that you can use With square inputs i was able to prove Additional note i am using Regards, |
Beta Was this translation helpful? Give feedback.
-
To add some more info I am using This function is useful to me because using your preprocessing code I cannot resize to target Here is the code:
Would this kind of preprocessing code be compatible with original code meaning there won't be a huge delta when running evaluation?. I will of course run tests to check but generally does it make sense to preprocess images in this way when using openpifpaf? |
Beta Was this translation helpful? Give feedback.
-
Here are the test results: Using default implementation (branch:
Using
Remapping code:
Where |
Beta Was this translation helpful? Give feedback.
-
Hello,
I am currently trying to test resnet50 model using different input sizes:
Code responsible for resizing of original image:
So for square inputs adding
preprocess.append(transforms.CenterPad(args.long_edge))
instead of commented block allowed me to test with square input sizes.The question is how can I resize other dimension to fit to my desired value because having variable input sizes is not possible using tensorrt inference engine for instance. Every image has to be resized to some specified
HxW
I would like to stick to original code as much as possible instead of using my own cv resize function to keep aspect ratio
Beta Was this translation helpful? Give feedback.
All reactions