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

Runtime Analysis #108

Open
Wu-ZW opened this issue May 15, 2024 · 14 comments
Open

Runtime Analysis #108

Wu-ZW opened this issue May 15, 2024 · 14 comments

Comments

@Wu-ZW
Copy link

Wu-ZW commented May 15, 2024

when I run euroc datasets, some parameters as follows: image size is set 640*480, superpoint max_keypoints is set 200,
image
the time of detecting and tracking feature points for one image is about 92 ms, more than 65 ms in paper. Is any parameters i need to adjust?

@Wu-ZW
Copy link
Author

Wu-ZW commented May 15, 2024

l used Orin NX (16GB) edition.

@xukuanHIT
Copy link
Collaborator

@Wu-ZW HI, we run on the Nvidia Jetson AGX Xavier for runtime analysis. The computing capability of Jetson AGX Xavier is better than your Orin NX.

@Wu-ZW
Copy link
Author

Wu-ZW commented May 15, 2024

thanks for your replay! emmm, the computing capability of jeston orin nx (8.7) is larger than AGX Xavier(7.2).
image

@xukuanHIT
Copy link
Collaborator

Sorry for my mistake. The comparison can be found here, but it is true that jeston orin nx is more powerful than AGX Xavier.
Can you tell me your version of TensorRT? and have you tried the original Python version of superpoint and superglue on your jeston orin nx?

@Wu-ZW
Copy link
Author

Wu-ZW commented May 16, 2024

I have run original code of sp and sg using PyTorch-CUDA, it is Inefficient.
the consumption of point extraction and point matching is unstable,
the parameters as follow:
image
tensorrt + CUDA ....version as follows:
image

@xukuanHIT
Copy link
Collaborator

Can you compare the average runtime of C++ and Python code? On our Jetson platform, the C++ feature extraction and matching is about 6x faster than the Python version. I think if a similar improvement can be achieved on your Jetson, we can conclude that Orin NX is actually not as good as AGX Xavier.

@Wu-ZW
Copy link
Author

Wu-ZW commented May 16, 2024

parameters:
max_keypoints:200
keypoint_threshold:0.004
match_threshold:0.1
Python (Pytorch-CUDA) Code:
Superpoint time: 0.10092282295227051s
Superglue time: 0.10480713844299316s
C++ TensorRT Code:
sp:adout 40 ms
sg:about 50 ms

@Wu-ZW
Copy link
Author

Wu-ZW commented May 16, 2024

In jeston Orin NX, the C++ feature extraction and matching is about 2x faster than the Python version. the improvement is not very obvious.

@xukuanHIT
Copy link
Collaborator

xukuanHIT commented May 16, 2024

It's strange. I am not sure whether it is also caused by the TensorRT version. We have also encountered the efficiency problem when using TensorRT 8.5 on GeForce RTX GPUs that are lower than 40 series. It is recommended to try to downgrade the TensorRT version to 8.4.1.5 if possible.

@xukuanHIT
Copy link
Collaborator

xukuanHIT commented May 16, 2024

May be similar to this issue.

@Wu-ZW
Copy link
Author

Wu-ZW commented May 16, 2024

thanks a lot. I am also confused about above results. Addition, could I ask a question about how to export the PyTorch model to ONNX (int64)? I saw the scripts of convert_int32.py, is it convert INT64 to INT32 or FLOAT 32 to INT32?

@Wu-ZW
Copy link
Author

Wu-ZW commented May 16, 2024

May be similar to this issue.
I doubt that "read image again", the same code runs normal on other platform.

@xukuanHIT
Copy link
Collaborator

thanks a lot. I am also confused about above results. Addition, could I ask a question about how to export the PyTorch model to ONNX (int64)? I saw the scripts of convert_int32.py, is it convert INT64 to INT32 or FLOAT 32 to INT32?

Yes, just run the script.

@xukuanHIT
Copy link
Collaborator

May be similar to this issue.
I doubt that "read image again", the same code runs normal on other platform.

I mean the different environments may affect the runtime.

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