-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
Detectron2 - no detections below 832x832 in trt, onnxruntime versions detect correctly #3932
Comments
@Huxwell While I do understand that onnxruntime works for your onnx file generated from export_model.py but Since the information is not enough, it is really difficult to narrow down your situation but from what I see, your models which have the dimensions less than 800 are not being supported. Find a way to validate your onnx file generated from create_onnx.py. i.e., netron or maybe TensorRTEP (onnxruntime) I could be wrong but maybe you could try checking all this if you haven't already. Thanks. |
Thanks for the tips. I am running the model with
But for <832 (i.e. 768x768) it's:
So I assume it's not a postprocesing issue and infer.py is correct.
I also thought about 800 and 1300 being default in detectron2, but I had no problems with 1344x1344 in tensorrt, and no problems with 640x640 in onnx_runtime, so the problem is most likely in tensorrt conversion. |
@Huxwell |
Sorry @edanpa-bw , I don't know. |
Hey!
I've been trying square resolutions divisible by 64x64 (divisibility by 32 was not always enough for error-free conversion).
I'm doing this both for maskrcnn with coco weights, as well as custom keypoints with similar outcome.
The issue is, 1344x1344, 1280x1280, 960x960, 832x832 don't seem to loose accuracy, but 768x768, 704x704, 640x640 are fully blind (no detections or detections with confidence from activation function below 10%).
In onnxruntime the 640x640, 768x768 work perfectly too, so the problem is not in detectron2
export_model.py
.This leads to conclusion, that something in create_onnx.py or in one of the trt plugins (ROIAlign or Efficient NMS) uses width and height of the image as basis for some computation that gives different results 832x832.
Any tips on how to look for the solution @azhurkevich @letmejoing @RajUpadhyay ?
Related issues:
#2142
#3792 (comment)
facebookresearch/detectron2#5255
The text was updated successfully, but these errors were encountered: