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

No detection visible #5

Closed
cosama opened this issue Aug 20, 2020 · 5 comments
Closed

No detection visible #5

cosama opened this issue Aug 20, 2020 · 5 comments

Comments

@cosama
Copy link

cosama commented Aug 20, 2020

Thanks for working on moving yolov4-tiny to tensorrt.

I tried the repo, it all runs but there are no bounding boxes displayed on the resulting images, it looks like it doesn't detect anything.

The only difference to the setup you mentioned in your readme is that I used the official weights from https://github.com/AlexeyAB/darknet/releases/download/darknet_yolo_v4_pre/yolov4-tiny.weights as I don't have access to baidu, when creating the wts file. Also https://github.com/WongKinYiu/PyTorch_YOLOv4 seems to not work with the gen_wts.py file anymore, I had to modify it slightly by manually importing darknet.

Any idea what is going on here? Have you had some successful detection in the past?

@tjuskyzhang
Copy link
Owner

Thanks for working on moving yolov4-tiny to tensorrt.

I tried the repo, it all runs but there are no bounding boxes displayed on the resulting images, it looks like it doesn't detect anything.

The only difference to the setup you mentioned in your readme is that I used the official weights from https://github.com/AlexeyAB/darknet/releases/download/darknet_yolo_v4_pre/yolov4-tiny.weights as I don't have access to baidu, when creating the wts file. Also https://github.com/WongKinYiu/PyTorch_YOLOv4 seems to not work with the gen_wts.py file anymore, I had to modify it slightly by manually importing darknet.

Any idea what is going on here? Have you had some successful detection in the past?

You can directly download the weights from https://github.com/WongKinYiu/PyTorch_YOLOv4/tree/master and I think you will get the right detection results.

There is a little different between the AlexeyAB's version and WongKinYiu's version. At the route layer, AlexeyAB uses "groups=2 group_id=1" , and WongKinYiu uses "route_lhalf". The dimensions of the tensors are same, so "it all runs". But the weights are different, so "it doesn't detect anything".

@cosama
Copy link
Author

cosama commented Aug 21, 2020

Thanks so much for pointing this out. I tried converting the pt file and it works indeed now. It runs at 30ms/frame on a TX2 pretty impressive.

Also thanks for the explanation I clearly was missing something there.

@tjuskyzhang
Copy link
Owner

Thanks so much for pointing this out. I tried converting the pt file and it works indeed now. It runs at 30ms/frame on a TX2 pretty impressive.

Also thanks for the explanation I clearly was missing something there.

I also test on TX2. When I using the MAX-N mode and jetson_clocks, it can run about 10~11ms/frame.

@andro-galexy
Copy link

Thanks so much for pointing this out. I tried converting the pt file and it works indeed now. It runs at 30ms/frame on a TX2 pretty impressive.

Also thanks for the explanation I clearly was missing something there.

@cosama can you give some more details over this i take latest pull from PyTorch_YOLOv4 repo, also downloaded same pytorch weights provided by the author but still facing similar issue as here.

@cosama
Copy link
Author

cosama commented Sep 2, 2021

@swapgit Sorry I have never had an issue like that, also I don't really have a setup anymore to work on this sorry.

Given that the original issue was resolved I will close this.

@cosama cosama closed this as completed Sep 2, 2021
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

3 participants