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

Will this be able to convert yolov4 of pytorch ? #1

Open
saikrishnadas opened this issue Jun 17, 2020 · 6 comments
Open

Will this be able to convert yolov4 of pytorch ? #1

saikrishnadas opened this issue Jun 17, 2020 · 6 comments

Comments

@saikrishnadas
Copy link

I have a yolov4.weight file converted to pytorch, and i would like to know if this repo can convert the yolov4.pt to tensorrt ?

@wang-xinyu
Copy link
Owner

yes, yolov4.pt should also work.

Follow these steps https://github.com/wang-xinyu/tensorrtx/tree/master/yolov4#excute, not using this repo, but using https://github.com/ultralytics/yolov3

@saikrishnadas
Copy link
Author

converting darknet to yolov4 works fine. But its too slow to run on my jetson nx (took about 64 secs for detection ). I need to convert the yolov4.pt file into tensorrt, so that the model runs faster

@wang-xinyu
Copy link
Owner

Follow these steps https://github.com/wang-xinyu/tensorrtx/tree/master/yolov4#excute, to convert yolov4.pt file into tensorrt

@saikrishnadas
Copy link
Author

Doesn't that convert yolov4.weight to yolov4.wts and to .engine? I have weight named yolov4.pt

@wang-xinyu
Copy link
Owner

gen_wts.py can also convert yolov4.pt to yolov4.wts.
Can you try it ?

@saikrishnadas
Copy link
Author

@wang-xinyu NameError : name 'device' is not defined. in model.load_state_dict(torch.load(weights,map_location=device)['model'])

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