-
Notifications
You must be signed in to change notification settings - Fork 11
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
TRT no results or totally wrong #3
Comments
Hi, @malfonsoNeoris, Thank you for the code in the attachment. I'll learn it a bit later and help you to figure the problem out. |
hi alexander. just an update. would copy some image result help to undertand the problem ? |
Hi @alexander-pv , thanks for your effort. I've successfully converted a trained After that from modified_ONNX to TRT was successfully as well. But the result of TRT seems too much different from the original Is that normal when you converted from to TRT ? Help to advice or suggest me how can I improve the TRT result or somewhere I can touch into and modify the modified_ONNX. Hello @malfonsoNeoris , How're you doing? are you able to get the good result from TRT? Once again, thanks all. |
Hi, @malfonsoNeoris , @xuatpham Sorry for the rather long answer. I have trained several models with the balloon dataset and I can say that there is an error somewhere in the construction of the ONNX graph for TRT. Sometimes NaNs happens in the TensorRT model output. I plan to compare the subgraphs outputs of the tensorflow/onnx with the tensorrt-optimized version. It is highly likely that this way it will be possible to find the location of the problem in the modified graph. @xuatpham, you can open Also, please do not forget to update An interesting fact is that for efficientnet and mobilenet backbones mAP drop is quite small. |
Thank you Alex, will have a look over that. But as my experiment, beside the results are quite different from the original, it seems like all the masks had been moved in the same direction so probably there is a problem with resize function, I guess. Anyway, don't forget to let us know if you can fix the NaNs values when converting to TRT. Thanks a lot. |
Hi @alexander-pv. First of all, many THANKS to your hard work. I have a question about TRT results which looks different from TF, ONNX runtime.
I roughly guess this is from different implementation between TF codes and TRT plugins (ProposalLayer_TRT, PyramidROIAlign_TRT, DetectionLayer_TRT). Do you have a way to get same results without loss ? Please give a comment. Thank you. |
Hi, @dk-chun, I am glad that you find the repo useful. First, ONNX graph modification for TRT porting that happens in Second, nvinfer_plugin should be recompiled according to the customized model config. Otherwise, TRT plugins may really work wrong or even segmentation fault errors can occur. |
Hi again.
after succesfully trained two models, mobilenet_256 and resnet18_256 where 256 is the image size.
now im starting the process of validating and converting to onnx and trt.
Now i have two problems
if i continue the process
now second problem
to clarrify all 3 test ( tensorflow, onnx, and trt models) were done with the exact same images. tf2 and onnx models results are the same.
Attached.. is a small script i created to test and convert (just copy pasted from the ipynb, with some minnor mods)
inference.zip
can you giveme some direction for where to look for this errors ?
thanks again!
The text was updated successfully, but these errors were encountered: