-
Notifications
You must be signed in to change notification settings - Fork 7.3k
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
Batch inference in caffe2 export #1030
Comments
So detector_results found here is an InstanceList and contains the field indices that indicates which image a detection belongs to. However, when I tried to export this field, it is exported as a constant. How do we go about exporting the indices field as a proper output? Edit: I was able to export the batch_ids by returning it when it was created by the BoxwithNMSLimit op. |
So I was able to export the batch ids, but that doesn't resolve the problem. I'll illustrate with an example. These are the two images of the batch, I'm sending in to the model: Now here are the formatted detections the model makes:
Originally, I was expecting detections from image 1 to have batch id 0 and those from image 2 to have batch id 1. But this doesn't seem to be the case. As you can see, the detections get mixed up, hence why bear is getting detected in image 1 and tv in image 2. Any ideas as to why this is happening? |
Batch inference of the exported model is not supported now. |
Are there any plans for supporting batch inference in the upcoming future? |
Other export methods support batch inference according to https://detectron2.readthedocs.io/en/latest/tutorials/deployment.html |
Caffe2 is being deprecated in favor of pytorch, so this issue won't be resolved. Closing as won't fix |
Batch inference using the default detectron2 model was previously discussed in #282. I was wondering whether it would be possible to do the same with the exported model (onnx or caffe2)
Passing in a batch of images, the final detections are all stacked together so you can't tell which detections belong to which image.
So for example, if I pass in 3 images, I'll receive 20 detections without knowing how many detections belong to the 1st image, how many belong to the 2nd image etc.
Is there a way this issue can be addressed?
The text was updated successfully, but these errors were encountered: