tensorrtx
tensorrtx copied to clipboard
Yolov7--Compared pytorch and tensorrtx faced detections issue.
Env
- GPU: NVIDIA GeForce GTX 1050 Ti.
- OS: Ubuntu 18.04.6 LTS
- Cuda version: 12.1
- TensorRT version: 8.6
About this repo
-
which branch/tag/commit are you using? Ans: main branch for tensorrtx. commit
432a6729a776d08d405f5adc75171aa3174a1527 -
which model? Ans: yolov7
Problem
First I was trying to check the detections and compare the pytorch and trt boxes on my custom model. I was getting lots of false positive numbers. I was thinking maybe my custom model's last layer is IDetect so it's not supported yet in the current version of tensorrtx repo but the default model I checked the last layer is Detect. At least the default model should match one to one.
Then I'm checking the default model using v0.1/yolov7.pt file to generate yolov7.wts with the help of gen_wts.py file and using this command ./yolov7 -s yolov7.wts yolov7.engine v7 to create yolov7.engine fille.
When I pass through some images It's not a one to one match actually. Not exactly sure if I missed something or any other steps.
I can understand of wrong object class detection maybe default model is not trained with these scenario images. I'm expecting same thing should come up TRT case also along with closest confidence values.
For you information just to compare the detection result I have used pytorch v0.1 source Code of yolov7
Could you please help me out with this?
It won't be exactly one to one. The input shapes are slightly different, and also postprocessing.
Can you try to compare several images from coco dataset? And also try to compare the mAP with entire validation dataset.
Could you please look into this PR? https://github.com/wang-xinyu/tensorrtx/pull/1444
I have resolved the above issue by changing the eps value.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.