-
-
Notifications
You must be signed in to change notification settings - Fork 255
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
Integrate custom YOLOv5 #184
Comments
This is how the yolov5 tensorrt model is implemented in the tensorrtx repo. Can you help me out how can I integrate this your code? Also, if possible, can you point out the difference in implementation in your and their code?
|
What caught my attention is you are overwriting
Also, the preprocessing step of YOLOv5 looks identical to this repo when you set |
Thank you for replying. Their postprocessing function is as follows:
|
You need to modify filter_dets() too because you do not need to multiply to get detection score/confidence anymore. |
@umairjavaid Have you done already? Could I consult your repo? |
Apologies in advance, im new to tensorrt. Therefore I am seeking your help.
I am trying to integrate yolov5 model in your pipeline. I have made a separate class for yolov5 in yolov5.py. I have set the plugin path and reshaped the output tensor shape in the postprocess function accordingly. I have also written my own preprocess and postprocess function in YoloDetector. But unfortunately, my model returns all zeros in model output.
In the function infer_async, my code goes to second if statement i.e
self.engine.has_implicit_batch_dimension:
In this if conditionself.context.execute_async(batch_size=self.batch_size, bindings=self.bindings, stream_handle=self.stream.ptr)
gets called. Correct me, if I am wrong but I think my inputs are not being copied to GPU here. Therefore, I am getting all zeros from my model output. How can I fix it?yolov5 class added in yolov5.py
preprocess and postprocess in detector.py
The text was updated successfully, but these errors were encountered: