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

Tensorrt export fail #6336

Closed
1 of 2 tasks
dariogonle opened this issue Jan 18, 2022 · 2 comments · Fixed by #6340
Closed
1 of 2 tasks

Tensorrt export fail #6336

dariogonle opened this issue Jan 18, 2022 · 2 comments · Fixed by #6340
Labels
bug Something isn't working

Comments

@dariogonle
Copy link

dariogonle commented Jan 18, 2022

Search before asking

  • I have searched the YOLOv5 issues and found no similar bug report.

YOLOv5 Component

Export

Bug

I've used the export.py script to convert yolov5n.pt to tensorrt.

python3 export.py --weights yolov5n.pt --include engine

But the conversion process fails.

image

It says that tensorrt is not installed, but it is:
image

Environment

No response

Minimal Reproducible Example

No response

Additional

No response

Are you willing to submit a PR?

  • Yes I'd like to help by submitting a PR!
@dariogonle dariogonle added the bug Something isn't working label Jan 18, 2022
@dariogonle
Copy link
Author

dariogonle commented Jan 18, 2022

I think the problem is that for using tensorrt it is necessary to force to use the GPU and FP16. Therefore, the correct command should be

python export.py --include engine --device 0 --half --weights yolov5n.pt --data data.yaml

@glenn-jocher
Copy link
Member

@dariogonle yes, TRT exports must be run on a GPU backend. Maybe we should have a special assert here for this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants