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

对Yolov8n.pt转wts后,再序列化构建时,addResize()函数返回值为空,应如何解决? #3961

Open
retioa11 opened this issue Jun 24, 2024 · 8 comments

Comments

@retioa11
Copy link

retioa11 commented Jun 24, 2024

Tasks

No tasks being tracked yet.
@retioa11 retioa11 changed the title 对Yolov8n.pt转wts后,再序列化构建时, 对Yolov8n.pt转wts后,再序列化构建时,addResize()函数返回值为空,应如何解决? Jun 24, 2024
@retioa11
Copy link
Author

retioa11 commented Jun 24, 2024

想把这个仓库的代码,[https://github.com/wang-xinyu/tensorrtx/tree/master/yolov8,修改为支持推理时动态形状,如下图的红框所示:
571438db915696590cc3d782eb1920c
修改了红框里的三四行代码,第100行就返回为空了,该如何解决呢?

@lix19937
Copy link

You can upload the code for the two versions before and after here. @retioa11

@retioa11
Copy link
Author

You can upload the code for the two versions before and after here. @retioa11
different:
image
code for the two versions before and after:
[
yolov8_before.zip
](url)
yolov8_after.zip
before:
0a641c46eca4da4fe86400be76eedb3
after:
f746d3eab81ea9e59e0991ae8e2bc6f

@lix19937
Copy link

Are your H,W are dynamic shape ?

If H W are dynamic shape, you can ref https://github.com/lix19937/trt-samples-for-hackathon-cn/blob/master/cookbook/02-API/OptimizationProfile/main-TensorInput.py#L28

@retioa11
Copy link
Author

Oh, thank you. But wondering why my modification is returned empty and how should be modified to serialize Yolov8. Does the code in the link help? Not very understand.

@lix19937
Copy link

lix19937 commented Jun 30, 2024

@lix19937
Copy link

lix19937 commented Jul 3, 2024

As usual, it's caused by not setting the right dynamic shape profile or rt-input shapes.

@retioa11
Copy link
Author

Thanks, I'll have it a try。

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