-
Notifications
You must be signed in to change notification settings - Fork 35
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
Deployment to TensorRT #98
Comments
The complete model maybe difficult to deploy to TensorRT due to Deformable Aggregation Function. But I think, parts of the model can be deployed on TensorRT. Like the Resnet50 Backbone or the FPN Neck. You can try to use torch2trt from NVIDIA for that purpose. |
Thank you for your response! |
I haven't tried to convert the model to ONNX yet. So far I have only been successful to convert the Backbone, Neck and the Encoders to TensorRT using torch2trt without causing massive change in accuracy. So, I'm not certain which is the best way to approach for ONNX. I think MMDeploy would be great since you can define custom plugins to convert Deformable Aggregation Function (Haven't tried so not sure). Maybe you can try that and let me know how it goes? |
@shubhendu-ranadive Thanks for the suggestions! I am able to convert the model to onnx but the model outputs same results for different inputs, so something is wrong. Here are the steps I performed
The issue right now is that the model outputs same results for different inputs. Debugging in progress... |
@CMSC740Student That's great! 👍 |
@shubhendu-ranadive Did some debugging...I think the issue may be with InstanceBank. InstanceBank caches intermediate results from previous inputs & passes them along with the next set of inputs. Therefore, that InstanceBank class contains logic that only gets triggered when it processes sequential batches of inputs, as opposed to a single batch. When I try to export my model with dummy inputs with a single batch, the outputs are incorrect (likely because the InstanceBank logic is not traced/exported correctly via torch.onnx.export) Do you know if its possible to pass sequential batches of inputs so that the model is traced correctly with all inputs? |
@CMSC740Student Thanks for your reply. That indeed looks like a problem when creating a graph for ONNX. The only thing I found after searching is maybe using Edit: more on using |
@CMSC740Student Did you get it working? |
@CMSC740Student @shubhendu-ranadive This repository may be useful for your deployment:https://github.com/ThomasVonWu/SparseEnd2End |
Hi All,
Thank you for the amazing work! Can this model be exported to TensorRT for inference?
Thanks
The text was updated successfully, but these errors were encountered: